|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using ConquerVirusX.Game.MsgServer;
using ConquerVirusX.Network.GamePackets;
using ConquerVirusX.Game;
namespace ConquerVirusX.Database
{
public class RebornInfomations : List<Tuple<byte, byte, byte, RebornInfomations.Action, List<ushort>>>
{
public List<ushort> StaticSpells = new List<ushort>()
{
1360,1260,1290,5050,5040,5030,5020,5010,1045,1046,11000 ,11005,7000,7010,7020,7030,7040,11190,7001,7002,7003,1300
};
public List<ushort> PureSpells = new List<ushort>()
{
10405,30000,11040,6003,10315,10310,10311,10313,12300,13080
};
public enum Action : byte
{
Delete = 0,
Downgrade = 2,
AllClassSpells = 4,//???
PureSpell = 5,
Add = 6,
AddRebornSpells = 7
}
public void Load()
{
string[] baseplusText = File.ReadAllLines(Constants.DataHolderPath + "magictypeop.txt");
foreach (string line in baseplusText)
{
string[] data = line.Split(',');
byte Reborn = byte.Parse(data[1]);
byte MyClass = byte.Parse(data[2]);
byte RebornClass = byte.Parse(data[3]);
Action Info = (Action)byte.Parse(data[4]);
List<ushort> Spells = new List<ushort>();
for (int x = 5; x < data.Length; x++)
{
ushort ID = ushort.Parse(data[x]);
if (ID != 0)
Spells.Add(ID);
}
this.Add(new Tuple<byte, byte, byte, Action, List<ushort>>(Reborn, MyClass, RebornClass, Info, Spells));
}
}
public byte ExtraAtributePoints(byte level, byte mClass)
{
if (mClass == 135)
{
if (level <= 110)
return 0;
switch (level)
{
case 112: return 1;
case 114: return 3;
case 116: return 6;
case 118: return 10;
case 120: return 15;
case 121: return 15;
case 122: return 21;
case 123: return 21;
case 124: return 28;
case 125: return 28;
case 126: return 36;
case 127: return 36;
case 128: return 45;
case 129: return 45;
default:
return 55;
}
}
else
{
if (level <= 120)
return 0;
switch (level)
{
case 121: return 1;
case 122: return 3;
case 123: return 6;
case 124: return 10;
case 125: return 15;
case 126: return 21;
case 127: return 28;
case 128: return 36;
case 129: return 45;
default:
return 55;
}
}
}
public unsafe void Reborn(Game.Entity player, byte RebornClass, ServerSockets.Packet stream)
{
if (RebornClass != 0)
{
if (RebornClass % 10 == 1 || RebornClass == 132 || RebornClass == 142)
{
switch (player.Reborn)
{
case 0:
{
foreach (var info in this)
{
if (info.Item1 == 1 && info.Item2 == player.Class && info.Item3 == RebornClass)
{
switch (info.Item4)
{
case Action.AddRebornSpells:
case Action.Add:
{
foreach (var spellid in info.Item5)
player.Owner.MySpells.Add(stream, spellid);
break;
}
case Action.Delete:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.Remove(spellid, stream);
}
break;
}
case Action.Downgrade:
{
foreach (var spellid in info.Item5)
player.Owner.MySpells.RebornSpell(stream, spellid);
break;
}
}
}
}
player.FirstRebornLevel = (byte)player.Level;
player.FirstRebornClass = player.Class;
player.Class = player.Owner.GetCharClass(RebornClass);
player.Reborn = 1;
player.SendUpdate(stream, player.Reborn, Game.MsgServer.MsgUpdate.DataType.Reborn);
break;
}
case 1:
{
foreach (var info in this)
{
if (info.Item1 == 2 && info.Item2 == player.Class && info.Item3 == RebornClass)
{
switch (info.Item4)
{
case Action.AddRebornSpells:
case Action.Add:
{
foreach (var spellid in info.Item5)
player.Owner.MySpells.Add(stream, spellid);
break;
}
case Action.Delete:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.Remove(spellid, stream);
}
break;
}
case Action.Downgrade:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.RebornSpell(stream, spellid);
}
break;
}
}
}
}
player.SecondRebornLevel = (byte)player.Level;
player.SecondRebornClass = player.Class;
player.Class = player.Owner.GetCharClass(RebornClass);
player.Reborn = 2;
break;
}
case 2:
{
player.Owner.MySpells.ClearSpells(StaticSpells, stream);
byte RClass = 0;
if (player.SecondRebornClass == 135)
RClass = 132;
else if (player.SecondRebornClass == 145)
RClass = 142;
else
RClass = (byte)(player.SecondRebornClass - 4);
byte Twoclass = 0;
if (player.Class == 135)
Twoclass = 132;
else if (player.Class == 145)
Twoclass = 142;
else
Twoclass = (byte)(player.Class - 4);
foreach (var info in this)
{
if (info.Item1 == 0 && info.Item2 == 0 && info.Item3 == RClass)
{
switch (info.Item4)
{
case Action.AllClassSpells:
{
foreach (var spellid in info.Item5)
{
if (!StaticSpells.Contains(spellid) && !PureSpells.Contains(spellid))
{
if (spellid == 12200)
{
if (RClass == RebornClass || Twoclass == RClass)
{
player.Owner.MySpells.Add(stream, spellid);
}
}
else if (spellid == 3090)
{
if (RClass == RebornClass || Twoclass == RClass)
{
player.Owner.MySpells.Add(stream, spellid);
}
}
else
player.Owner.MySpells.Add(stream, spellid);
}
}
break;
}
}
}
}
foreach (var info in this)
{
if (info.Item1 == 0 && info.Item2 == RebornClass && info.Item3 == Twoclass)
{
switch (info.Item4)
{
case Action.PureSpell:
{
if (RClass == Twoclass && Twoclass == RebornClass)
{
foreach (var spellid in info.Item5)
{
if (!StaticSpells.Contains(spellid))
player.Owner.MySpells.Add(stream, spellid);
}
}
break;
}
}
}
}
foreach (var info in this)
{
if (info.Item1 == 1 && info.Item2 == player.SecondRebornClass && info.Item3 == Twoclass)
{
switch (info.Item4)
{
case Action.AddRebornSpells:
case Action.Add:
{
foreach (var spellid in info.Item5)
player.Owner.MySpells.Add(stream, spellid);
break;
}
case Action.Delete:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.Remove(spellid, stream);
}
break;
}
case Action.Downgrade:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.RebornSpell(stream, spellid);
}
break;
}
}
}
}
foreach (var info in this)
{
if (info.Item1 == 0 && info.Item2 == 0 && info.Item3 == Twoclass)
{
switch (info.Item4)
{
case Action.AllClassSpells:
{
foreach (var spellid in info.Item5)
{
if (!StaticSpells.Contains(spellid) && !PureSpells.Contains(spellid))
{
if (spellid == 12200)
{
if (RClass == RebornClass || Twoclass == RClass)
{
player.Owner.MySpells.Add(stream, spellid);
}
}
else if (spellid == 3090)
{
if (RClass == RebornClass || Twoclass == RClass)
{
player.Owner.MySpells.Add(stream, spellid);
}
}
else
player.Owner.MySpells.Add(stream, spellid);
}
}
break;
}
}
}
}
foreach (var info in this)
{
if (info.Item1 == 2 && info.Item2 == player.Class && info.Item3 == RebornClass)
{
switch (info.Item4)
{
case Action.AddRebornSpells:
case Action.Add:
{
foreach (var spellid in info.Item5)
player.Owner.MySpells.Add(stream, spellid);
break;
}
case Action.Delete:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.Remove(spellid, stream);
}
break;
}
case Action.Downgrade:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.RebornSpell(stream, spellid);
}
break;
}
}
}
}
player.FirstRebornLevel = player.SecondRebornLevel;
player.SecondRebornLevel = (byte)player.Level;
player.FirstRebornClass = player.SecondRebornClass;
player.SecondRebornClass = player.Class;
player.Class = player.Owner.GetCharClass(RebornClass);
player.Reincarnation = true;
break;
}
}
try
{
foreach (var item in player.Owner.Equipment.Objects)
{
if (item != null)
{
try
{
if (item.Position != (ushort)Network.GamePackets.ConquerItem.AlternateBottle
&& item.Position != (ushort)Network.GamePackets.ConquerItem.AlternateGarment
&& item.Position != (ushort)Network.GamePackets.ConquerItem.Bottle
&& item.Position != (ushort)Network.GamePackets.ConquerItem.Fan
&& item.Position != (ushort)Network.GamePackets.ConquerItem.Garment
&& item.Position != (ushort)Network.GamePackets.ConquerItem.LeftWeaponAccessory
&& item.Position != (ushort)Network.GamePackets.ConquerItem.SteedCrop
&& item.Position != (ushort)Network.GamePackets.ConquerItem.RightWeaponAccessory
&& item.Position != (ushort)Network.GamePackets.ConquerItem.Steed
&& item.Position != (ushort)Network.GamePackets.ConquerItem.SteedArmor
&& item.Position != (ushort)Network.GamePackets.ConquerItem.Tower)
{
Database.ConquerItemInformation cii = new Database.ConquerItemInformation(item.ID, item.Plus);
item.ID = cii.LowerThan(Network.PacketHandler.ItemMinLevel(Network.PacketHandler.ItemPosition(item.ID)));
item.Mode = Game.Enums.ItemMode.Update;
item.Send(player.Owner);
Database.ConquerItemTable.UpdateItemID(item);
}
}
catch (Exception e) { Console.WriteLine(e.ToString()); }
}
}
}
catch (Exception e) { Console.WriteLine(e.ToString()); }
player.Owner.Equipment.Remove((byte)Network.GamePackets.ConquerItem.LeftWeapon);
player.Owner.Equipment.Remove((byte)Network.GamePackets.ConquerItem.AlternateLeftWeapon);
ClientEquip Equi = new ClientEquip();
Equi.DoEquips(player.Owner);
player.Owner.Send(Equi);
player.Level = 15;
player.Experience = Kernel.LevelInfo[Database.DBLevExp.Sort.User][(byte)(player.Level - 1)].Experience;
player.SendUpdate(stream, (long)player.Experience, Game.MsgServer.MsgUpdate.DataType.Experience);
ConquerItem hand = player.Owner.Equipment.TryGetItem(5);
if (hand != null)
{
player.Owner.Equipment.Remove(5);
player.Owner.CalculateHitPoint();
player.Owner.CalculateMana();
player.Owner.LoadItemStats();
player.Owner.SendScreen(player.Owner.Entity.SpawnPacket, false);
}
hand = player.Owner.Equipment.TryGetItem(4);
if (hand != null)
{
player.Owner.Equipment.Remove(4);
player.Owner.CalculateHitPoint();
player.Owner.CalculateMana();
player.Owner.LoadItemStats();
player.Owner.SendScreen(player.Owner.Entity.SpawnPacket, false);
}
player.SendUpdate(stream, player.Level, Game.MsgServer.MsgUpdate.DataType.Level);
// Database.DataCore.AtributeStatus.GetStatus(player, true);
player.Strength = player.Agility = player.Spirit = 0;
player.Vitality = 1;
if (player.Reborn == 1)
{
player.Atributes = (ushort)(Program.RebornInfo.ExtraAtributePoints(player.FirstRebornLevel, player.FirstRebornClass)
+ 52 + 3 * (player.Level - 15) + player.ExtraAtributes);
}
else
{
player.Atributes = (ushort)(Program.RebornInfo.ExtraAtributePoints(player.FirstRebornLevel, player.FirstRebornClass) +
Program.RebornInfo.ExtraAtributePoints(player.SecondRebornLevel, player.SecondRebornClass) + 52 + 3 * (player.Level - 15) + player.ExtraAtributes);
}
player.SendUpdate(stream, player.Strength, Game.MsgServer.MsgUpdate.DataType.Strength);
player.SendUpdate(stream, player.Agility, Game.MsgServer.MsgUpdate.DataType.Agility);
player.SendUpdate(stream, player.Spirit, Game.MsgServer.MsgUpdate.DataType.Spirit);
player.SendUpdate(stream, player.Vitality, Game.MsgServer.MsgUpdate.DataType.Vitality);
player.SendUpdate(stream, player.Atributes, Game.MsgServer.MsgUpdate.DataType.Atributes);
player.SendUpdate(stream, player.FirstRebornClass, Game.MsgServer.MsgUpdate.DataType.FirsRebornClass);
player.SendUpdate(stream, player.SecondRebornClass, Game.MsgServer.MsgUpdate.DataType.SecondRebornClass);
ClientEquip eqs = new ClientEquip();
eqs.DoEquips(player.Owner);
player.Owner.Send(eqs);
var client = player.Owner;
client.Entity.RemoveFlag(MsgUpdate.Flags.ChillingSnow);
client.Entity.RemoveFlag(MsgUpdate.Flags.HealingSnow);
if (Database.AtributesStatus.IsTrojan(client.Entity.Class))
{
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.FastBlader))
client.MySpells.Add(stream, (ushort)Enums.SpellID.FastBlader);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ScrenSword))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ScrenSword);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Cyclone))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Cyclone);
}
else if (Database.AtributesStatus.IsWindWalker(client.Entity.Class))
{
if (client.Entity.FirstRebornClass == 165 && client.Entity.SecondRebornClass == 165)
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.FrostGazeIII))
client.MySpells.Add(stream, (ushort)Enums.SpellID.FrostGazeIII);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Omnipotence))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Omnipotence);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.JusticeChant))
client.MySpells.Add(stream, (ushort)Enums.SpellID.JusticeChant);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.SwirlingStorm))
client.MySpells.Add(stream, (ushort)Enums.SpellID.SwirlingStorm);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ShadowofChaser))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ShadowofChaser);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.BurntFrost))
client.MySpells.Add(stream, (ushort)Enums.SpellID.BurntFrost);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.HealingSnow))
client.MySpells.Add(stream, (ushort)Enums.SpellID.HealingSnow);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.RageofWar))
client.MySpells.Add(stream, (ushort)Enums.SpellID.RageofWar);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.HorrorofStomper))
client.MySpells.Add(stream, (ushort)Enums.SpellID.HorrorofStomper);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.TripleBlasts))
client.MySpells.Add(stream, (ushort)Enums.SpellID.TripleBlasts);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Thundercloud))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Thundercloud);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.PeaceofStomper))
client.MySpells.Add(stream, (ushort)Enums.SpellID.PeaceofStomper);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ChillingSnow))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ChillingSnow);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.RevengeTail))
client.MySpells.Add(stream, (ushort)Enums.SpellID.RevengeTail);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.FreezingPelter))
client.MySpells.Add(stream, (ushort)Enums.SpellID.FreezingPelter);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Thunderbolt))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Thunderbolt);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.AngerofStomper))
client.MySpells.Add(stream, (ushort)Enums.SpellID.AngerofStomper);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.JusticeChant))
client.MySpells.Add(stream, (ushort)Enums.SpellID.JusticeChant);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Circle))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Circle);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Rectangle))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Rectangle);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Sector))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Sector);
}
else if (Database.AtributesStatus.IsWarrior(client.Entity.Class))
{
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Superman))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Superman);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.FastBlader))
client.MySpells.Add(stream, (ushort)Enums.SpellID.FastBlader);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ScrenSword))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ScrenSword);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Shield))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Shield);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Accuracy))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Accuracy);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ScarofEarth))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ScarofEarth);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.TwistofWar))
client.MySpells.Add(stream, (ushort)Enums.SpellID.TwistofWar);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Backfire))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Backfire);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.WaveofBlood))
client.MySpells.Add(stream, (ushort)Enums.SpellID.WaveofBlood);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ManiacDance))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ManiacDance);
}
else if (Database.AtributesStatus.IsArcher(client.Entity.Class))
{
client.MySpells.Add(stream, (ushort)Enums.SpellID.XpFly);
}
else if (Database.AtributesStatus.IsNinja(client.Entity.Class))
{
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.FatalStrike))
client.MySpells.Add(stream, (ushort)Enums.SpellID.FatalStrike);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.GapingWounds))
client.MySpells.Add(stream, (ushort)Enums.SpellID.GapingWounds);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.TwofoldBlades))
client.MySpells.Add(stream, (ushort)Enums.SpellID.TwofoldBlades);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.SuperTwofoldBlade))
client.MySpells.Add(stream, (ushort)Enums.SpellID.SuperTwofoldBlade);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ToxicFog))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ToxicFog);
}
else if (Database.AtributesStatus.IsMonk(client.Entity.Class))
{
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.WhirlwindKick))
client.MySpells.Add(stream, (ushort)Enums.SpellID.WhirlwindKick);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.TripleAttack))
client.MySpells.Add(stream, (ushort)Enums.SpellID.TripleAttack);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Oblivion))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Oblivion);
}
else if (Database.AtributesStatus.IsPirate(client.Entity.Class))
{
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.CannonBarrage))
client.MySpells.Add(stream, (ushort)Enums.SpellID.CannonBarrage);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.BladeTempest))
client.MySpells.Add(stream, (ushort)Enums.SpellID.BladeTempest);
}
else if (Database.AtributesStatus.IsLee(client.Entity.Class))
{
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.SpeedKick))
client.MySpells.Add(stream, (ushort)Enums.SpellID.SpeedKick);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ViolentKick))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ViolentKick);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.CrackingSwipe))
client.MySpells.Add(stream, (ushort)Enums.SpellID.CrackingSwipe);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.DragonRoar))
client.MySpells.Add(stream, (ushort)Enums.SpellID.DragonRoar);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.DragonSlash))
client.MySpells.Add(stream, (ushort)Enums.SpellID.DragonSlash);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.SplittingSwipe))
client.MySpells.Add(stream, (ushort)Enums.SpellID.SplittingSwipe);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.StormKick))
client.MySpells.Add(stream, (ushort)Enums.SpellID.StormKick);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.DragonPunch))
client.MySpells.Add(stream, (ushort)Enums.SpellID.DragonPunch);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.DragonCyclone))
client.MySpells.Add(stream, (ushort)Enums.SpellID.DragonCyclone);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.DragonFlow))
client.MySpells.Add(stream, (ushort)Enums.SpellID.DragonFlow);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.AirRaid))
client.MySpells.Add(stream, (ushort)Enums.SpellID.AirRaid);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.AirSweep))
client.MySpells.Add(stream, (ushort)Enums.SpellID.AirSweep);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.AirKick))
client.MySpells.Add(stream, (ushort)Enums.SpellID.AirKick);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.AirStrike))
client.MySpells.Add(stream, (ushort)Enums.SpellID.AirStrike);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.EarthSweep))
client.MySpells.Add(stream, (ushort)Enums.SpellID.EarthSweep);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Kick))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Kick);
}
else if (Database.AtributesStatus.IsTaoist(client.Entity.Class))
{
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ChainBolt))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ChainBolt);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Lightning))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Lightning);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Thunder))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Thunder);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Cure))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Cure);
}
if (RebornClass != 132)
client.MySpells.Remove((ushort)Enums.SpellID.Pervade, stream);
client.MySpells.Remove((ushort)Enums.SpellID.FreezingArrow, stream);
client.MySpells.Remove((ushort)Enums.SpellID.PoisonousArrows, stream);
client.MySpells.Remove((ushort)Enums.SpellID.Compassion, stream);
}
}
else
{
foreach (var info in this)
{
if (info.Item1 == 0 && info.Item2 == 0 && info.Item3 == player.Class)
{
if (info.Item4 == Action.AllClassSpells)
{
foreach (var spellid in info.Item5)
{
if (!StaticSpells.Contains(spellid) && !PureSpells.Contains(spellid))
{
if (spellid == 12200)
{
if (player.FirstRebornClass == player.SecondRebornClass || player.SecondRebornClass == (player.Class + 4))
{
player.Owner.MySpells.Add(stream, spellid);
}
}
else if (spellid == 3090)
{
if (player.FirstRebornClass == player.SecondRebornClass || player.SecondRebornClass == (player.Class + 4))
{
player.Owner.MySpells.Add(stream, spellid);
}
}
else
player.Owner.MySpells.Add(stream, spellid);
}
}
}
}
}
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using ConquerVirusX.Game.MsgServer;
using ConquerVirusX.Network.GamePackets;
using ConquerVirusX.Game;
namespace ConquerVirusX.Database
{
public class RebornInfomations : List<Tuple<byte, byte, byte, RebornInfomations.Action, List<ushort>>>
{
public List<ushort> StaticSpells = new List<ushort>()
{
1360,1260,1290,5050,5040,5030,5020,5010,1045,1046,11000 ,11005,7000,7010,7020,7030,7040,11190,7001,7002,7003,1300
};
public List<ushort> PureSpells = new List<ushort>()
{
10405,30000,11040,6003,10315,10310,10311,10313,12300,13080
};
public enum Action : byte
{
Delete = 0,
Downgrade = 2,
AllClassSpells = 4,//???
PureSpell = 5,
Add = 6,
AddRebornSpells = 7
}
public void Load()
{
string[] baseplusText = File.ReadAllLines(Constants.DataHolderPath + "magictypeop.txt");
foreach (string line in baseplusText)
{
string[] data = line.Split(',');
byte Reborn = byte.Parse(data[1]);
byte MyClass = byte.Parse(data[2]);
byte RebornClass = byte.Parse(data[3]);
Action Info = (Action)byte.Parse(data[4]);
List<ushort> Spells = new List<ushort>();
for (int x = 5; x < data.Length; x++)
{
ushort ID = ushort.Parse(data[x]);
if (ID != 0)
Spells.Add(ID);
}
this.Add(new Tuple<byte, byte, byte, Action, List<ushort>>(Reborn, MyClass, RebornClass, Info, Spells));
}
}
public byte ExtraAtributePoints(byte level, byte mClass)
{
if (mClass == 135)
{
if (level <= 110)
return 0;
switch (level)
{
case 112: return 1;
case 114: return 3;
case 116: return 6;
case 118: return 10;
case 120: return 15;
case 121: return 15;
case 122: return 21;
case 123: return 21;
case 124: return 28;
case 125: return 28;
case 126: return 36;
case 127: return 36;
case 128: return 45;
case 129: return 45;
default:
return 55;
}
}
else
{
if (level <= 120)
return 0;
switch (level)
{
case 121: return 1;
case 122: return 3;
case 123: return 6;
case 124: return 10;
case 125: return 15;
case 126: return 21;
case 127: return 28;
case 128: return 36;
case 129: return 45;
default:
return 55;
}
}
}
public unsafe void Reborn(Game.Entity player, byte RebornClass, ServerSockets.Packet stream)
{
if (RebornClass != 0)
{
if (RebornClass % 10 == 1 || RebornClass == 132 || RebornClass == 142)
{
switch (player.Reborn)
{
case 0:
{
foreach (var info in this)
{
if (info.Item1 == 1 && info.Item2 == player.Class && info.Item3 == RebornClass)
{
switch (info.Item4)
{
case Action.AddRebornSpells:
case Action.Add:
{
foreach (var spellid in info.Item5)
player.Owner.MySpells.Add(stream, spellid);
break;
}
case Action.Delete:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.Remove(spellid, stream);
}
break;
}
case Action.Downgrade:
{
foreach (var spellid in info.Item5)
player.Owner.MySpells.RebornSpell(stream, spellid);
break;
}
}
}
}
player.FirstRebornLevel = (byte)player.Level;
player.FirstRebornClass = player.Class;
player.Class = player.Owner.GetCharClass(RebornClass);
player.Reborn = 1;
player.SendUpdate(stream, player.Reborn, Game.MsgServer.MsgUpdate.DataType.Reborn);
break;
}
case 1:
{
foreach (var info in this)
{
if (info.Item1 == 2 && info.Item2 == player.Class && info.Item3 == RebornClass)
{
switch (info.Item4)
{
case Action.AddRebornSpells:
case Action.Add:
{
foreach (var spellid in info.Item5)
player.Owner.MySpells.Add(stream, spellid);
break;
}
case Action.Delete:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.Remove(spellid, stream);
}
break;
}
case Action.Downgrade:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.RebornSpell(stream, spellid);
}
break;
}
}
}
}
player.SecondRebornLevel = (byte)player.Level;
player.SecondRebornClass = player.Class;
player.Class = player.Owner.GetCharClass(RebornClass);
player.Reborn = 2;
break;
}
case 2:
{
player.Owner.MySpells.ClearSpells(StaticSpells, stream);
byte RClass = 0;
if (player.SecondRebornClass == 135)
RClass = 132;
else if (player.SecondRebornClass == 145)
RClass = 142;
else
RClass = (byte)(player.SecondRebornClass - 4);
byte Twoclass = 0;
if (player.Class == 135)
Twoclass = 132;
else if (player.Class == 145)
Twoclass = 142;
else
Twoclass = (byte)(player.Class - 4);
foreach (var info in this)
{
if (info.Item1 == 0 && info.Item2 == 0 && info.Item3 == RClass)
{
switch (info.Item4)
{
case Action.AllClassSpells:
{
foreach (var spellid in info.Item5)
{
if (!StaticSpells.Contains(spellid) && !PureSpells.Contains(spellid))
{
if (spellid == 12200)
{
if (RClass == RebornClass || Twoclass == RClass)
{
player.Owner.MySpells.Add(stream, spellid);
}
}
else if (spellid == 3090)
{
if (RClass == RebornClass || Twoclass == RClass)
{
player.Owner.MySpells.Add(stream, spellid);
}
}
else
player.Owner.MySpells.Add(stream, spellid);
}
}
break;
}
}
}
}
foreach (var info in this)
{
if (info.Item1 == 0 && info.Item2 == RebornClass && info.Item3 == Twoclass)
{
switch (info.Item4)
{
case Action.PureSpell:
{
if (RClass == Twoclass && Twoclass == RebornClass)
{
foreach (var spellid in info.Item5)
{
if (!StaticSpells.Contains(spellid))
player.Owner.MySpells.Add(stream, spellid);
}
}
break;
}
}
}
}
foreach (var info in this)
{
if (info.Item1 == 1 && info.Item2 == player.SecondRebornClass && info.Item3 == Twoclass)
{
switch (info.Item4)
{
case Action.AddRebornSpells:
case Action.Add:
{
foreach (var spellid in info.Item5)
player.Owner.MySpells.Add(stream, spellid);
break;
}
case Action.Delete:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.Remove(spellid, stream);
}
break;
}
case Action.Downgrade:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.RebornSpell(stream, spellid);
}
break;
}
}
}
}
foreach (var info in this)
{
if (info.Item1 == 0 && info.Item2 == 0 && info.Item3 == Twoclass)
{
switch (info.Item4)
{
case Action.AllClassSpells:
{
foreach (var spellid in info.Item5)
{
if (!StaticSpells.Contains(spellid) && !PureSpells.Contains(spellid))
{
if (spellid == 12200)
{
if (RClass == RebornClass || Twoclass == RClass)
{
player.Owner.MySpells.Add(stream, spellid);
}
}
else if (spellid == 3090)
{
if (RClass == RebornClass || Twoclass == RClass)
{
player.Owner.MySpells.Add(stream, spellid);
}
}
else
player.Owner.MySpells.Add(stream, spellid);
}
}
break;
}
}
}
}
foreach (var info in this)
{
if (info.Item1 == 2 && info.Item2 == player.Class && info.Item3 == RebornClass)
{
switch (info.Item4)
{
case Action.AddRebornSpells:
case Action.Add:
{
foreach (var spellid in info.Item5)
player.Owner.MySpells.Add(stream, spellid);
break;
}
case Action.Delete:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.Remove(spellid, stream);
}
break;
}
case Action.Downgrade:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.RebornSpell(stream, spellid);
}
break;
}
}
}
}
player.FirstRebornLevel = player.SecondRebornLevel;
player.SecondRebornLevel = (byte)player.Level;
player.FirstRebornClass = player.SecondRebornClass;
player.SecondRebornClass = player.Class;
player.Class = player.Owner.GetCharClass(RebornClass);
player.Reincarnation = true;
break;
}
}
try
{
foreach (var item in player.Owner.Equipment.Objects)
{
if (item != null)
{
try
{
if (item.Position != (ushort)Network.GamePackets.ConquerItem.AlternateBottle
&& item.Position != (ushort)Network.GamePackets.ConquerItem.AlternateGarment
&& item.Position != (ushort)Network.GamePackets.ConquerItem.Bottle
&& item.Position != (ushort)Network.GamePackets.ConquerItem.Fan
&& item.Position != (ushort)Network.GamePackets.ConquerItem.Garment
&& item.Position != (ushort)Network.GamePackets.ConquerItem.LeftWeaponAccessory
&& item.Position != (ushort)Network.GamePackets.ConquerItem.SteedCrop
&& item.Position != (ushort)Network.GamePackets.ConquerItem.RightWeaponAccessory
&& item.Position != (ushort)Network.GamePackets.ConquerItem.Steed
&& item.Position != (ushort)Network.GamePackets.ConquerItem.SteedArmor
&& item.Position != (ushort)Network.GamePackets.ConquerItem.Tower)
{
Database.ConquerItemInformation cii = new Database.ConquerItemInformation(item.ID, item.Plus);
item.ID = cii.LowerThan(Network.PacketHandler.ItemMinLevel(Network.PacketHandler.ItemPosition(item.ID)));
item.Mode = Game.Enums.ItemMode.Update;
item.Send(player.Owner);
Database.ConquerItemTable.UpdateItemID(item);
}
}
catch (Exception e) { Console.WriteLine(e.ToString()); }
}
}
}
catch (Exception e) { Console.WriteLine(e.ToString()); }
player.Owner.Equipment.Remove((byte)Network.GamePackets.ConquerItem.LeftWeapon);
player.Owner.Equipment.Remove((byte)Network.GamePackets.ConquerItem.AlternateLeftWeapon);
ClientEquip Equi = new ClientEquip();
Equi.DoEquips(player.Owner);
player.Owner.Send(Equi);
player.Level = 15;
player.Experience = Kernel.LevelInfo[Database.DBLevExp.Sort.User][(byte)(player.Level - 1)].Experience;
player.SendUpdate(stream, (long)player.Experience, Game.MsgServer.MsgUpdate.DataType.Experience);
ConquerItem hand = player.Owner.Equipment.TryGetItem(5);
if (hand != null)
{
player.Owner.Equipment.Remove(5);
player.Owner.CalculateHitPoint();
player.Owner.CalculateMana();
player.Owner.LoadItemStats();
player.Owner.SendScreen(player.Owner.Entity.SpawnPacket, false);
}
hand = player.Owner.Equipment.TryGetItem(4);
if (hand != null)
{
player.Owner.Equipment.Remove(4);
player.Owner.CalculateHitPoint();
player.Owner.CalculateMana();
player.Owner.LoadItemStats();
player.Owner.SendScreen(player.Owner.Entity.SpawnPacket, false);
}
player.SendUpdate(stream, player.Level, Game.MsgServer.MsgUpdate.DataType.Level);
// Database.DataCore.AtributeStatus.GetStatus(player, true);
player.Strength = player.Agility = player.Spirit = 0;
player.Vitality = 1;
if (player.Reborn == 1)
{
player.Atributes = (ushort)(Program.RebornInfo.ExtraAtributePoints(player.FirstRebornLevel, player.FirstRebornClass)
+ 52 + 3 * (player.Level - 15) + player.ExtraAtributes);
}
else
{
player.Atributes = (ushort)(Program.RebornInfo.ExtraAtributePoints(player.FirstRebornLevel, player.FirstRebornClass) +
Program.RebornInfo.ExtraAtributePoints(player.SecondRebornLevel, player.SecondRebornClass) + 52 + 3 * (player.Level - 15) + player.ExtraAtributes);
}
player.SendUpdate(stream, player.Strength, Game.MsgServer.MsgUpdate.DataType.Strength);
player.SendUpdate(stream, player.Agility, Game.MsgServer.MsgUpdate.DataType.Agility);
player.SendUpdate(stream, player.Spirit, Game.MsgServer.MsgUpdate.DataType.Spirit);
player.SendUpdate(stream, player.Vitality, Game.MsgServer.MsgUpdate.DataType.Vitality);
player.SendUpdate(stream, player.Atributes, Game.MsgServer.MsgUpdate.DataType.Atributes);
player.SendUpdate(stream, player.FirstRebornClass, Game.MsgServer.MsgUpdate.DataType.FirsRebornClass);
player.SendUpdate(stream, player.SecondRebornClass, Game.MsgServer.MsgUpdate.DataType.SecondRebornClass);
ClientEquip eqs = new ClientEquip();
eqs.DoEquips(player.Owner);
player.Owner.Send(eqs);
var client = player.Owner;
client.Entity.RemoveFlag(MsgUpdate.Flags.ChillingSnow);
client.Entity.RemoveFlag(MsgUpdate.Flags.HealingSnow);
if (Database.AtributesStatus.IsTrojan(client.Entity.Class))
{
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.FastBlader))
client.MySpells.Add(stream, (ushort)Enums.SpellID.FastBlader);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ScrenSword))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ScrenSword);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Cyclone))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Cyclone);
}
else if (Database.AtributesStatus.IsWindWalker(client.Entity.Class))
{
if (client.Entity.FirstRebornClass == 165 && client.Entity.SecondRebornClass == 165)
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.FrostGazeIII))
client.MySpells.Add(stream, (ushort)Enums.SpellID.FrostGazeIII);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Omnipotence))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Omnipotence);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.JusticeChant))
client.MySpells.Add(stream, (ushort)Enums.SpellID.JusticeChant);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.SwirlingStorm))
client.MySpells.Add(stream, (ushort)Enums.SpellID.SwirlingStorm);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ShadowofChaser))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ShadowofChaser);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.BurntFrost))
client.MySpells.Add(stream, (ushort)Enums.SpellID.BurntFrost);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.HealingSnow))
client.MySpells.Add(stream, (ushort)Enums.SpellID.HealingSnow);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.RageofWar))
client.MySpells.Add(stream, (ushort)Enums.SpellID.RageofWar);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.HorrorofStomper))
client.MySpells.Add(stream, (ushort)Enums.SpellID.HorrorofStomper);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.TripleBlasts))
client.MySpells.Add(stream, (ushort)Enums.SpellID.TripleBlasts);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Thundercloud))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Thundercloud);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.PeaceofStomper))
client.MySpells.Add(stream, (ushort)Enums.SpellID.PeaceofStomper);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ChillingSnow))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ChillingSnow);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.RevengeTail))
client.MySpells.Add(stream, (ushort)Enums.SpellID.RevengeTail);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.FreezingPelter))
client.MySpells.Add(stream, (ushort)Enums.SpellID.FreezingPelter);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Thunderbolt))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Thunderbolt);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.AngerofStomper))
client.MySpells.Add(stream, (ushort)Enums.SpellID.AngerofStomper);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.JusticeChant))
client.MySpells.Add(stream, (ushort)Enums.SpellID.JusticeChant);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Circle))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Circle);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Rectangle))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Rectangle);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Sector))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Sector);
}
else if (Database.AtributesStatus.IsWarrior(client.Entity.Class))
{
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Superman))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Superman);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.FastBlader))
client.MySpells.Add(stream, (ushort)Enums.SpellID.FastBlader);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ScrenSword))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ScrenSword);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Shield))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Shield);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Accuracy))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Accuracy);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ScarofEarth))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ScarofEarth);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.TwistofWar))
client.MySpells.Add(stream, (ushort)Enums.SpellID.TwistofWar);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Backfire))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Backfire);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.WaveofBlood))
client.MySpells.Add(stream, (ushort)Enums.SpellID.WaveofBlood);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ManiacDance))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ManiacDance);
}
else if (Database.AtributesStatus.IsArcher(client.Entity.Class))
{
client.MySpells.Add(stream, (ushort)Enums.SpellID.XpFly);
}
else if (Database.AtributesStatus.IsNinja(client.Entity.Class))
{
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.FatalStrike))
client.MySpells.Add(stream, (ushort)Enums.SpellID.FatalStrike);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.GapingWounds))
client.MySpells.Add(stream, (ushort)Enums.SpellID.GapingWounds);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.TwofoldBlades))
client.MySpells.Add(stream, (ushort)Enums.SpellID.TwofoldBlades);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.SuperTwofoldBlade))
client.MySpells.Add(stream, (ushort)Enums.SpellID.SuperTwofoldBlade);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ToxicFog))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ToxicFog);
}
else if (Database.AtributesStatus.IsMonk(client.Entity.Class))
{
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.WhirlwindKick))
client.MySpells.Add(stream, (ushort)Enums.SpellID.WhirlwindKick);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.TripleAttack))
client.MySpells.Add(stream, (ushort)Enums.SpellID.TripleAttack);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Oblivion))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Oblivion);
}
else if (Database.AtributesStatus.IsPirate(client.Entity.Class))
{
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.CannonBarrage))
client.MySpells.Add(stream, (ushort)Enums.SpellID.CannonBarrage);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.BladeTempest))
client.MySpells.Add(stream, (ushort)Enums.SpellID.BladeTempest);
}
else if (Database.AtributesStatus.IsLee(client.Entity.Class))
{
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.SpeedKick))
client.MySpells.Add(stream, (ushort)Enums.SpellID.SpeedKick);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ViolentKick))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ViolentKick);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.CrackingSwipe))
client.MySpells.Add(stream, (ushort)Enums.SpellID.CrackingSwipe);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.DragonRoar))
client.MySpells.Add(stream, (ushort)Enums.SpellID.DragonRoar);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.DragonSlash))
client.MySpells.Add(stream, (ushort)Enums.SpellID.DragonSlash);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.SplittingSwipe))
client.MySpells.Add(stream, (ushort)Enums.SpellID.SplittingSwipe);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.StormKick))
client.MySpells.Add(stream, (ushort)Enums.SpellID.StormKick);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.DragonPunch))
client.MySpells.Add(stream, (ushort)Enums.SpellID.DragonPunch);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.DragonCyclone))
client.MySpells.Add(stream, (ushort)Enums.SpellID.DragonCyclone);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.DragonFlow))
client.MySpells.Add(stream, (ushort)Enums.SpellID.DragonFlow);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.AirRaid))
client.MySpells.Add(stream, (ushort)Enums.SpellID.AirRaid);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.AirSweep))
client.MySpells.Add(stream, (ushort)Enums.SpellID.AirSweep);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.AirKick))
client.MySpells.Add(stream, (ushort)Enums.SpellID.AirKick);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.AirStrike))
client.MySpells.Add(stream, (ushort)Enums.SpellID.AirStrike);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.EarthSweep))
client.MySpells.Add(stream, (ushort)Enums.SpellID.EarthSweep);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Kick))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Kick);
}
else if (Database.AtributesStatus.IsTaoist(client.Entity.Class))
{
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ChainBolt))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ChainBolt);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Lightning))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Lightning);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Thunder))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Thunder);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.Cure))
client.MySpells.Add(stream, (ushort)Enums.SpellID.Cure);
}
if (RebornClass != 132)
client.MySpells.Remove((ushort)Enums.SpellID.Pervade, stream);
client.MySpells.Remove((ushort)Enums.SpellID.FreezingArrow, stream);
client.MySpells.Remove((ushort)Enums.SpellID.PoisonousArrows, stream);
client.MySpells.Remove((ushort)Enums.SpellID.Compassion, stream);
}
}
else
{
foreach (var info in this)
{
if (info.Item1 == 0 && info.Item2 == 0 && info.Item3 == player.Class)
{
if (info.Item4 == Action.AllClassSpells)
{
foreach (var spellid in info.Item5)
{
if (!StaticSpells.Contains(spellid) && !PureSpells.Contains(spellid))
{
if (spellid == 12200)
{
if (player.FirstRebornClass == player.SecondRebornClass || player.SecondRebornClass == (player.Class + 4))
{
player.Owner.MySpells.Add(stream, spellid);
}
}
else if (spellid == 3090)
{
if (player.FirstRebornClass == player.SecondRebornClass || player.SecondRebornClass == (player.Class + 4))
{
player.Owner.MySpells.Add(stream, spellid);
}
}
else
player.Owner.MySpells.Add(stream, spellid);
}
}
}
}
}
}
}
}
}
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
اضافت اشكال في القنصل خوش وافهم | ElSaher | تطوير سيرفرات كونكر | 27 | 2024-09-30 08:35 AM |
حل مشكلة الوحوش مش بيندرب فيها وا بيجيلك ايرور في القنصل الحل هنا | ElSaher | تطوير سيرفرات كونكر | 20 | 2024-08-29 09:11 AM |
4ايرور في القنصل | ElSaher | مشكلات السيرفيرات كونكر الشخصيه | 3 | 2020-01-31 04:29 AM |
يارجاله دلؤتي restart مش شغال في السيرفر عندي ولما بقفل القنصل الانر بور بيتمسح | ahmedfathy | مشكلات السيرفيرات كونكر الشخصيه | 1 | 2019-10-25 01:43 PM |
ايرورات في القنصل | ElSaher | مشكلات السيرفيرات كونكر الشخصيه | 4 | 2019-08-24 09:49 PM |