Attacker

08/19/2012 01:20 hoseta#1
Hay is there a way to check if the attacker is mage/archer/knight in recv SkillAttack [0x3] ? if yes could some1 show me how?

thanks in advance.:handsdown:
08/19/2012 04:26 Roronoa Z.#2
Before you get the attack, you get the player/mob appear packet.
Use a std::map<int,whatever> - > first argument is then the id of the mob/player..
Just store the value which type it is.
you can access it like this
if(map.find(pid) != map.end()) {
map[pid].type(or whatever... if you make a std::map<int,int> map you can access it without an extra extension ..map[pid])
}

Then on the attack packet, just check for the type.