Some Creature* casts moved to new ToCreature.
Added const Creature* ToCreature() --HG-- branch : trunk
This commit is contained in:
@@ -321,6 +321,7 @@ class Object
|
||||
Player* ToPlayer(){ if(GetTypeId() == TYPEID_PLAYER) return reinterpret_cast<Player*>(this); else return NULL; }
|
||||
const Player* ToPlayer() const { if(GetTypeId() == TYPEID_PLAYER) return (const Player*)((Player*)this); else return NULL; }
|
||||
Creature* ToCreature(){ if(GetTypeId() == TYPEID_UNIT) return reinterpret_cast<Creature*>(this); else return NULL; }
|
||||
const Creature* ToCreature() const {if(GetTypeId() == TYPEID_UNIT) return (const Creature*)((Creature*)this); else return NULL; }
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user