507 | | CreatureInfo const* cInfo = ((Creature*)pVictim)->GetCreatureInfo(); |
508 | | if(cInfo && cInfo->lootid) |
509 | | pVictim->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); |
510 | | |
511 | | // some critters required for quests |
512 | | if(GetTypeId() == TYPEID_PLAYER) |
513 | | ((Player*)this)->KilledMonster(pVictim->GetEntry(),pVictim->GetGUID()); |
| 507 | if(damage >= pVictim->GetHealth()) |
| 508 | { |
| 509 | pVictim->setDeathState(JUST_DIED); |
| 510 | pVictim->SetHealth(0); |
| 511 | |
| 512 | CreatureInfo const* cInfo = ((Creature*)pVictim)->GetCreatureInfo(); |
| 513 | if(cInfo && cInfo->lootid) |
| 514 | pVictim->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); |
| 515 | |
| 516 | // some critters required for quests |
| 517 | if(GetTypeId() == TYPEID_PLAYER) |
| 518 | ((Player*)this)->KilledMonster(pVictim->GetEntry(),pVictim->GetGUID()); |
| 519 | } |
| 520 | else |
| 521 | pVictim->ModifyHealth(- (int32)damage); |