Hello all,
I finished coding guildwar and guilds on CoEmu.
But when my guildwar is started the gates and the pole won't "Die"
Can someone help me with this?
Heres my code:
Thanks in advance,
JobvdH!
I finished coding guildwar and guilds on CoEmu.
But when my guildwar is started the gates and the pole won't "Die"
Can someone help me with this?
Heres my code:
Code:
public static void doTNpc(ClientSocket CSocket, Struct.TerrainNPC AttackedTNpc, int Damage, int AType)
{
if(AttackedTNpc.UID >= 6700)
{
if (AType != 21)
ConquerPacket.ToLocal(ConquerPacket.Attack(CSocket.Client.ID, AttackedTNpc.UID, AttackedTNpc.X, AttackedTNpc.Y, Damage, AType), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, 0);
if (AType == 25)
ConquerPacket.ToLocal(ConquerPacket.Status(CSocket, 2, AttackedTNpc.CurrentHP, (Struct.StatusTypes)0), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, 0);
if (AttackedTNpc.UID == 6701)
{
if (AttackedTNpc.CurrentHP <= 0)
{
Handler.OpenGate((Struct.TerrainNPC)Nano.TerrainNpcs[6701]);
}
}
else if (AttackedTNpc.UID == 6702)
{
if (AttackedTNpc.CurrentHP <= 0)
{
Handler.OpenGate((Struct.TerrainNPC)Nano.TerrainNpcs[6702]);
}
}
else if (AttackedTNpc.UID == 6700)
{
if (AttackedTNpc.CurrentHP <= 0)
{
AttackedTNpc.CurrentHP = 0;
Handler.RestartWar(CSocket, AttackedTNpc);
}
else
{
if (Struct.GuildWars.Scores.Contains(CSocket.Client.Guild.Name))
Struct.GuildWars.Scores[CSocket.Client.Guild.Name] = (int)Struct.GuildWars.Scores[CSocket.Client.Guild.Name] + Damage;
else
Struct.GuildWars.Scores.Add(CSocket.Client.Guild.Name, Damage);
}
}
}
else
{
GiveExp(CSocket, AttackedTNpc, Damage);
if(AType != 21)
ConquerPacket.ToLocal(ConquerPacket.Attack(CSocket.Client.ID, AttackedTNpc.UID, AttackedTNpc.X, AttackedTNpc.Y, Damage, AType), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, 0);
}
}
JobvdH!