mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[10197] Add to playercreateinfo original player orientation field.
It still not filled. Patch with correct values welcomed ;)
This commit is contained in:
parent
e4495d4c2d
commit
f8efc2b5b3
8 changed files with 27 additions and 17 deletions
|
|
@ -2467,7 +2467,7 @@ void ObjectMgr::LoadPlayerInfo()
|
|||
// Load playercreate
|
||||
{
|
||||
// 0 1 2 3 4 5 6
|
||||
QueryResult *result = WorldDatabase.Query("SELECT race, class, map, zone, position_x, position_y, position_z FROM playercreateinfo");
|
||||
QueryResult *result = WorldDatabase.Query("SELECT race, class, map, zone, position_x, position_y, position_z, orientation FROM playercreateinfo");
|
||||
|
||||
uint32 count = 0;
|
||||
|
||||
|
|
@ -2488,13 +2488,14 @@ void ObjectMgr::LoadPlayerInfo()
|
|||
{
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
uint32 current_race = fields[0].GetUInt32();
|
||||
uint32 current_race = fields[0].GetUInt32();
|
||||
uint32 current_class = fields[1].GetUInt32();
|
||||
uint32 mapId = fields[2].GetUInt32();
|
||||
uint32 areaId = fields[3].GetUInt32();
|
||||
float positionX = fields[4].GetFloat();
|
||||
float positionY = fields[5].GetFloat();
|
||||
float positionZ = fields[6].GetFloat();
|
||||
uint32 mapId = fields[2].GetUInt32();
|
||||
uint32 areaId = fields[3].GetUInt32();
|
||||
float positionX = fields[4].GetFloat();
|
||||
float positionY = fields[5].GetFloat();
|
||||
float positionZ = fields[6].GetFloat();
|
||||
float orientation = fields[7].GetFloat();
|
||||
|
||||
if(current_race >= MAX_RACES)
|
||||
{
|
||||
|
|
@ -2522,7 +2523,7 @@ void ObjectMgr::LoadPlayerInfo()
|
|||
}
|
||||
|
||||
// accept DB data only for valid position (and non instanceable)
|
||||
if( !MapManager::IsValidMapCoord(mapId,positionX,positionY,positionZ) )
|
||||
if( !MapManager::IsValidMapCoord(mapId,positionX,positionY,positionZ, orientation) )
|
||||
{
|
||||
sLog.outErrorDb("Wrong home position for class %u race %u pair in `playercreateinfo` table, ignoring.",current_class,current_race);
|
||||
continue;
|
||||
|
|
@ -2536,11 +2537,12 @@ void ObjectMgr::LoadPlayerInfo()
|
|||
|
||||
PlayerInfo* pInfo = &playerInfo[current_race][current_class];
|
||||
|
||||
pInfo->mapId = mapId;
|
||||
pInfo->areaId = areaId;
|
||||
pInfo->positionX = positionX;
|
||||
pInfo->positionY = positionY;
|
||||
pInfo->positionZ = positionZ;
|
||||
pInfo->mapId = mapId;
|
||||
pInfo->areaId = areaId;
|
||||
pInfo->positionX = positionX;
|
||||
pInfo->positionY = positionY;
|
||||
pInfo->positionZ = positionZ;
|
||||
pInfo->orientation = orientation;
|
||||
|
||||
pInfo->displayId_m = rEntry->model_m;
|
||||
pInfo->displayId_f = rEntry->model_f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue