A small code that the BlackOnix Team made
At player.h, public, add this:
Then, replace your function bool Player::canSeeCreature(const Creature* creature) const on player.cpp with this:
Done =)
Hope you liked it.
At player.h, public, add this:
Code:
virtual bool canSeeInvisibility() const {return hasFlag(PlayerFlag_CanSenseInvisibility) || getAccountType() >= ACCOUNT_TYPE_GAMEMASTER;}
Then, replace your function bool Player::canSeeCreature(const Creature* creature) const on player.cpp with this:
Code:
bool Player::canSeeCreature(const Creature* creature) const
{
if(creature->isInvisible() && !creature->getPlayer() && !canSeeInvisibility())
return false;
return true;
}
Done =)
Hope you liked it.