mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
Merge branch 'master' into 303
Conflicts: src/game/SpellEffects.cpp
This commit is contained in:
commit
397efd4fac
29 changed files with 132 additions and 124 deletions
|
|
@ -1056,7 +1056,7 @@ bool ChatHandler::HandleTurnObjectCommand(const char* args)
|
|||
float rot2 = sin(o/2);
|
||||
float rot3 = cos(o/2);
|
||||
|
||||
Map* map = MapManager::Instance().GetMap(obj->GetMapId(),obj);
|
||||
Map* map = obj->GetMap();
|
||||
map->Remove(obj,false);
|
||||
|
||||
obj->Relocate(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ(), o);
|
||||
|
|
@ -1140,7 +1140,7 @@ bool ChatHandler::HandleNpcMoveCommand(const char* args)
|
|||
const_cast<CreatureData*>(data)->posZ = z;
|
||||
const_cast<CreatureData*>(data)->orientation = o;
|
||||
}
|
||||
MapManager::Instance().GetMap(pCreature->GetMapId(),pCreature)->CreatureRelocation(pCreature,x, y, z,o);
|
||||
pCreature->GetMap()->CreatureRelocation(pCreature,x, y, z,o);
|
||||
pCreature->GetMotionMaster()->Initialize();
|
||||
if(pCreature->isAlive()) // dead creature will reset movement generator at respawn
|
||||
{
|
||||
|
|
@ -1187,7 +1187,7 @@ bool ChatHandler::HandleMoveObjectCommand(const char* args)
|
|||
{
|
||||
Player *chr = m_session->GetPlayer();
|
||||
|
||||
Map* map = MapManager::Instance().GetMap(obj->GetMapId(),obj);
|
||||
Map* map = obj->GetMap();
|
||||
map->Remove(obj,false);
|
||||
|
||||
obj->Relocate(chr->GetPositionX(), chr->GetPositionY(), chr->GetPositionZ(), obj->GetOrientation());
|
||||
|
|
@ -1213,7 +1213,7 @@ bool ChatHandler::HandleMoveObjectCommand(const char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
Map* map = MapManager::Instance().GetMap(obj->GetMapId(),obj);
|
||||
Map* map = obj->GetMap();
|
||||
map->Remove(obj,false);
|
||||
|
||||
obj->Relocate(x, y, z, obj->GetOrientation());
|
||||
|
|
@ -2675,7 +2675,7 @@ bool ChatHandler::HandleWpModifyCommand(const char* args)
|
|||
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
|
||||
wpCreature2->LoadFromDB(wpCreature2->GetDBTableGUIDLow(), map);
|
||||
map->Add(wpCreature2);
|
||||
//MapManager::Instance().GetMap(npcCreature->GetMapId())->Add(wpCreature2);
|
||||
//npcCreature->GetMap()->Add(wpCreature2);
|
||||
}
|
||||
|
||||
WaypointMgr.SetNodePosition(lowguid, point, chr->GetPositionX(), chr->GetPositionY(), chr->GetPositionZ());
|
||||
|
|
@ -2985,7 +2985,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args)
|
|||
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
|
||||
wpCreature->LoadFromDB(wpCreature->GetDBTableGUIDLow(),map);
|
||||
map->Add(wpCreature);
|
||||
//MapManager::Instance().GetMap(wpCreature->GetMapId())->Add(wpCreature);
|
||||
//wpCreature->GetMap()->Add(wpCreature);
|
||||
}while( result->NextRow() );
|
||||
|
||||
// Cleanup memory
|
||||
|
|
@ -4167,7 +4167,7 @@ bool ChatHandler::HandleNpcTameCommand(const char* /*args*/)
|
|||
pet->SetUInt32Value(UNIT_FIELD_LEVEL, level - 1);
|
||||
|
||||
// add to world
|
||||
MapManager::Instance().GetMap(pet->GetMapId(), pet)->Add((Creature*)pet);
|
||||
pet->GetMap()->Add((Creature*)pet);
|
||||
|
||||
// visual effect for levelup
|
||||
pet->SetUInt32Value(UNIT_FIELD_LEVEL, level);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue