Reikenz
Member
- Apr 5, 2018
- 64
- 3
Hello..
I have this bug in my scoreboard wired
I have change ItemBehaviourUtility to SerializeExtraData which is directly integrated into the furni interaction
my problem is for the scoreboard wired i have a crash:
Can someone help me for this bug please?
I have this bug in my scoreboard wired
I have change ItemBehaviourUtility to SerializeExtraData which is directly integrated into the furni interaction
my problem is for the scoreboard wired i have a crash:
C#:
public void SerializeExtradata(Item Item, ServerPacket Message)
{
Message.WriteInteger(Item.LimitedNo > 0 ? 256 : 0);
Message.WriteString(Item.ExtraData);
string username;
string name = Item.GetBaseItem().ItemName;
string type = name.Split('*')[1];
if (type != null)
{
Dictionary<int, KeyValuePair<int, string>> ScoreBordata = new Dictionary<int, KeyValuePair<int, string>>();
Message.WriteInteger(0);
Message.WriteInteger(6);
Message.WriteString("1");
Message.WriteInteger(1);
if (Item.GetRoom() != null)
{
switch (type)
{
case "2":
Message.WriteInteger(1);
Message.WriteInteger(Item.GetRoom().WiredScoreBordDay.Count);
ScoreBordata = Item.GetRoom().WiredScoreBordDay;
break;
case "3":
Message.WriteInteger(2);
Message.WriteInteger(Item.GetRoom().WiredScoreBordWeek.Count);
ScoreBordata = Item.GetRoom().WiredScoreBordWeek;
break;
case "4":
Message.WriteInteger(3);
Message.WriteInteger(Item.GetRoom().WiredScoreBordMonth.Count);
ScoreBordata = Item.GetRoom().WiredScoreBordMonth;
break;
default:
Message.WriteInteger(1);
Message.WriteInteger(0);
ScoreBordata = null;
break;
}
}
else
{
Message.WriteInteger(1);
Message.WriteInteger(1);
Message.WriteInteger(0);
Message.WriteInteger(1);
Message.WriteString("Ce tableau de score ne fonctionne pas encore :(");
}
if (ScoreBordata.Count != 0)
{
foreach (KeyValuePair<int, string> value in (
from i in ScoreBordata
orderby i.Value.Key descending
select i).ToDictionary<KeyValuePair<int, KeyValuePair<int, string>>, int, KeyValuePair<int, string>>((KeyValuePair<int, KeyValuePair<int, string>> i) => i.Key, (KeyValuePair<int, KeyValuePair<int, string>> i) => i.Value).Values)
{
username = value.Value;
Message.WriteInteger(value.Key);
Message.WriteInteger(1);
Message.WriteString((string.IsNullOrEmpty(username) ? string.Empty : username));
}
}
}
}
Can someone help me for this bug please?