Revert some entity related CastTo changes

This commit is contained in:
Akkadius
2015-01-25 01:42:46 -06:00
parent daa3b5d257
commit 1d462bfd0f
3 changed files with 8 additions and 528 deletions
+5 -2
View File
@@ -74,24 +74,27 @@ Entity::~Entity()
Client *Entity::CastToClient()
{
if (this == 0x00) {
Log.Out(Logs::General, Logs::Error, "CastToClient error (not client)");
Log.Out(Logs::General, Logs::Error, "CastToClient error (nullptr)");
return 0;
}
#ifdef _EQDEBUG
if (!IsClient()) {
Log.Out(Logs::General, Logs::Error, "CastToClient error (not client)");
return 0;
}
#endif
return static_cast<Client *>(this);
}
NPC *Entity::CastToNPC()
{
#ifdef _EQDEBUG
if (!IsNPC()) {
Log.Out(Logs::General, Logs::Error, "CastToNPC error (Not NPC)");
return 0;
}
#endif
return static_cast<NPC *>(this);
}