mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[11159] Remove now redundent GetDBTableGUIDLow support.
Now any creatures/gameobjects loaded base at DB data in non-instanceable/instanceable maps always have same guid as in DB data. * Also remove useless by same reasons MaNGOS::GameObjectWithDbGUIDCheck
This commit is contained in:
parent
654dac1e11
commit
04c21c95d3
20 changed files with 150 additions and 176 deletions
|
|
@ -877,7 +877,7 @@ bool ChatHandler::HandleGameObjectTargetCommand(char* args)
|
|||
|
||||
PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(),curRespawnDelayStr.c_str());
|
||||
|
||||
ShowNpcOrGoSpawnInformation<GameObject>(target->GetDBTableGUIDLow());
|
||||
ShowNpcOrGoSpawnInformation<GameObject>(target->GetGUIDLow());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -897,7 +897,7 @@ bool ChatHandler::HandleGameObjectDeleteCommand(char* args)
|
|||
|
||||
// by DB guid
|
||||
if (GameObjectData const* go_data = sObjectMgr.GetGOData(lowguid))
|
||||
obj = GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
|
||||
obj = GetGameObjectWithGuid(lowguid,go_data->id);
|
||||
|
||||
if (!obj)
|
||||
{
|
||||
|
|
@ -944,7 +944,7 @@ bool ChatHandler::HandleGameObjectTurnCommand(char* args)
|
|||
|
||||
// by DB guid
|
||||
if (GameObjectData const* go_data = sObjectMgr.GetGOData(lowguid))
|
||||
obj = GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
|
||||
obj = GetGameObjectWithGuid(lowguid,go_data->id);
|
||||
|
||||
if (!obj)
|
||||
{
|
||||
|
|
@ -988,7 +988,7 @@ bool ChatHandler::HandleGameObjectMoveCommand(char* args)
|
|||
|
||||
// by DB guid
|
||||
if (GameObjectData const* go_data = sObjectMgr.GetGOData(lowguid))
|
||||
obj = GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
|
||||
obj = GetGameObjectWithGuid(lowguid,go_data->id);
|
||||
|
||||
if (!obj)
|
||||
{
|
||||
|
|
@ -1133,7 +1133,7 @@ bool ChatHandler::HandleGameObjectPhaseCommand(char* args)
|
|||
|
||||
// by DB guid
|
||||
if (GameObjectData const* go_data = sObjectMgr.GetGOData(lowguid))
|
||||
obj = GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
|
||||
obj = GetGameObjectWithGuid(lowguid,go_data->id);
|
||||
|
||||
if (!obj)
|
||||
{
|
||||
|
|
@ -1576,7 +1576,7 @@ bool ChatHandler::HandleNpcAddCommand(char* args)
|
|||
|
||||
pCreature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
|
||||
|
||||
uint32 db_guid = pCreature->GetDBTableGUIDLow();
|
||||
uint32 db_guid = pCreature->GetGUIDLow();
|
||||
|
||||
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
|
||||
pCreature->LoadFromDB(db_guid, map);
|
||||
|
|
@ -1844,7 +1844,7 @@ bool ChatHandler::HandleNpcMoveCommand(char* args)
|
|||
pCreature = player->GetMap()->GetCreature(ObjectGuid(HIGHGUID_UNIT, data->id, lowguid));
|
||||
}
|
||||
else
|
||||
lowguid = pCreature->GetDBTableGUIDLow();
|
||||
lowguid = pCreature->GetGUIDLow();
|
||||
|
||||
float x = m_session->GetPlayer()->GetPositionX();
|
||||
float y = m_session->GetPlayer()->GetPositionY();
|
||||
|
|
@ -1853,7 +1853,7 @@ bool ChatHandler::HandleNpcMoveCommand(char* args)
|
|||
|
||||
if (pCreature)
|
||||
{
|
||||
if (CreatureData const* data = sObjectMgr.GetCreatureData(pCreature->GetDBTableGUIDLow()))
|
||||
if (CreatureData const* data = sObjectMgr.GetCreatureData(pCreature->GetGUIDLow()))
|
||||
{
|
||||
const_cast<CreatureData*>(data)->posX = x;
|
||||
const_cast<CreatureData*>(data)->posY = y;
|
||||
|
|
@ -1903,7 +1903,7 @@ bool ChatHandler::HandleNpcSetMoveTypeCommand(char* args)
|
|||
pCreature = getSelectedCreature();
|
||||
if (!pCreature || pCreature->IsPet())
|
||||
return false;
|
||||
lowguid = pCreature->GetDBTableGUIDLow();
|
||||
lowguid = pCreature->GetGUIDLow();
|
||||
}
|
||||
else // case .setmovetype #creature_guid $move_type (with guid)
|
||||
{
|
||||
|
|
@ -2057,7 +2057,7 @@ bool ChatHandler::HandleNpcSpawnDistCommand(char* args)
|
|||
uint32 u_guidlow = 0;
|
||||
|
||||
if (pCreature)
|
||||
u_guidlow = pCreature->GetDBTableGUIDLow();
|
||||
u_guidlow = pCreature->GetGUIDLow();
|
||||
else
|
||||
return false;
|
||||
|
||||
|
|
@ -2089,7 +2089,7 @@ bool ChatHandler::HandleNpcSpawnTimeCommand(char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
uint32 u_guidlow = pCreature->GetDBTableGUIDLow();
|
||||
uint32 u_guidlow = pCreature->GetGUIDLow();
|
||||
|
||||
WorldDatabase.PExecuteLog("UPDATE creature SET spawntimesecs=%i WHERE guid=%u", stime, u_guidlow);
|
||||
pCreature->SetRespawnDelay(stime);
|
||||
|
|
@ -2911,7 +2911,7 @@ bool ChatHandler::HandleWpAddCommand(char* args)
|
|||
}
|
||||
else
|
||||
{
|
||||
lowguid = target->GetDBTableGUIDLow();
|
||||
lowguid = target->GetGUIDLow();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -3201,7 +3201,7 @@ bool ChatHandler::HandleWpModifyCommand(char* args)
|
|||
{
|
||||
wpCreature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
|
||||
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
|
||||
wpCreature->LoadFromDB(wpCreature->GetDBTableGUIDLow(), map);
|
||||
wpCreature->LoadFromDB(wpCreature->GetGUIDLow(), map);
|
||||
map->Add(wpCreature);
|
||||
wpGuid = wpCreature->GetGUIDLow();
|
||||
}
|
||||
|
|
@ -3321,7 +3321,7 @@ bool ChatHandler::HandleWpModifyCommand(char* args)
|
|||
|
||||
wpCreature2->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
|
||||
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
|
||||
wpCreature2->LoadFromDB(wpCreature2->GetDBTableGUIDLow(), map);
|
||||
wpCreature2->LoadFromDB(wpCreature2->GetGUIDLow(), map);
|
||||
map->Add(wpCreature2);
|
||||
//npcCreature->GetMap()->Add(wpCreature2);
|
||||
}
|
||||
|
|
@ -3470,7 +3470,7 @@ bool ChatHandler::HandleWpShowCommand(char* args)
|
|||
}
|
||||
}
|
||||
|
||||
uint32 lowguid = target->GetDBTableGUIDLow();
|
||||
uint32 lowguid = target->GetGUIDLow();
|
||||
|
||||
std::string show = show_str;
|
||||
uint32 Maxpoint;
|
||||
|
|
@ -3632,7 +3632,7 @@ bool ChatHandler::HandleWpShowCommand(char* args)
|
|||
|
||||
wpCreature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
|
||||
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
|
||||
wpCreature->LoadFromDB(wpCreature->GetDBTableGUIDLow(),map);
|
||||
wpCreature->LoadFromDB(wpCreature->GetGUIDLow(),map);
|
||||
map->Add(wpCreature);
|
||||
//wpCreature->GetMap()->Add(wpCreature);
|
||||
} while (result->NextRow());
|
||||
|
|
@ -3684,7 +3684,7 @@ bool ChatHandler::HandleWpShowCommand(char* args)
|
|||
}
|
||||
|
||||
pCreature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
|
||||
pCreature->LoadFromDB(pCreature->GetDBTableGUIDLow(), map);
|
||||
pCreature->LoadFromDB(pCreature->GetGUIDLow(), map);
|
||||
map->Add(pCreature);
|
||||
//player->PlayerTalkClass->SendPointOfInterest(x, y, 6, 6, 0, "First Waypoint");
|
||||
|
||||
|
|
@ -3744,7 +3744,7 @@ bool ChatHandler::HandleWpShowCommand(char* args)
|
|||
}
|
||||
|
||||
pCreature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
|
||||
pCreature->LoadFromDB(pCreature->GetDBTableGUIDLow(), map);
|
||||
pCreature->LoadFromDB(pCreature->GetGUIDLow(), map);
|
||||
map->Add(pCreature);
|
||||
//player->PlayerTalkClass->SendPointOfInterest(x, y, 6, 6, 0, "Last Waypoint");
|
||||
// Cleanup memory
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue