|
|
المشاركات 226 |
+التقييم 0.12 |
تاريخ التسجيل Jul 2019 |
الاقامة |
نظام التشغيل |
رقم العضوية 438 |
class RebornInfomations
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Rayzo.Game.MsgServer;
using Rayzo.Network.GamePackets;
using Rayzo.Game;
namespace Rayzo.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 RebornInfomations.Action.AddRebornSpells:
case RebornInfomations.Action.Add:
{
foreach (var spellid in info.Item5)
player.Owner.MySpells.Add(stream, spellid);
break;
}
case RebornInfomations.Action.Delete:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.Remove(spellid, stream);
}
break;
}
case RebornInfomations.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 RebornInfomations.Action.AddRebornSpells:
case RebornInfomations.Action.Add:
{
foreach (var spellid in info.Item5)
player.Owner.MySpells.Add(stream, spellid);
break;
}
case RebornInfomations.Action.Delete:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.Remove(spellid, stream);
}
break;
}
case RebornInfomations.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 RebornInfomations.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 RebornInfomations.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 RebornInfomations.Action.AddRebornSpells:
case RebornInfomations.Action.Add:
{
foreach (var spellid in info.Item5)
player.Owner.MySpells.Add(stream, spellid);
break;
}
case RebornInfomations.Action.Delete:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.Remove(spellid, stream);
}
break;
}
case RebornInfomations.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 RebornInfomations.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 RebornInfomations.Action.AddRebornSpells:
case RebornInfomations.Action.Add:
{
foreach (var spellid in info.Item5)
player.Owner.MySpells.Add(stream, spellid);
break;
}
case RebornInfomations.Action.Delete:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.Remove(spellid, stream);
}
break;
}
case RebornInfomations.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.PlayerProto(player.Owner.Entity), 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.PlayerProto(player.Owner.Entity), false);
}
MsgActionProto Action = new MsgActionProto();
Action.ID = MsgActionEmulator.Leveled;
Action.UID = player.UID;
Action.dwParam = (uint)player.Level;
Action.TimeStamp = (uint)Time32.Now.GetHashCode();
player.Send(MsgActionEmulator.SendPacket(Action));
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 + player.MysteryFruit);
}
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.MysteryFruit);
}
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.IsThunderstriker(client.Entity.Class))
{
if (client.Entity.Class == 95)
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.LightningShield))
client.MySpells.Add(stream, (ushort)Enums.SpellID.LightningShield);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ThunderBlast))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ThunderBlast);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.CrackingShock))
client.MySpells.Add(stream, (ushort)Enums.SpellID.CrackingShock);
if (!client.MySpells.ClientSpells.ContainsKey(15700))
client.MySpells.Add(stream, 15700);
}
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);
}
}
}
}
}
}
#region rem r i d e r
using (var rec = new ServerSockets.RecycledPacket())
{
var saw = rec.GetStream();
{
#region test ruen remove
foreach (var item in player.Owner.Entity.RuneItem.Values)
{
if (item.Position >= 100 || item.Position <= 125)
{
item.Position = (ushort)211;
player.Owner.Entity.RuneItem[item.UID].Position = (ushort)211;
ConquerItemTable.UpdatePosition(item);
player.Owner.Send(item);
if (player.Owner.MySpells.ClientSpells.ContainsKey((ushort)(uint)(RuneItems.RuneSkillID(item.ID) / 100)))
player.Owner.MySpells.Remove((ushort)(ushort)(uint)(RuneItems.RuneSkillID(item.ID) / 100), null);
ItemUsage usage = new ItemUsage(true) { ID = ItemUsage.UnequipItem };
//test
usage.UID = item.Position;
player.Owner.Send(usage);
}
}
#endregion
#region runes
if (player.Owner.MySpells.ClientSpells.ContainsKey(14250))
{
player.Owner.MySpells.Remove(14250, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(14440))
{
player.Owner.MySpells.Remove(14440, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(14410))
{
player.Owner.MySpells.Remove(14410, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(1250))
{
player.Owner.MySpells.Remove(1250, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(14530))
{
player.Owner.MySpells.Remove(14530, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(14260))
{
player.Owner.MySpells.Remove(14260, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(15780))
{
player.Owner.MySpells.Remove(15780, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(14380))
{
player.Owner.MySpells.Remove(14380, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(11180))
{
player.Owner.MySpells.Remove(11180, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(14220))
{
player.Owner.MySpells.Remove(14220, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(14160))
{
player.Owner.MySpells.Remove(14160, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(14160))
{
player.Owner.MySpells.Remove(14160, saw);
}
#endregion
#region tr
if (player.Owner.Entity.Class > 15 || player.Owner.Entity.Class < 10)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(11986))
{
player.Owner.MySpells.Remove(11986, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(11990))
{
player.Owner.MySpells.Remove(11990, stream);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(13440))
{
player.Owner.MySpells.Remove(13440, stream);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(11960))
{
player.Owner.MySpells.Remove(11960, stream);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(1250))
{
player.Owner.MySpells.Remove(1250, stream);
}
}
#endregion
#region mo
if (player.Owner.Entity.Class > 65 || player.Owner.Entity.Class < 60)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(12550))
{
player.Owner.MySpells.Remove(12550, stream);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(12560))
{
player.Owner.MySpells.Remove(12560, stream);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(12570))
{
player.Owner.MySpells.Remove(12570, stream);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(14160))
{
player.Owner.MySpells.Remove(14160, stream);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(10490))
{
player.Owner.MySpells.Remove(10490, stream);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(10425))
{
player.Owner.MySpells.Remove(10425, stream);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(10425))
player.Owner.MySpells.Remove(10425, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10420))
player.Owner.MySpells.Remove(10420, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10421))
player.Owner.MySpells.Remove(10421, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10422))
player.Owner.MySpells.Remove(10422, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10423))
player.Owner.MySpells.Remove(10423, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10424))
player.Owner.MySpells.Remove(10424, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10405))
player.Owner.MySpells.Remove(10405, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10410))
player.Owner.MySpells.Remove(10410, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10415))
player.Owner.MySpells.Remove(10415, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10395))
player.Owner.MySpells.Remove(10395, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10381))
player.Owner.MySpells.Remove(10381, stream);
}
#endregion
#region nin
if (player.Owner.Entity.Class > 55 || player.Owner.Entity.Class < 50)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(6011))
player.Owner.MySpells.Remove(6011, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(6003))
player.Owner.MySpells.Remove(6003, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(6002))
player.Owner.MySpells.Remove(6002, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(6010))
player.Owner.MySpells.Remove(6010, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(6000))
player.Owner.MySpells.Remove(6000, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12070))
player.Owner.MySpells.Remove(12070, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12080))
player.Owner.MySpells.Remove(12080, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12090))
player.Owner.MySpells.Remove(12090, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(6004))
player.Owner.MySpells.Remove(6004, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(11170))
player.Owner.MySpells.Remove(11170, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(11180))
player.Owner.MySpells.Remove(11180, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12110))
player.Owner.MySpells.Remove(12110, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14410))
player.Owner.MySpells.Remove(14410, stream);
}
#endregion
#region ar
if (player.Owner.Entity.Class > 45 || player.Owner.Entity.Class < 40)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(11670))
player.Owner.MySpells.Remove(11670, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14280))
player.Owner.MySpells.Remove(14280, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(11660))
player.Owner.MySpells.Remove(11660, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(11650))
player.Owner.MySpells.Remove(11650, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(11620))
player.Owner.MySpells.Remove(11620, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(11610))
player.Owner.MySpells.Remove(11610, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(11600))
player.Owner.MySpells.Remove(11600, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(11590))
player.Owner.MySpells.Remove(11590, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(8000))
player.Owner.MySpells.Remove(8000, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(8001))
player.Owner.MySpells.Remove(8001, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(8003))
player.Owner.MySpells.Remove(8003, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14380))
player.Owner.MySpells.Remove(14380, stream);
}
#endregion
#region w
if (player.Owner.Entity.Class > 25 || player.Owner.Entity.Class < 20)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(12700))
player.Owner.MySpells.Remove(12700, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12690))
player.Owner.MySpells.Remove(12690, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12680))
player.Owner.MySpells.Remove(12680, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12670))
player.Owner.MySpells.Remove(12670, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12660))
player.Owner.MySpells.Remove(12660, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14270))
player.Owner.MySpells.Remove(14270, stream);
}
#endregion
#region wt
if (player.Owner.Entity.Class > 135 || player.Owner.Entity.Class < 130)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(1175))
player.Owner.MySpells.Remove(1175, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14320))
player.Owner.MySpells.Remove(14320, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14500))
player.Owner.MySpells.Remove(14500, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(1170))
player.Owner.MySpells.Remove(1170, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12390))
player.Owner.MySpells.Remove(12390, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12370))
player.Owner.MySpells.Remove(12370, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(30000))
player.Owner.MySpells.Remove(30000, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(1100))
player.Owner.MySpells.Remove(1100, stream);
}
#endregion
#region ft
if (player.Owner.Entity.Class > 145 || player.Owner.Entity.Class < 140)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(1002))
player.Owner.MySpells.Remove(1002, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(1180))
player.Owner.MySpells.Remove(1180, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(1165))
player.Owner.MySpells.Remove(1165, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(1160))
player.Owner.MySpells.Remove(1160, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(1150))
player.Owner.MySpells.Remove(1150, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(1120))
player.Owner.MySpells.Remove(1120, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12400))
player.Owner.MySpells.Remove(12400, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12380))
player.Owner.MySpells.Remove(12380, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14220))
player.Owner.MySpells.Remove(14220, stream);
}
#endregion
#region pi
if (player.Owner.Entity.Class > 75 || player.Owner.Entity.Class < 70)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(11030))
player.Owner.MySpells.Remove(11030, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(11110))
player.Owner.MySpells.Remove(11110, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14710))
player.Owner.MySpells.Remove(14710, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14680))
player.Owner.MySpells.Remove(14680, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14720))
player.Owner.MySpells.Remove(14720, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14270))
player.Owner.MySpells.Remove(14270, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14250))
player.Owner.MySpells.Remove(14250, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14440))
player.Owner.MySpells.Remove(14440, stream);
}
#endregion
#region DW
if (player.Owner.Entity.Class > 85 || player.Owner.Entity.Class < 80)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(12300))
player.Owner.MySpells.Remove(12300, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14470))
player.Owner.MySpells.Remove(14470, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12120))
player.Owner.MySpells.Remove(12120, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12130))
player.Owner.MySpells.Remove(12130, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12140))
player.Owner.MySpells.Remove(12140, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12160))
player.Owner.MySpells.Remove(12160, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12170))
player.Owner.MySpells.Remove(12170, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12200))
player.Owner.MySpells.Remove(12200, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12240))
player.Owner.MySpells.Remove(12240, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12350))
player.Owner.MySpells.Remove(12350, stream);
}
#endregion
#region ww
if (player.Owner.Entity.Class > 165 || player.Owner.Entity.Class < 160)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(12980))
player.Owner.MySpells.Remove(12980, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12940))
player.Owner.MySpells.Remove(12940, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12950))
player.Owner.MySpells.Remove(12950, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12930))
player.Owner.MySpells.Remove(12930, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12990))
player.Owner.MySpells.Remove(12990, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12960))
player.Owner.MySpells.Remove(12960, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(13000))
player.Owner.MySpells.Remove(13000, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(13030))
player.Owner.MySpells.Remove(13030, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(13020))
player.Owner.MySpells.Remove(13020, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12890))
player.Owner.MySpells.Remove(12890, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(13090))
player.Owner.MySpells.Remove(13090, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12850))
player.Owner.MySpells.Remove(12850, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12840))
player.Owner.MySpells.Remove(12840, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12970))
player.Owner.MySpells.Remove(12970, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(13080))
player.Owner.MySpells.Remove(13080, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12860))
player.Owner.MySpells.Remove(12860, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12870))
player.Owner.MySpells.Remove(12870, stream);
}
#endregion
#region pi
if (player.Owner.Entity.Class > 95 || player.Owner.Entity.Class < 90)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(15790))
player.Owner.MySpells.Remove(15790, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(15750))
player.Owner.MySpells.Remove(15750, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(15780))
player.Owner.MySpells.Remove(15780, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(15720))
player.Owner.MySpells.Remove(15720, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(15710))
player.Owner.MySpells.Remove(15710, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(15800))
player.Owner.MySpells.Remove(15800, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(15810))
player.Owner.MySpells.Remove(15810, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(15770))
player.Owner.MySpells.Remove(15770, stream);
}
#endregion
}
}
#endregion
}
public unsafe void RiderReborn(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 RebornInfomations.Action.AddRebornSpells:
case RebornInfomations.Action.Add:
{
foreach (var spellid in info.Item5)
player.Owner.MySpells.Add(stream, spellid);
break;
}
case RebornInfomations.Action.Delete:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.Remove(spellid, stream);
}
break;
}
case RebornInfomations.Action.Downgrade:
{
foreach (var spellid in info.Item5)
player.Owner.MySpells.RebornSpell(stream, spellid);
break;
}
}
}
}
player.SecondRebornClass = player.FirstRebornClass;
player.SecondRebornLevel = player.FirstRebornLevel;
player.FirstRebornLevel = (byte)player.Level;
player.FirstRebornClass = player.Class;
player.Class = 91;
player.Reborn = 2;
player.Reincarnation = true;
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 RebornInfomations.Action.AddRebornSpells:
case RebornInfomations.Action.Add:
{
foreach (var spellid in info.Item5)
player.Owner.MySpells.Add(stream, spellid);
break;
}
case RebornInfomations.Action.Delete:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.Remove(spellid, stream);
}
break;
}
case RebornInfomations.Action.Downgrade:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.RebornSpell(stream, spellid);
}
break;
}
}
}
}
player.SecondRebornClass = player.FirstRebornClass;
player.SecondRebornLevel = player.FirstRebornLevel;
player.FirstRebornLevel = (byte)player.Level;
player.FirstRebornClass = player.Class;
player.Class = 91;
player.Reborn = 2;
player.Reincarnation = true;
player.SendUpdate(stream, player.Reborn, Game.MsgServer.MsgUpdate.DataType.Reborn);
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 RebornInfomations.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 RebornInfomations.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 RebornInfomations.Action.AddRebornSpells:
case RebornInfomations.Action.Add:
{
foreach (var spellid in info.Item5)
player.Owner.MySpells.Add(stream, spellid);
break;
}
case RebornInfomations.Action.Delete:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.Remove(spellid, stream);
}
break;
}
case RebornInfomations.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 RebornInfomations.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 RebornInfomations.Action.AddRebornSpells:
case RebornInfomations.Action.Add:
{
foreach (var spellid in info.Item5)
player.Owner.MySpells.Add(stream, spellid);
break;
}
case RebornInfomations.Action.Delete:
{
foreach (var spellid in info.Item5)
{
player.Owner.MySpells.Remove(spellid, stream);
}
break;
}
case RebornInfomations.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.PlayerProto(player.Owner.Entity), 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.PlayerProto(player.Owner.Entity), false);
}
MsgActionProto Action = new MsgActionProto();
Action.ID = MsgActionEmulator.Leveled;
Action.UID = player.UID;
Action.dwParam = (uint)player.Level;
Action.TimeStamp = (uint)Time32.Now.GetHashCode();
player.Send(MsgActionEmulator.SendPacket(Action));
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 + player.MysteryFruit);
}
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.MysteryFruit);
}
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.IsThunderstriker(client.Entity.Class))
{
if ( client.Entity.Class == 95)
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.LightningShield))
client.MySpells.Add(stream, (ushort)Enums.SpellID.LightningShield);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.ThunderBlast))
client.MySpells.Add(stream, (ushort)Enums.SpellID.ThunderBlast);
if (!client.MySpells.ClientSpells.ContainsKey((ushort)Enums.SpellID.CrackingShock))
client.MySpells.Add(stream, (ushort)Enums.SpellID.CrackingShock);
if (!client.MySpells.ClientSpells.ContainsKey(15700))
client.MySpells.Add(stream, 15700);
}
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);
}
}
}
}
}
}
#region rem r i d e r
using (var rec = new ServerSockets.RecycledPacket())
{
var saw = rec.GetStream();
{
#region test ruen remove
foreach (var item in player.Owner.Entity.RuneItem.Values)
{
if (item.Position >= 100 || item.Position <= 125)
{
item.Position = (ushort)211;
player.Owner.Entity.RuneItem[item.UID].Position = (ushort)211;
ConquerItemTable.UpdatePosition(item);
player.Owner.Send(item);
if (player.Owner.MySpells.ClientSpells.ContainsKey((ushort)(uint)(RuneItems.RuneSkillID(item.ID) / 100)))
player.Owner.MySpells.Remove((ushort)(ushort)(uint)(RuneItems.RuneSkillID(item.ID) / 100), null);
ItemUsage usage = new ItemUsage(true) { ID = ItemUsage.UnequipItem };
//test
usage.UID = item.Position;
player.Owner.Send(usage);
}
}
#endregion
#region runes
if (player.Owner.MySpells.ClientSpells.ContainsKey(14250))
{
player.Owner.MySpells.Remove(14250, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(14440))
{
player.Owner.MySpells.Remove(14440, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(14410))
{
player.Owner.MySpells.Remove(14410, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(1250))
{
player.Owner.MySpells.Remove(1250, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(14530))
{
player.Owner.MySpells.Remove(14530, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(14260))
{
player.Owner.MySpells.Remove(14260, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(15780))
{
player.Owner.MySpells.Remove(15780, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(14380))
{
player.Owner.MySpells.Remove(14380, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(11180))
{
player.Owner.MySpells.Remove(11180, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(14220))
{
player.Owner.MySpells.Remove(14220, saw);
}
#endregion
#region tr
if (player.Owner.Entity.Class > 15 || player.Owner.Entity.Class < 10)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(11986))
{
player.Owner.MySpells.Remove(11986, saw);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(11990))
{
player.Owner.MySpells.Remove(11990, stream);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(13440))
{
player.Owner.MySpells.Remove(13440, stream);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(11960))
{
player.Owner.MySpells.Remove(11960, stream);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(1250))
{
player.Owner.MySpells.Remove(1250, stream);
}
}
#endregion
#region mo
if (player.Owner.Entity.Class > 65 || player.Owner.Entity.Class < 60)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(12550))
{
player.Owner.MySpells.Remove(12550, stream);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(12560))
{
player.Owner.MySpells.Remove(12560, stream);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(12570))
{
player.Owner.MySpells.Remove(12570, stream);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(14160))
{
player.Owner.MySpells.Remove(14160, stream);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(10490))
{
player.Owner.MySpells.Remove(10490, stream);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(10425))
{
player.Owner.MySpells.Remove(10425, stream);
}
if (player.Owner.MySpells.ClientSpells.ContainsKey(10425))
player.Owner.MySpells.Remove(10425, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10420))
player.Owner.MySpells.Remove(10420, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10421))
player.Owner.MySpells.Remove(10421, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10422))
player.Owner.MySpells.Remove(10422, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10423))
player.Owner.MySpells.Remove(10423, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10424))
player.Owner.MySpells.Remove(10424, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10405))
player.Owner.MySpells.Remove(10405, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10410))
player.Owner.MySpells.Remove(10410, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10415))
player.Owner.MySpells.Remove(10415, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10395))
player.Owner.MySpells.Remove(10395, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(10381))
player.Owner.MySpells.Remove(10381, stream);
}
#endregion
#region nin
if (player.Owner.Entity.Class > 55 || player.Owner.Entity.Class < 50)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(6011))
player.Owner.MySpells.Remove(6011, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(6003))
player.Owner.MySpells.Remove(6003, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(6002))
player.Owner.MySpells.Remove(6002, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(6010))
player.Owner.MySpells.Remove(6010, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(6000))
player.Owner.MySpells.Remove(6000, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12070))
player.Owner.MySpells.Remove(12070, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12080))
player.Owner.MySpells.Remove(12080, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12090))
player.Owner.MySpells.Remove(12090, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(6004))
player.Owner.MySpells.Remove(6004, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(11170))
player.Owner.MySpells.Remove(11170, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(11180))
player.Owner.MySpells.Remove(11180, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12110))
player.Owner.MySpells.Remove(12110, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14410))
player.Owner.MySpells.Remove(14410, stream);
}
#endregion
#region ar
if (player.Owner.Entity.Class > 45 || player.Owner.Entity.Class < 40)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(11670))
player.Owner.MySpells.Remove(11670, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14280))
player.Owner.MySpells.Remove(14280, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(11660))
player.Owner.MySpells.Remove(11660, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(11650))
player.Owner.MySpells.Remove(11650, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(11620))
player.Owner.MySpells.Remove(11620, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(11610))
player.Owner.MySpells.Remove(11610, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(11600))
player.Owner.MySpells.Remove(11600, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(11590))
player.Owner.MySpells.Remove(11590, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(8000))
player.Owner.MySpells.Remove(8000, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(8001))
player.Owner.MySpells.Remove(8001, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(8003))
player.Owner.MySpells.Remove(8003, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14380))
player.Owner.MySpells.Remove(14380, stream);
}
#endregion
#region w
if (player.Owner.Entity.Class > 25 || player.Owner.Entity.Class < 20)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(12700))
player.Owner.MySpells.Remove(12700, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12690))
player.Owner.MySpells.Remove(12690, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12680))
player.Owner.MySpells.Remove(12680, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12670))
player.Owner.MySpells.Remove(12670, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12660))
player.Owner.MySpells.Remove(12660, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14270))
player.Owner.MySpells.Remove(14270, stream);
}
#endregion
#region wt
if (player.Owner.Entity.Class > 135 || player.Owner.Entity.Class < 130)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(1175))
player.Owner.MySpells.Remove(1175, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14320))
player.Owner.MySpells.Remove(14320, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14500))
player.Owner.MySpells.Remove(14500, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(1170))
player.Owner.MySpells.Remove(1170, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12390))
player.Owner.MySpells.Remove(12390, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12370))
player.Owner.MySpells.Remove(12370, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(30000))
player.Owner.MySpells.Remove(30000, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(1100))
player.Owner.MySpells.Remove(1100, stream);
}
#endregion
#region ft
if (player.Owner.Entity.Class > 145 || player.Owner.Entity.Class < 140)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(1002))
player.Owner.MySpells.Remove(1002, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(1180))
player.Owner.MySpells.Remove(1180, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(1165))
player.Owner.MySpells.Remove(1165, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(1160))
player.Owner.MySpells.Remove(1160, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(1150))
player.Owner.MySpells.Remove(1150, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(1120))
player.Owner.MySpells.Remove(1120, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12400))
player.Owner.MySpells.Remove(12400, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12380))
player.Owner.MySpells.Remove(12380, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14220))
player.Owner.MySpells.Remove(14220, stream);
}
#endregion
#region pi
if (player.Owner.Entity.Class > 75 || player.Owner.Entity.Class < 70)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(11030))
player.Owner.MySpells.Remove(11030, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(11110))
player.Owner.MySpells.Remove(11110, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14710))
player.Owner.MySpells.Remove(14710, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14680))
player.Owner.MySpells.Remove(14680, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14720))
player.Owner.MySpells.Remove(14720, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14270))
player.Owner.MySpells.Remove(14270, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14250))
player.Owner.MySpells.Remove(14250, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14440))
player.Owner.MySpells.Remove(14440, stream);
}
#endregion
#region DW
if (player.Owner.Entity.Class > 85 || player.Owner.Entity.Class < 80)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(12300))
player.Owner.MySpells.Remove(12300, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(14470))
player.Owner.MySpells.Remove(14470, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12120))
player.Owner.MySpells.Remove(12120, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12130))
player.Owner.MySpells.Remove(12130, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12140))
player.Owner.MySpells.Remove(12140, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12160))
player.Owner.MySpells.Remove(12160, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12170))
player.Owner.MySpells.Remove(12170, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12200))
player.Owner.MySpells.Remove(12200, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12240))
player.Owner.MySpells.Remove(12240, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12350))
player.Owner.MySpells.Remove(12350, stream);
}
#endregion
#region ww
if (player.Owner.Entity.Class > 165 || player.Owner.Entity.Class < 160)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(12980))
player.Owner.MySpells.Remove(12980, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12940))
player.Owner.MySpells.Remove(12940, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12950))
player.Owner.MySpells.Remove(12950, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12930))
player.Owner.MySpells.Remove(12930, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12990))
player.Owner.MySpells.Remove(12990, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12960))
player.Owner.MySpells.Remove(12960, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(13000))
player.Owner.MySpells.Remove(13000, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(13030))
player.Owner.MySpells.Remove(13030, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(13020))
player.Owner.MySpells.Remove(13020, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12890))
player.Owner.MySpells.Remove(12890, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(13090))
player.Owner.MySpells.Remove(13090, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12850))
player.Owner.MySpells.Remove(12850, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12840))
player.Owner.MySpells.Remove(12840, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12970))
player.Owner.MySpells.Remove(12970, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(13080))
player.Owner.MySpells.Remove(13080, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12860))
player.Owner.MySpells.Remove(12860, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(12870))
player.Owner.MySpells.Remove(12870, stream);
}
#endregion
#region pi
if (player.Owner.Entity.Class > 95 || player.Owner.Entity.Class < 90)
{
if (player.Owner.MySpells.ClientSpells.ContainsKey(15790))
player.Owner.MySpells.Remove(15790, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(15750))
player.Owner.MySpells.Remove(15750, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(15780))
player.Owner.MySpells.Remove(15780, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(15720))
player.Owner.MySpells.Remove(15720, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(15710))
player.Owner.MySpells.Remove(15710, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(15800))
player.Owner.MySpells.Remove(15800, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(15810))
player.Owner.MySpells.Remove(15810, stream);
if (player.Owner.MySpells.ClientSpells.ContainsKey(15770))
player.Owner.MySpells.Remove(15770, stream);
}
#endregion
}
}
#endregion
}
}
}
|
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|