mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
Compile fix
This commit is contained in:
parent
5d79048e68
commit
a2ed231947
4 changed files with 23 additions and 27 deletions
|
|
@ -4199,17 +4199,19 @@ bool ChatHandler::HandleNpcTameCommand(const char* args)
|
|||
player->GetClosePoint (x,y,z,creatureTarget->GetObjectSize (),CONTACT_DISTANCE);
|
||||
pet->Relocate (x,y,z,M_PI-player->GetOrientation ());
|
||||
|
||||
// set pet to defensive mode by default (some classes can't control contolled pets in fact).
|
||||
// set pet to defensive mode by default (some classes can't control controlled pets in fact).
|
||||
pet->GetCharmInfo()->SetReactState(REACT_DEFENSIVE);
|
||||
|
||||
uint32 level = (creatureTarget->getLevel() < (player->getLevel() - 5)) ? (player->getLevel() - 5) : creatureTarget->getLevel();
|
||||
|
||||
// prepare visual effect for levelup
|
||||
pet->SetUInt32Value(UNIT_FIELD_LEVEL,creatureTarget->getLevel()-1);
|
||||
pet->SetUInt32Value(UNIT_FIELD_LEVEL, level - 1);
|
||||
|
||||
// add to world
|
||||
MapManager::Instance().GetMap(pet->GetMapId(), pet)->Add((Creature*)pet);
|
||||
|
||||
// visual effect for levelup
|
||||
pet->SetUInt32Value(UNIT_FIELD_LEVEL,creatureTarget->getLevel());
|
||||
pet->SetUInt32Value(UNIT_FIELD_LEVEL, level);
|
||||
|
||||
// caster have pet now
|
||||
player->SetPet(pet);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue