*Remove assertion from packet handler. Assertions should not be put in such places because we can't trust clients nor network.

*Do not allow to charm mounted units.

--HG--
branch : trunk
This commit is contained in:
QAston
2010-07-20 01:42:14 +02:00
parent b5f7ac86ea
commit f906976837
5 changed files with 10 additions and 8 deletions
+4
View File
@@ -15204,6 +15204,10 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type)
if (!charmer)
return false;
// unmount players when charmed
if (GetTypeId() == TYPEID_PLAYER)
Unmount();
assert(type != CHARM_TYPE_POSSESS || charmer->GetTypeId() == TYPEID_PLAYER);
assert((type == CHARM_TYPE_VEHICLE) == IsVehicle());