Merge branch 'master' of github.com:TrinityCore/TrinityCore
Conflicts: src/server/game/DataStores/DBCStores.cpp src/server/game/DataStores/DBCfmt.h src/server/game/Server/Protocol/Opcodes.cpp
This commit is contained in:
@@ -941,7 +941,7 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo)
|
||||
return false;
|
||||
}
|
||||
|
||||
SetMap(sMapMgr->CreateMap(info->mapId, this, 0));
|
||||
SetMap(sMapMgr->CreateMap(info->mapId, this));
|
||||
|
||||
uint8 powertype = cEntry->powerType;
|
||||
|
||||
@@ -2244,7 +2244,9 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
||||
if (!sMapMgr->CanPlayerEnter(mapid, this, false))
|
||||
return false;
|
||||
|
||||
Map* map = sMapMgr->CreateMap(mapid, this, 0);
|
||||
// If the map is not created, assume it is possible to enter it.
|
||||
// It will be created in the WorldPortAck.
|
||||
Map* map = sMapMgr->FindBaseMap(mapid);
|
||||
if (!map || map->CanEnter(this))
|
||||
{
|
||||
//lets reset near teleport flag if it wasn't reset during chained teleports
|
||||
@@ -5126,8 +5128,6 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
|
||||
if (GetSession()->IsARecruiter() || (GetSession()->GetRecruiterId() != 0))
|
||||
SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_REFER_A_FRIEND);
|
||||
|
||||
setDeathState(ALIVE);
|
||||
|
||||
SetMovement(MOVE_LAND_WALK);
|
||||
SetMovement(MOVE_UNROOT);
|
||||
|
||||
@@ -5157,6 +5157,8 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
|
||||
// update visibility
|
||||
UpdateObjectVisibility();
|
||||
|
||||
setDeathState(ALIVE);
|
||||
|
||||
if (!applySickness)
|
||||
return;
|
||||
|
||||
@@ -16972,7 +16974,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
|
||||
|
||||
// NOW player must have valid map
|
||||
// load the player's map here if it's not already loaded
|
||||
Map* map = sMapMgr->CreateMap(mapId, this, instanceId);
|
||||
Map* map = sMapMgr->CreateMap(mapId, this);
|
||||
|
||||
if (!map)
|
||||
{
|
||||
@@ -16990,14 +16992,14 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
|
||||
RelocateToHomebind();
|
||||
}
|
||||
|
||||
map = sMapMgr->CreateMap(mapId, this, 0);
|
||||
map = sMapMgr->CreateMap(mapId, this);
|
||||
if (!map)
|
||||
{
|
||||
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass());
|
||||
mapId = info->mapId;
|
||||
Relocate(info->positionX, info->positionY, info->positionZ, 0.0f);
|
||||
sLog->outError("Player (guidlow %d) have invalid coordinates (X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.", guid, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
|
||||
map = sMapMgr->CreateMap(mapId, this, 0);
|
||||
map = sMapMgr->CreateMap(mapId, this);
|
||||
if (!map)
|
||||
{
|
||||
sLog->outError("Player (guidlow %d) has invalid default map coordinates (X: %f Y: %f Z: %f O: %f). or instance couldn't be created", guid, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
|
||||
|
||||
Reference in New Issue
Block a user