wdvx
Sniper 7.4 War
- Joined
- Mar 5, 2013
- Messages
- 263
- Reaction score
- 14
I wonder if someone can help me figuring out why this piece of code makes it impossible to attack any other players, under any circumstances. I even tried removing ALL the storage values and so on ...
In function ReturnValue Combat::canTargetCreature(const Player* player, const Creature* target)
I added this:
This will make it impossible (even with, or without that particular storage value) to attack other players!
In function ReturnValue Combat::canTargetCreature(const Player* player, const Creature* target)
I added this:
Code:
uint32_t k = 500;
int32_t v = 1;
const Player* targetPlayer = target->getPlayer();
if (player && targetPlayer &&
player->getStorageValue(k, v) == targetPlayer->getStorageValue(k, v))
{
return RET_YOUMAYNOTATTACKTHISPLAYER;
}
This will make it impossible (even with, or without that particular storage value) to attack other players!