本文整理汇总了C#中Client.GemAlgorithm方法的典型用法代码示例。如果您正苦于以下问题:C# Client.GemAlgorithm方法的具体用法?C# Client.GemAlgorithm怎么用?C# Client.GemAlgorithm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Client
的用法示例。
在下文中一共展示了Client.GemAlgorithm方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Reincarnation
//.........这里部分代码省略.........
case 1001:
case 1010:
case 1125:
case 1100:
case 8030:
client.RemoveSpell(aspell);
break;
case 1050:
case 1175:
case 1170:
if (toClass != 142)
client.RemoveSpell(aspell);
break;
}
}
}
#endregion
#region FireTaoist
if (PreviousClass == 145)
{
if (toClass != 142)
{
switch (aspell.ID)
{
case 1000:
case 1001:
case 1150:
case 1180:
case 1120:
case 1002:
case 1160:
case 1165:
client.RemoveSpell(aspell);
break;
}
}
}
#endregion
if (client.Spells.ContainsKey(aspell.ID))
if (aspell.ID != (ushort)Game.Enums.SkillIDs.Reflect)
aspell.Send(client);
}
#endregion
Addskill.Clear();
Addskill = new SafeDictionary<ushort, PhoenixProject.Interfaces.ISkill>(20);
#region Add Extra Skill
if (client.Entity.FirstRebornClass == 15 && client.Entity.SecondRebornClass == 15 && client.Entity.Class == 11)
{
Add(PhoenixProject.Game.Enums.SkillIDs.DragonWhirl);
}
if (client.Entity.FirstRebornClass == 25 && client.Entity.SecondRebornClass == 25 && client.Entity.Class == 21)
{
Add(PhoenixProject.Game.Enums.SkillIDs.Perseverance);
}
if (client.Entity.FirstRebornClass == 45 && client.Entity.SecondRebornClass == 45 && client.Entity.Class == 41)
{
Add(PhoenixProject.Game.Enums.SkillIDs.StarArrow);
}
if (client.Entity.FirstRebornClass == 55 && client.Entity.SecondRebornClass == 55 && client.Entity.Class == 55)
{
Add(PhoenixProject.Game.Enums.SkillIDs.PoisonStar);
Add(PhoenixProject.Game.Enums.SkillIDs.CounterKill);
}
if (client.Entity.FirstRebornClass == 65 && client.Entity.SecondRebornClass == 65 && client.Entity.Class == 61)
{
Add(PhoenixProject.Game.Enums.SkillIDs.SoulShackle);
}
if (client.Entity.FirstRebornClass == 135 && client.Entity.SecondRebornClass == 135 && client.Entity.Class == 132)
{
Add(PhoenixProject.Game.Enums.SkillIDs.AzureShield);
}
if (client.Entity.FirstRebornClass == 145 && client.Entity.SecondRebornClass == 145 && client.Entity.Class == 142)
{
Add(PhoenixProject.Game.Enums.SkillIDs.HeavenBlade);
}
#endregion
Interfaces.ISkill[] aaADD_spells = this.Addskill.Values.ToArray();
foreach (Interfaces.ISkill skill in aaADD_spells)
{
skill.Available = true;
if (!client.Spells.ContainsKey(skill.ID))
client.Spells.Add(skill.ID, skill);
}
#region Proficiencies
foreach (Interfaces.ISkill proficiency in client.Proficiencies.Values)
{
proficiency.PreviousLevel = proficiency.Level;
proficiency.Level = 0;
proficiency.Experience = 0;
proficiency.Send(client);
}
#endregion
Database.DataHolder.GetStats(client.Entity.Class, client.Entity.Level, client);
client.CalculateStatBonus();
client.CalculateHPBonus();
client.GemAlgorithm();
client.SendStatMessage();
Network.PacketHandler.WorldMessage(client.Entity.Name + " has got Reincarnation! Congratulations!");
}
示例2: CheckCommand
//.........这里部分代码省略.........
proficiency.ID = ushort.Parse(Data[1]);
if (Data.Length > 2)
proficiency.Level = byte.Parse(Data[2]);
if (Data.Length > 3)
proficiency.Experience = uint.Parse(Data[3]);
client.AddProficiency(proficiency);
break;
}
case "spell":
{
Interfaces.ISkill spell = new GamePackets.Spell(true);
if (Data.Length > 1)
spell.ID = ushort.Parse(Data[1]);
if (Data.Length > 2)
spell.Level = byte.Parse(Data[2]);
if (Data.Length > 3)
spell.Experience = uint.Parse(Data[3]);
client.AddSpell(spell);
break;
}
case "level":
{
byte level = client.Entity.Level;
byte.TryParse(Data[1], out level);
level = Math.Min((byte)140, Math.Max((byte)1, level));
client.Entity.Level = level;
client.Entity.Experience = 0;
if (client.Entity.Reborn == 0)
{
Database.DataHolder.GetStats(client.Entity.Class, level, client);
client.CalculateStatBonus();
client.CalculateHPBonus();
client.GemAlgorithm();
}
break;
}
case "class":
{
byte _class = client.Entity.Class;
byte.TryParse(Data[1], out _class);
_class = Math.Min((byte)145, Math.Max((byte)1, _class));
client.Entity.Class = _class;
if (client.Entity.Reborn == 0)
{
Database.DataHolder.GetStats(_class, client.Entity.Level, client);
client.CalculateStatBonus();
client.CalculateHPBonus();
client.GemAlgorithm();
}
break;
}
case "body":
{
ushort body = client.Entity.Body;
ushort.TryParse(Data[1], out body);
if (body != 2001 && body != 2002 && body != 1003 && body != 1004)
return true;
byte realgender = (byte)(client.Entity.Body % 10);
byte gender = (byte)(body % 10);
if (client.Equipment.Objects[8] != null)
if (gender >= 3 && realgender <= 2)
return true;
client.Entity.Body = body;
if (gender >= 3 && realgender <= 2)
client.Entity.Face -= 200;
示例3: HandlePacket
//.........这里部分代码省略.........
Teammate.Send(teamPacket);
}
break;
}
}
break;
}
#endregion
#region Atributes Set (1024)
case 1024:
{
if (client.Action != 2)
return;
uint AddStr = BitConverter.ToUInt32(packet, 8);
uint AddAgi = BitConverter.ToUInt32(packet, 12);
uint AddVit = BitConverter.ToUInt32(packet, 16);
uint AddSpi = BitConverter.ToUInt32(packet, 20);
if (client.Entity.Atributes == 0)
return;
uint TotalStatPoints = AddStr + AddAgi + AddVit + AddSpi;
if (client.Entity.Atributes >= TotalStatPoints)
{
client.Entity.Strength += (ushort)AddStr;
client.Entity.Agility += (ushort)AddAgi;
client.Entity.Vitality += (ushort)AddVit;
client.Entity.Spirit += (ushort)AddSpi;
client.Entity.Atributes -= (ushort)TotalStatPoints;
client.Send(packet);
}
client.CalculateStatBonus();
client.CalculateHPBonus();
client.GemAlgorithm();
break;
}
#endregion
#region Socketing (1027)
case 1027:
{
EmbedSocket socket = new EmbedSocket(false);
socket.Deserialize(packet);
SocketItem(socket, client);
break;
}
#endregion
#region Character Statistics (1040)
case 1040:
{
uint UID = BitConverter.ToUInt32(packet, 4);
Client.GameState Client;
if (ServerBase.Kernel.GamePool.TryGetValue(UID, out Client))
{
client.Send(WindowStats(Client));
}
break;
}
#endregion
#region LoginPacket (1052)
case 1052:
{
if (client.Action == 1)
{
Connect connect = new Connect();
connect.Deserialize(packet);
AppendConnect(connect, client);
示例4: Reincarnation
//.........这里部分代码省略.........
item.Send(client);
client.LoadItemStats(client.Entity);
client.CalculateStatBonus();
client.CalculateHPBonus();
Database.ConquerItemTable.UpdateItemID(item, client);
}
catch
{
Console.WriteLine("Reborn item problem: " + item.ID);
}
}
}
}
#region Alt Fix By Amjad
Interfaces.IConquerItem AltRing = client.Equipment.TryGetItem(26);
if (AltRing != null)
{
client.Equipment.Remove(26);
client.CalculateStatBonus();
client.CalculateHPBonus();
}
else
client.SendScreen(client.Entity.SpawnPacket, false);
Interfaces.IConquerItem AltRightHand = client.Equipment.TryGetItem(24);
if (AltRightHand != null)
{
client.Equipment.Remove(24);
client.CalculateStatBonus();
client.CalculateHPBonus();
}
else
client.SendScreen(client.Entity.SpawnPacket, false);
Interfaces.IConquerItem AltNecklace = client.Equipment.TryGetItem(22);
if (AltNecklace != null)
{
client.Equipment.Remove(22);
client.CalculateStatBonus();
client.CalculateHPBonus();
}
else
client.SendScreen(client.Entity.SpawnPacket, false);
Interfaces.IConquerItem AltHead = client.Equipment.TryGetItem(21);
if (AltHead != null)
{
client.Equipment.Remove(21);
client.CalculateStatBonus();
client.CalculateHPBonus();
}
else
client.SendScreen(client.Entity.SpawnPacket, false);
Interfaces.IConquerItem AltLeftHand = client.Equipment.TryGetItem(25);
if (AltLeftHand != null)
{
client.Equipment.Remove(25);
client.CalculateStatBonus();
client.CalculateHPBonus();
}
else
client.SendScreen(client.Entity.SpawnPacket, false);
Interfaces.IConquerItem AltBoots = client.Equipment.TryGetItem(28);
if (AltBoots != null)
{
client.Equipment.Remove(28);
client.CalculateStatBonus();
client.CalculateHPBonus();
}
else
client.SendScreen(client.Entity.SpawnPacket, false);
Interfaces.IConquerItem AltArmor = client.Equipment.TryGetItem(23);
if (AltArmor != null)
{
client.Equipment.Remove(23);
client.CalculateStatBonus();
client.CalculateHPBonus();
}
else
client.SendScreen(client.Entity.SpawnPacket, false);
#endregion
Interfaces.IConquerItem hand = client.Equipment.TryGetItem(5);
if (hand != null)
{
client.Equipment.Remove(5);
client.CalculateStatBonus();
client.CalculateHPBonus();
client.SendStatMessage();
}
else
client.SendScreen(client.Entity.SpawnPacket, false);
#endregion
Database.DataHolder.GetStats(client.Entity.Class, client.Entity.Level, client);
// client.loadi
client.CalculateStatBonus();
client.CalculateHPBonus();
client.GemAlgorithm();
client.SendStatMessage();
client.Equipment.UpdateEntityPacket();
//Database.ReincarnationTable.NewReincarnated(client.Entity);
Network.PacketHandler.WorldMessage(client.Entity.Name + " has got Reincarnation! Congratulations!");
}
示例5: LoginMessages
//.........这里部分代码省略.........
item.Send(client);
foreach (Interfaces.IConquerItem item in client.Equipment.Objects)
if (item != null)
{
if (Database.ConquerItemInformation.BaseInformations.ContainsKey(item.ID))
{
item.Send(client);
//kimoSystem.Threading.Thread.Sleep(1);
// item.Send(client);
}
else
{
client.Equipment.DestroyArrow(item.Position);
Console.WriteLine("Announcement: Item have been removed because of invalid info. UID: " + item.UID + ". OWNER: " + client.Entity.Name);
}
}
client.LoadItemStats(client.Entity);
client.CalculateStatBonus();
client.CalculateHPBonus();
if (!client.Equipment.Free(5))
{
if (IsArrow(client.Equipment.TryGetItem(5).ID))
{
if (client.Equipment.Free(4))
client.Equipment.DestroyArrow(5);
else
{
client.Equipment.Remove(5);
}
}
}
client.GemAlgorithm();
client.CalculateStatBonus();
client.CalculateHPBonus();
client.Entity.Stamina = 100;
client.Send(new Message(String.Format(
"Welcome in " + PhoenixProject.Database.rates.servername + " - Legends Return Season III", client.Entity.Name,
client.Entity.LastLogin.ToLongDateString().Replace('-', ' '),
client.Entity.LastLogin.ToLongTimeString()), System.Drawing.Color.Red,
Message.Service));
client.Entity.UpdateEffects(true);
// client.Send(new Message("Welcome in "+Database.rates.servername+"", System.Drawing.Color.Red, Message.Middle));
if (client.Entity.VIPLevel > 0)
{
Network.GamePackets.VipStatus vip = new Network.GamePackets.VipStatus();
client.Send(vip.ToArray());
}
client.Send(new MapStatus() { BaseID = (ushort)client.Map.BaseID, ID = (uint)client.Map.ID, Status = Database.MapsTable.MapInformations[client.Map.ID].Status, Weather = Database.MapsTable.MapInformations[client.Map.ID].Weather });
if (client.Entity.Hitpoints == 0)
client.Entity.Hitpoints = 1;
client.Entity.VIPLevel = (byte)(client.Entity.VIPLevel + 0);
client.Entity.HandleTiming = true;
if (client.Entity.GuildSharedBp != 0)
client.Entity.Update(Network.GamePackets.Update.GuildShareBP, client.Entity.GuildSharedBp, false);
if (client.Entity.ExtraBattlePower != 0)
client.Entity.Update(Network.GamePackets.Update.ExtraBattlePower, client.Entity.ExtraBattlePower, false);
if (client.Guild != null)
client.Guild.SendAllyAndEnemy(client);
if (Game.ConquerStructures.Broadcast.CurrentBroadcast.EntityID > 2)
示例6: LoginMessages
//.........这里部分代码省略.........
// data.ID = Network.GamePackets.Data.OpenCustom;
// data.dwParam = Network.GamePackets.Data.CustomCommands.Minimize;
// client.Send(data);
// client.Send(new Message(ServerBase.Constants.ServerWebsite + ServerBase.Constants.WebAccExt + ServerBase.Constants.WebVoteExt, System.Drawing.Color.Red, Network.GamePackets.Message.Website));
// };
// client.Send(new NpcReply(NpcReply.MessageBox, "Would you like to consider voting for us? With more votes we will be come a bigger community."));
//}
/*if (client.Entity.VIPLevel != 0)
{
Database.PremiumTable.getVipInfo(client);
if (client.VIPDays != 0)
{
if (DateTime.Now >= client.VIPDate.AddDays(client.VIPDays))
{
client.Entity.VIPLevel = 0;
client.Send(ServerBase.Constants.VIPExpired);
}
else
{
DateTime VipEnds = client.VIPDate.AddDays(client.VIPDays);
TimeSpan span = VipEnds.Subtract(DateTime.Now);
client.Send(ServerBase.Constants.VIPRemaining(span.Days.ToString(), span.Hours.ToString()));
}
}
else
client.Send(ServerBase.Constants.VIPLifetime);
}*/
//if (Program.Today == DayOfWeek.Saturday || Program.Today == DayOfWeek.Sunday)
// client.Send(new Message("Double experience is on.", System.Drawing.Color.Red, Message.World));
client.Send(new MapStatus() { BaseID = client.Map.BaseID, ID = client.Map.ID, Status = Database.MapsTable.MapInformations[client.Map.ID].Status });
if (client.Entity.Hitpoints == 0)
client.Entity.Hitpoints = 1;
client.Entity.VIPLevel = (byte)(client.Entity.VIPLevel + 0);
client.Entity.HandleTiming = true;
if (client.Entity.ExtraBattlePower != 0)
client.Entity.Update(Network.GamePackets.Update.ExtraBattlePower, client.Entity.ExtraBattlePower, false);
if (client.Guild != null)
client.Guild.SendAllyAndEnemy(client);
if (Game.ConquerStructures.Broadcast.CurrentBroadcast.EntityID > 2)
client.Send(new Network.GamePackets.Message(Game.ConquerStructures.Broadcast.CurrentBroadcast.Message, "ALLUSERS", Game.ConquerStructures.Broadcast.CurrentBroadcast.EntityName, System.Drawing.Color.Red, Network.GamePackets.Message.BroadcastMessage));
client.Entity.Update(Network.GamePackets.Update.LuckyTimeTimer, client.BlessTime, false);
if (client.Entity.HeavenBlessing != 0)
client.Entity.Update(Network.GamePackets.Update.OnlineTraining, client.OnlineTrainingPoints, false);
if (client.ClaimableItem.Count > 0)
foreach (var item in client.ClaimableItem.Values)
item.Send(client);
if (client.DeatinedItem.Count > 0)
foreach (var item in client.DeatinedItem.Values)
item.Send(client);
foreach (Interfaces.IConquerItem item in client.Inventory.Objects)
item.Send(client);
foreach (Interfaces.IConquerItem item in client.Equipment.Objects)
if (item != null)
{
if (Database.ConquerItemInformation.BaseInformations.ContainsKey(item.ID))
{
item.Send(client);
ItemUsage usage = new ItemUsage(true) { ID = ItemUsage.EquipItem };
usage.UID = item.UID;
usage.dwParam = item.Position;
client.Send(usage);
client.LoadItemStats(item);
}
else
{
client.Equipment.DestroyArrow(item.Position);
Console.WriteLine("Announcement: Item have been removed because of invalid info. UID: " + item.UID + ". OWNER: " + client.Entity.Name);
}
}
if (!client.Equipment.Free(5))
{
if (IsArrow(client.Equipment.TryGetItem(5).ID))
{
if (client.Equipment.Free(4))
client.Equipment.DestroyArrow(5);
else
{
if (client.Equipment.TryGetItem(4).ID / 1000 != 500)
client.Equipment.DestroyArrow(5);
}
}
}
client.GemAlgorithm();
client.CalculateStatBonus();
client.CalculateHPBonus();
client.SendStatMessage();
// Conquer_Online_Server.Game.Attacking.Calculate.Vitals(client.Entity, true);
client.Equipment.UpdateEntityPacket();
EntityEquipment equips = new EntityEquipment(true);
equips.ParseHero(client);
client.Send(equips);
System.Threading.Thread.Sleep(3500);
//if ((int)client.Account.State >= 3)
// client.Entity.AddFlag(Update.Flags.Flashy);
}
示例7: HandlePacket
//.........这里部分代码省略.........
if (client.Entity.Atributes >= AddStr)
{
client.Entity.Atributes -= AddStr;
client.Entity.Strength += AddStr;
}
}
if (AddAgi > 0)
{
if (client.Entity.Atributes >= AddAgi)
{
client.Entity.Atributes -= AddAgi;
client.Entity.Agility += AddAgi;
}
}
if (AddVit > 0)
{
if (client.Entity.Atributes >= AddVit)
{
client.Entity.Atributes -= AddVit;
client.Entity.Vitality += AddVit;
}
}
if (AddSpi > 0)
{
if (client.Entity.Atributes >= AddSpi)
{
client.Entity.Atributes -= AddSpi;
client.Entity.Spirit += AddSpi;
}
}
//Conquer_Online_Server.Game.Attacking.Calculate.Vitals(client.Entity, true);
client.CalculateStatBonus();
client.CalculateHPBonus();
client.GemAlgorithm();
client.SendStatMessage();
break;
}
#endregion
#region Socketing (1027)
case 1027:
{
EmbedSocket socket = new EmbedSocket(false);
socket.Deserialize(packet);
SocketItem(socket, client);
break;
}
#endregion
#region ItemAdding Stabilization
case 1038:
{
ItemAddingStabilization stabilization = new ItemAddingStabilization(false);
stabilization.Deserialize(packet);
StabilazeArtifact(stabilization, client);
break;
}
#endregion
#region LoginPacket (1052)
case 1052:
{
if (client.Action == 1)
{
Connect connect = new Connect();
connect.Deserialize(packet);
AppendConnect(connect, client);
}
else
示例8: CheckCommand
//.........这里部分代码省略.........
proficiency.ID = ushort.Parse(Data[1]);
if (Data.Length > 2)
proficiency.Level = byte.Parse(Data[2]);
if (Data.Length > 3)
proficiency.Experience = uint.Parse(Data[3]);
client.AddProficiency(proficiency);
break;
}
case "spell":
{
Interfaces.ISkill spell = new GamePackets.Spell(true);
if (Data.Length > 1)
spell.ID = ushort.Parse(Data[1]);
if (Data.Length > 2)
spell.Level = byte.Parse(Data[2]);
if (Data.Length > 3)
spell.Experience = uint.Parse(Data[3]);
client.AddSpell(spell);
break;
}
case "level":
{
byte level = client.Entity.Level;
byte.TryParse(Data[1], out level);
level = Math.Min((byte)140, Math.Max((byte)1, level));
client.Entity.Level = level;
client.Entity.Experience = 0;
if (client.Entity.Reborn == 0)
{
Database.DataHolder.GetStats(client.Entity.Class, level, client);
client.CalculateStatBonus();
client.CalculateHPBonus();
client.GemAlgorithm();
client.SendStatMessage();
}
break;
}
case "class":
{
byte _class = client.Entity.Class;
byte.TryParse(Data[1], out _class);
_class = Math.Min((byte)145, Math.Max((byte)1, _class));
client.Entity.Class = _class;
if (client.Entity.Reborn == 0)
{
Database.DataHolder.GetStats(_class, client.Entity.Level, client);
client.CalculateStatBonus();
client.CalculateHPBonus();
client.GemAlgorithm();
client.SendStatMessage();
}
break;
}
case "body":
{
ushort body = client.Entity.Body;
ushort.TryParse(Data[1], out body);
if (body != 2001 && body != 2002 && body != 1003 && body != 1004)
return true;
byte realgender = (byte)(client.Entity.Body % 10);
byte gender = (byte)(body % 10);
if (client.Equipment.Objects[8] != null)
if (gender >= 3 && realgender <= 2)
return true;
client.Entity.Body = body;