|
المشاركات 76 |
+التقييم 0.04 |
تاريخ التسجيل Aug 2019 |
الاقامة |
نظام التشغيل |
رقم العضوية 606 |
#region MrHassan Chi
case "xCoprachi":
{
var Mode = int.Parse(Data[1]);
var pos = (int)(int.Parse(Data[2]) - 1);
var powers = client.ChiPowers[Mode - 1];
var attributes = powers.Attributes;
attributes[pos].Type = (Enums.ChiAttribute)ushort.Parse(Data[3]);
attributes[pos].Value = (ushort)(Game.Enums.ChiMaxValues(attributes[pos].Type) - ushort.Parse(Data[4]));
powers.CalculatePoints();
Database.ChiTable.Sort((Enums.ChiPowerType)Mode);
powers.Power = (Enums.ChiPowerType)Mode;
client.Send(new ChiPowers(true).Query(client));
#region update ranking
Database.ChiTable.ChiData[] array = null;
switch ((Enums.ChiPowerType)Mode)
{
case Game.Enums.ChiPowerType.Dragon:
array = Database.ChiTable.Dragon;
break;
case Game.Enums.ChiPowerType.Phoenix:
array = Database.ChiTable.Phoenix;
break;
case Game.Enums.ChiPowerType.Tiger:
array = Database.ChiTable.Tiger;
break;
case Game.Enums.ChiPowerType.Turtle:
array = Database.ChiTable.Turtle;
break;
}
foreach (var chiData in array)
{
if (Kernel.GamePool.ContainsKey(chiData.UID))
{
var pClient = Kernel.GamePool[chiData.UID];
if (pClient == null) continue;
if (pClient.ChiData == null) continue;
SendRankingQuery(new GenericRanking(true) { Mode = GenericRanking.QueryCount }, pClient, GenericRanking.Chi + (uint)Mode, pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode), pClient.ChiData.SelectPoints((Enums.ChiPowerType)Mode));
if (pClient.Entity.UID == client.Entity.UID || pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode) < 50)
pClient.LoadItemStats();
}
}
#endregion
Database.ChiTable.Save(client);
}
break;
case "xCoprachi2":
{
foreach (var Client in Program.Values)
{
if (Client.Entity.LoweredName.Contains(Data[1]))
{
var Mode = int.Parse(Data[2]);
var pos = (int)(int.Parse(Data[3]) - 1);
var powers = Client.ChiPowers[Mode - 1];
var attributes = powers.Attributes;
attributes[pos].Type = (Enums.ChiAttribute)ushort.Parse(Data[4]);
attributes[pos].Value = (ushort)(Game.Enums.ChiMaxValues(attributes[pos].Type) - ushort.Parse(Data[5]));
powers.CalculatePoints();
Database.ChiTable.Sort((Enums.ChiPowerType)Mode);
powers.Power = (Enums.ChiPowerType)Mode;
Client.Send(new ChiPowers(true).Query(Client));
#region update ranking
Database.ChiTable.ChiData[] array = null;
switch ((Enums.ChiPowerType)Mode)
{
case Game.Enums.ChiPowerType.Dragon:
array = Database.ChiTable.Dragon;
break;
case Game.Enums.ChiPowerType.Phoenix:
array = Database.ChiTable.Phoenix;
break;
case Game.Enums.ChiPowerType.Tiger:
array = Database.ChiTable.Tiger;
break;
case Game.Enums.ChiPowerType.Turtle:
array = Database.ChiTable.Turtle;
break;
}
foreach (var chiData in array)
{
if (Kernel.GamePool.ContainsKey(chiData.UID))
{
var pClient = Kernel.GamePool[chiData.UID];
if (pClient == null) continue;
if (pClient.ChiData == null) continue;
SendRankingQuery(new GenericRanking(true) { Mode = GenericRanking.QueryCount }, pClient, GenericRanking.Chi + (uint)Mode, pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode), pClient.ChiData.SelectPoints((Enums.ChiPowerType)Mode));
if (pClient.Entity.UID == Client.Entity.UID || pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode) < 50)
pClient.LoadItemStats();
}
}
#endregion
Database.ChiTable.Save(Client);
}
}
}
break;
#endregion
#region MrHassan Chi2
case "Coprachi":
{
var Mode = int.Parse(Data[1]);
var pos = (int)(int.Parse(Data[2]) - 1);
var powers = client.ChiPowers[Mode - 1];
var attributes = powers.Attributes;
attributes[pos].Type = (Enums.ChiAttribute)ushort.Parse(Data[3]);
attributes[pos].Value = (ushort)Game.Enums.ChiMaxValues(attributes[pos].Type);
powers.CalculatePoints();
Database.ChiTable.Sort((Enums.ChiPowerType)Mode);
powers.Power = (Enums.ChiPowerType)Mode;
client.Send(new ChiPowers(true).Query(client));
#region update ranking
Database.ChiTable.ChiData[] array = null;
switch ((Enums.ChiPowerType)Mode)
{
case Game.Enums.ChiPowerType.Dragon:
array = Database.ChiTable.Dragon;
break;
case Game.Enums.ChiPowerType.Phoenix:
array = Database.ChiTable.Phoenix;
break;
case Game.Enums.ChiPowerType.Tiger:
array = Database.ChiTable.Tiger;
break;
case Game.Enums.ChiPowerType.Turtle:
array = Database.ChiTable.Turtle;
break;
}
foreach (var chiData in array)
{
if (Kernel.GamePool.ContainsKey(chiData.UID))
{
var pClient = Kernel.GamePool[chiData.UID];
if (pClient == null) continue;
if (pClient.ChiData == null) continue;
SendRankingQuery(new GenericRanking(true) { Mode = GenericRanking.QueryCount }, pClient, GenericRanking.Chi + (uint)Mode, pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode), pClient.ChiData.SelectPoints((Enums.ChiPowerType)Mode));
if (pClient.Entity.UID == client.Entity.UID || pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode) < 50)
pClient.LoadItemStats();
}
}
#endregion
Database.ChiTable.Save(client);
}
break;
case "Coprachi2":
{
foreach (var Client in Program.Values)
{
if (Client.Entity.LoweredName.Contains(Data[1]))
{
var Mode = int.Parse(Data[2]);
var pos = (int)(int.Parse(Data[3]) - 1);
var powers = Client.ChiPowers[Mode - 1];
var attributes = powers.Attributes;
attributes[pos].Type = (Enums.ChiAttribute)ushort.Parse(Data[4]);
attributes[pos].Value = (ushort)Game.Enums.ChiMaxValues(attributes[pos].Type);
powers.CalculatePoints();
Database.ChiTable.Sort((Enums.ChiPowerType)Mode);
powers.Power = (Enums.ChiPowerType)Mode;
Client.Send(new ChiPowers(true).Query(Client));
#region update ranking
Database.ChiTable.ChiData[] array = null;
switch ((Enums.ChiPowerType)Mode)
{
case Game.Enums.ChiPowerType.Dragon:
array = Database.ChiTable.Dragon;
break;
case Game.Enums.ChiPowerType.Phoenix:
array = Database.ChiTable.Phoenix;
break;
case Game.Enums.ChiPowerType.Tiger:
array = Database.ChiTable.Tiger;
break;
case Game.Enums.ChiPowerType.Turtle:
array = Database.ChiTable.Turtle;
break;
}
foreach (var chiData in array)
{
if (Kernel.GamePool.ContainsKey(chiData.UID))
{
var pClient = Kernel.GamePool[chiData.UID];
if (pClient == null) continue;
if (pClient.ChiData == null) continue;
SendRankingQuery(new GenericRanking(true) { Mode = GenericRanking.QueryCount }, pClient, GenericRanking.Chi + (uint)Mode, pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode), pClient.ChiData.SelectPoints((Enums.ChiPowerType)Mode));
if (pClient.Entity.UID == Client.Entity.UID || pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode) < 50)
pClient.LoadItemStats();
}
}
#endregion
Database.ChiTable.Save(Client);
}
}
}
break;
#endregion
case "MrHassanjiang":
{
if (Client.Entity.MyJiang != null)
{
byte stageno = (byte)Math.Min(9, int.Parse(Data[3]));
byte level = (byte)Math.Min(6, int.Parse(Data[4]));
var type = (Game.JiangHu.JiangStages.AtributesType)Math.Min(15, int.Parse(Data[5]));
if (Client.Entity.MyJiang.Stagers.Length >= stageno)
{
var stage = Client.Entity.MyJiang.Stagers[(stageno - 1)];
for (byte i = 1; i < stage.Stars.Length + 1; i++)
{
Client.Entity.MyJiang.MyNewStart = new Game.JiangHu.GetNewStar();
Client.Entity.MyJiang.MyNewStart.PositionStar = i;
Client.Entity.MyJiang.MyNewStart.Stage = stageno;
Client.Entity.MyJiang.MyNewStart.Star = new Game.JiangHu.JiangStages.Star();
Client.Entity.MyJiang.MyNewStart.Star.Activate = true;
Client.Entity.MyJiang.MyNewStart.Star.Level = level;
Client.Entity.MyJiang.MyNewStart.Star.Typ = type;
Client.Entity.MyJiang.MyNewStart.Star.UID = Client.Entity.MyJiang.ValueToRoll(Client.Entity.MyJiang.MyNewStart.Star.Typ, Client.Entity.MyJiang.MyNewStart.Star.Level);
Network.GamePackets.JiangHuUpdate upd = new Network.GamePackets.JiangHuUpdate();
upd.Atribute = Client.Entity.MyJiang.MyNewStart.Star.UID;
upd.FreeCourse = Client.Entity.MyJiang.FreeCourse;
upd.Stage = stageno;
upd.Star = i;
upd.FreeTimeTodeyUsed = (byte)Client.Entity.MyJiang.FreeTimeTodeyUsed;
upd.RoundBuyPoints = Client.Entity.MyJiang.RoundBuyPoints;
Client.Send(upd.ToArray());
Client.Entity.MyJiang.ApplayNewStar(Client);
}
if (Client.Entity.MyJiang != null)
Client.Entity.MyJiang.SendStatus(Client, Client);
}
}
break;
}
#region MrHassan Chi
case "xCoprachi":
{
var Mode = int.Parse(Data[1]);
var pos = (int)(int.Parse(Data[2]) - 1);
var powers = client.ChiPowers[Mode - 1];
var attributes = powers.Attributes;
attributes[pos].Type = (Enums.ChiAttribute)ushort.Parse(Data[3]);
attributes[pos].Value = (ushort)(Game.Enums.ChiMaxValues(attributes[pos].Type) - ushort.Parse(Data[4]));
powers.CalculatePoints();
Database.ChiTable.Sort((Enums.ChiPowerType)Mode);
powers.Power = (Enums.ChiPowerType)Mode;
client.Send(new ChiPowers(true).Query(client));
#region update ranking
Database.ChiTable.ChiData[] array = null;
switch ((Enums.ChiPowerType)Mode)
{
case Game.Enums.ChiPowerType.Dragon:
array = Database.ChiTable.Dragon;
break;
case Game.Enums.ChiPowerType.Phoenix:
array = Database.ChiTable.Phoenix;
break;
case Game.Enums.ChiPowerType.Tiger:
array = Database.ChiTable.Tiger;
break;
case Game.Enums.ChiPowerType.Turtle:
array = Database.ChiTable.Turtle;
break;
}
foreach (var chiData in array)
{
if (Kernel.GamePool.ContainsKey(chiData.UID))
{
var pClient = Kernel.GamePool[chiData.UID];
if (pClient == null) continue;
if (pClient.ChiData == null) continue;
SendRankingQuery(new GenericRanking(true) { Mode = GenericRanking.QueryCount }, pClient, GenericRanking.Chi + (uint)Mode, pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode), pClient.ChiData.SelectPoints((Enums.ChiPowerType)Mode));
if (pClient.Entity.UID == client.Entity.UID || pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode) < 50)
pClient.LoadItemStats();
}
}
#endregion
Database.ChiTable.Save(client);
}
break;
case "xCoprachi2":
{
foreach (var Client in Program.Values)
{
if (Client.Entity.LoweredName.Contains(Data[1]))
{
var Mode = int.Parse(Data[2]);
var pos = (int)(int.Parse(Data[3]) - 1);
var powers = Client.ChiPowers[Mode - 1];
var attributes = powers.Attributes;
attributes[pos].Type = (Enums.ChiAttribute)ushort.Parse(Data[4]);
attributes[pos].Value = (ushort)(Game.Enums.ChiMaxValues(attributes[pos].Type) - ushort.Parse(Data[5]));
powers.CalculatePoints();
Database.ChiTable.Sort((Enums.ChiPowerType)Mode);
powers.Power = (Enums.ChiPowerType)Mode;
Client.Send(new ChiPowers(true).Query(Client));
#region update ranking
Database.ChiTable.ChiData[] array = null;
switch ((Enums.ChiPowerType)Mode)
{
case Game.Enums.ChiPowerType.Dragon:
array = Database.ChiTable.Dragon;
break;
case Game.Enums.ChiPowerType.Phoenix:
array = Database.ChiTable.Phoenix;
break;
case Game.Enums.ChiPowerType.Tiger:
array = Database.ChiTable.Tiger;
break;
case Game.Enums.ChiPowerType.Turtle:
array = Database.ChiTable.Turtle;
break;
}
foreach (var chiData in array)
{
if (Kernel.GamePool.ContainsKey(chiData.UID))
{
var pClient = Kernel.GamePool[chiData.UID];
if (pClient == null) continue;
if (pClient.ChiData == null) continue;
SendRankingQuery(new GenericRanking(true) { Mode = GenericRanking.QueryCount }, pClient, GenericRanking.Chi + (uint)Mode, pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode), pClient.ChiData.SelectPoints((Enums.ChiPowerType)Mode));
if (pClient.Entity.UID == Client.Entity.UID || pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode) < 50)
pClient.LoadItemStats();
}
}
#endregion
Database.ChiTable.Save(Client);
}
}
}
break;
#endregion
#region MrHassan Chi2
case "Coprachi":
{
var Mode = int.Parse(Data[1]);
var pos = (int)(int.Parse(Data[2]) - 1);
var powers = client.ChiPowers[Mode - 1];
var attributes = powers.Attributes;
attributes[pos].Type = (Enums.ChiAttribute)ushort.Parse(Data[3]);
attributes[pos].Value = (ushort)Game.Enums.ChiMaxValues(attributes[pos].Type);
powers.CalculatePoints();
Database.ChiTable.Sort((Enums.ChiPowerType)Mode);
powers.Power = (Enums.ChiPowerType)Mode;
client.Send(new ChiPowers(true).Query(client));
#region update ranking
Database.ChiTable.ChiData[] array = null;
switch ((Enums.ChiPowerType)Mode)
{
case Game.Enums.ChiPowerType.Dragon:
array = Database.ChiTable.Dragon;
break;
case Game.Enums.ChiPowerType.Phoenix:
array = Database.ChiTable.Phoenix;
break;
case Game.Enums.ChiPowerType.Tiger:
array = Database.ChiTable.Tiger;
break;
case Game.Enums.ChiPowerType.Turtle:
array = Database.ChiTable.Turtle;
break;
}
foreach (var chiData in array)
{
if (Kernel.GamePool.ContainsKey(chiData.UID))
{
var pClient = Kernel.GamePool[chiData.UID];
if (pClient == null) continue;
if (pClient.ChiData == null) continue;
SendRankingQuery(new GenericRanking(true) { Mode = GenericRanking.QueryCount }, pClient, GenericRanking.Chi + (uint)Mode, pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode), pClient.ChiData.SelectPoints((Enums.ChiPowerType)Mode));
if (pClient.Entity.UID == client.Entity.UID || pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode) < 50)
pClient.LoadItemStats();
}
}
#endregion
Database.ChiTable.Save(client);
}
break;
case "Coprachi2":
{
foreach (var Client in Program.Values)
{
if (Client.Entity.LoweredName.Contains(Data[1]))
{
var Mode = int.Parse(Data[2]);
var pos = (int)(int.Parse(Data[3]) - 1);
var powers = Client.ChiPowers[Mode - 1];
var attributes = powers.Attributes;
attributes[pos].Type = (Enums.ChiAttribute)ushort.Parse(Data[4]);
attributes[pos].Value = (ushort)Game.Enums.ChiMaxValues(attributes[pos].Type);
powers.CalculatePoints();
Database.ChiTable.Sort((Enums.ChiPowerType)Mode);
powers.Power = (Enums.ChiPowerType)Mode;
Client.Send(new ChiPowers(true).Query(Client));
#region update ranking
Database.ChiTable.ChiData[] array = null;
switch ((Enums.ChiPowerType)Mode)
{
case Game.Enums.ChiPowerType.Dragon:
array = Database.ChiTable.Dragon;
break;
case Game.Enums.ChiPowerType.Phoenix:
array = Database.ChiTable.Phoenix;
break;
case Game.Enums.ChiPowerType.Tiger:
array = Database.ChiTable.Tiger;
break;
case Game.Enums.ChiPowerType.Turtle:
array = Database.ChiTable.Turtle;
break;
}
foreach (var chiData in array)
{
if (Kernel.GamePool.ContainsKey(chiData.UID))
{
var pClient = Kernel.GamePool[chiData.UID];
if (pClient == null) continue;
if (pClient.ChiData == null) continue;
SendRankingQuery(new GenericRanking(true) { Mode = GenericRanking.QueryCount }, pClient, GenericRanking.Chi + (uint)Mode, pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode), pClient.ChiData.SelectPoints((Enums.ChiPowerType)Mode));
if (pClient.Entity.UID == Client.Entity.UID || pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode) < 50)
pClient.LoadItemStats();
}
}
#endregion
Database.ChiTable.Save(Client);
}
}
}
break;
#endregion
case "MrHassanjiang":
{
if (Client.Entity.MyJiang != null)
{
byte stageno = (byte)Math.Min(9, int.Parse(Data[3]));
byte level = (byte)Math.Min(6, int.Parse(Data[4]));
var type = (Game.JiangHu.JiangStages.AtributesType)Math.Min(15, int.Parse(Data[5]));
if (Client.Entity.MyJiang.Stagers.Length >= stageno)
{
var stage = Client.Entity.MyJiang.Stagers[(stageno - 1)];
for (byte i = 1; i < stage.Stars.Length + 1; i++)
{
Client.Entity.MyJiang.MyNewStart = new Game.JiangHu.GetNewStar();
Client.Entity.MyJiang.MyNewStart.PositionStar = i;
Client.Entity.MyJiang.MyNewStart.Stage = stageno;
Client.Entity.MyJiang.MyNewStart.Star = new Game.JiangHu.JiangStages.Star();
Client.Entity.MyJiang.MyNewStart.Star.Activate = true;
Client.Entity.MyJiang.MyNewStart.Star.Level = level;
Client.Entity.MyJiang.MyNewStart.Star.Typ = type;
Client.Entity.MyJiang.MyNewStart.Star.UID = Client.Entity.MyJiang.ValueToRoll(Client.Entity.MyJiang.MyNewStart.Star.Typ, Client.Entity.MyJiang.MyNewStart.Star.Level);
Network.GamePackets.JiangHuUpdate upd = new Network.GamePackets.JiangHuUpdate();
upd.Atribute = Client.Entity.MyJiang.MyNewStart.Star.UID;
upd.FreeCourse = Client.Entity.MyJiang.FreeCourse;
upd.Stage = stageno;
upd.Star = i;
upd.FreeTimeTodeyUsed = (byte)Client.Entity.MyJiang.FreeTimeTodeyUsed;
upd.RoundBuyPoints = Client.Entity.MyJiang.RoundBuyPoints;
Client.Send(upd.ToArray());
Client.Entity.MyJiang.ApplayNewStar(Client);
}
if (Client.Entity.MyJiang != null)
Client.Entity.MyJiang.SendStatus(Client, Client);
}
}
break;
}
#region mrhassan chi
case "xcoprachi":
{
var mode = int.parse(data[1]);
var pos = (int)(int.parse(data[2]) - 1);
var powers = client.chipowers[mode - 1];
var attributes = powers.attributes;
attributes[pos].type = (enums.chiattribute)ushort.parse(data[3]);
attributes[pos].value = (ushort)(game.enums.chimaxvalues(attributes[pos].type) - ushort.parse(data[4]));
powers.calculatepoints();
database.chitable.sort((enums.chipowertype)mode);
powers.power = (enums.chipowertype)mode;
client.send(new chipowers(true).query(client));
#region update ranking
database.chitable.chidata[] array = null;
switch ((enums.chipowertype)mode)
{
case game.enums.chipowertype.dragon:
Array = database.chitable.dragon;
break;
case game.enums.chipowertype.phoenix:
Array = database.chitable.phoenix;
break;
case game.enums.chipowertype.tiger:
Array = database.chitable.tiger;
break;
case game.enums.chipowertype.turtle:
Array = database.chitable.turtle;
break;
}
foreach (var chidata in array)
{
if (kernel.gamepool.containskey(chidata.uid))
{
var pclient = kernel.gamepool[chidata.uid];
if (pclient == null) continue;
if (pclient.chidata == null) continue;
sendrankingquery(new genericranking(true) { mode = genericranking.querycount }, pclient, genericranking.chi + (uint)mode, pclient.chidata.selectrank((enums.chipowertype)mode), pclient.chidata.selectpoints((enums.chipowertype)mode));
if (pclient.entity.uid == client.entity.uid || pclient.chidata.selectrank((enums.chipowertype)mode) < 50)
pclient.loaditemstats();
}
}
#endregion
database.chitable.save(client);
}
break;
case "xcoprachi2":
{
foreach (var client in program.values)
{
if (client.entity.loweredname.contains(data[1]))
{
var mode = int.parse(data[2]);
var pos = (int)(int.parse(data[3]) - 1);
var powers = client.chipowers[mode - 1];
var attributes = powers.attributes;
attributes[pos].type = (enums.chiattribute)ushort.parse(data[4]);
attributes[pos].value = (ushort)(game.enums.chimaxvalues(attributes[pos].type) - ushort.parse(data[5]));
powers.calculatepoints();
database.chitable.sort((enums.chipowertype)mode);
powers.power = (enums.chipowertype)mode;
client.send(new chipowers(true).query(client));
#region update ranking
database.chitable.chidata[] array = null;
switch ((enums.chipowertype)mode)
{
case game.enums.chipowertype.dragon:
Array = database.chitable.dragon;
break;
case game.enums.chipowertype.phoenix:
Array = database.chitable.phoenix;
break;
case game.enums.chipowertype.tiger:
Array = database.chitable.tiger;
break;
case game.enums.chipowertype.turtle:
Array = database.chitable.turtle;
break;
}
foreach (var chidata in array)
{
if (kernel.gamepool.containskey(chidata.uid))
{
var pclient = kernel.gamepool[chidata.uid];
if (pclient == null) continue;
if (pclient.chidata == null) continue;
sendrankingquery(new genericranking(true) { mode = genericranking.querycount }, pclient, genericranking.chi + (uint)mode, pclient.chidata.selectrank((enums.chipowertype)mode), pclient.chidata.selectpoints((enums.chipowertype)mode));
if (pclient.entity.uid == client.entity.uid || pclient.chidata.selectrank((enums.chipowertype)mode) < 50)
pclient.loaditemstats();
}
}
#endregion
database.chitable.save(client);
}
}
}
break;
#endregion
#region mrhassan chi2
case "coprachi":
{
var mode = int.parse(data[1]);
var pos = (int)(int.parse(data[2]) - 1);
var powers = client.chipowers[mode - 1];
var attributes = powers.attributes;
attributes[pos].type = (enums.chiattribute)ushort.parse(data[3]);
attributes[pos].value = (ushort)game.enums.chimaxvalues(attributes[pos].type);
powers.calculatepoints();
database.chitable.sort((enums.chipowertype)mode);
powers.power = (enums.chipowertype)mode;
client.send(new chipowers(true).query(client));
#region update ranking
database.chitable.chidata[] array = null;
switch ((enums.chipowertype)mode)
{
case game.enums.chipowertype.dragon:
Array = database.chitable.dragon;
break;
case game.enums.chipowertype.phoenix:
Array = database.chitable.phoenix;
break;
case game.enums.chipowertype.tiger:
Array = database.chitable.tiger;
break;
case game.enums.chipowertype.turtle:
Array = database.chitable.turtle;
break;
}
foreach (var chidata in array)
{
if (kernel.gamepool.containskey(chidata.uid))
{
var pclient = kernel.gamepool[chidata.uid];
if (pclient == null) continue;
if (pclient.chidata == null) continue;
sendrankingquery(new genericranking(true) { mode = genericranking.querycount }, pclient, genericranking.chi + (uint)mode, pclient.chidata.selectrank((enums.chipowertype)mode), pclient.chidata.selectpoints((enums.chipowertype)mode));
if (pclient.entity.uid == client.entity.uid || pclient.chidata.selectrank((enums.chipowertype)mode) < 50)
pclient.loaditemstats();
}
}
#endregion
database.chitable.save(client);
}
break;
case "coprachi2":
{
foreach (var client in program.values)
{
if (client.entity.loweredname.contains(data[1]))
{
var mode = int.parse(data[2]);
var pos = (int)(int.parse(data[3]) - 1);
var powers = client.chipowers[mode - 1];
var attributes = powers.attributes;
attributes[pos].type = (enums.chiattribute)ushort.parse(data[4]);
attributes[pos].value = (ushort)game.enums.chimaxvalues(attributes[pos].type);
powers.calculatepoints();
database.chitable.sort((enums.chipowertype)mode);
powers.power = (enums.chipowertype)mode;
client.send(new chipowers(true).query(client));
#region update ranking
database.chitable.chidata[] array = null;
switch ((enums.chipowertype)mode)
{
case game.enums.chipowertype.dragon:
Array = database.chitable.dragon;
break;
case game.enums.chipowertype.phoenix:
Array = database.chitable.phoenix;
break;
case game.enums.chipowertype.tiger:
Array = database.chitable.tiger;
break;
case game.enums.chipowertype.turtle:
Array = database.chitable.turtle;
break;
}
foreach (var chidata in array)
{
if (kernel.gamepool.containskey(chidata.uid))
{
var pclient = kernel.gamepool[chidata.uid];
if (pclient == null) continue;
if (pclient.chidata == null) continue;
sendrankingquery(new genericranking(true) { mode = genericranking.querycount }, pclient, genericranking.chi + (uint)mode, pclient.chidata.selectrank((enums.chipowertype)mode), pclient.chidata.selectpoints((enums.chipowertype)mode));
if (pclient.entity.uid == client.entity.uid || pclient.chidata.selectrank((enums.chipowertype)mode) < 50)
pclient.loaditemstats();
}
}
#endregion
database.chitable.save(client);
}
}
}
break;
#endregion
case "mrhassanjiang":
{
if (client.entity.myjiang != null)
{
byte stageno = (byte)math.min(9, int.parse(data[3]));
byte level = (byte)math.min(6, int.parse(data[4]));
var type = (game.jianghu.jiangstages.atributestype)math.min(15, int.parse(data[5]));
if (client.entity.myjiang.stagers.length >= stageno)
{
var stage = client.entity.myjiang.stagers[(stageno - 1)];
for (byte i = 1; i < stage.stars.length + 1; i++)
{
client.entity.myjiang.mynewstart = new game.jianghu.getnewstar();
client.entity.myjiang.mynewstart.positionstar = i;
client.entity.myjiang.mynewstart.stage = stageno;
client.entity.myjiang.mynewstart.star = new game.jianghu.jiangstages.star();
client.entity.myjiang.mynewstart.star.activate = true;
client.entity.myjiang.mynewstart.star.level = level;
client.entity.myjiang.mynewstart.star.typ = type;
client.entity.myjiang.mynewstart.star.uid = client.entity.myjiang.valuetoroll(client.entity.myjiang.mynewstart.star.typ, client.entity.myjiang.mynewstart.star.level);
network.gamepackets.jianghuupdate upd = new network.gamepackets.jianghuupdate();
upd.atribute = client.entity.myjiang.mynewstart.star.uid;
upd.freecourse = client.entity.myjiang.freecourse;
upd.stage = stageno;
upd.star = i;
upd.freetimetodeyused = (byte)client.entity.myjiang.freetimetodeyused;
upd.roundbuypoints = client.entity.myjiang.roundbuypoints;
client.send(upd.toarray());
client.entity.myjiang.applaynewstar(client);
}
if (client.entity.myjiang != null)
client.entity.myjiang.sendstatus(client, client);
}
}
break;
}
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
شفرة الـ knowplayer | Mero | تطوير سيرفرات كونكر | 1 | 2020-04-25 08:52 PM |
مشكلة في شفرة | AhmedGadd | مشكلات السيرفيرات كونكر الشخصيه | 7 | 2020-04-11 06:10 AM |
طلب شفرة | مجدى | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2020-02-02 09:15 AM |
شفرة الجي ام | انت عمري | مشكلات السيرفيرات كونكر الشخصيه | 4 | 2019-10-05 06:16 PM |
شفرة جديدة للـ عايز يجيب أيتم بوند | محمد ياسر | تطوير سيرفرات كونكر | 0 | 2019-04-24 09:08 AM |