mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[7254] Cleanups and batter checking in homebind/bgEntryPoint code.
* Load homebind data early in Player::LoadFromDB and use instead initital race points in cases need some safe point if current coordinate broken by some reason. * Store BG entry point in to WorldLocation and simplify calls. * Set bg entry point at GM teleports to battleground for correct auto-recall position at battleground end.
This commit is contained in:
parent
e97c7ad9c5
commit
8af53064eb
8 changed files with 58 additions and 65 deletions
|
|
@ -382,6 +382,8 @@ bool ChatHandler::HandleNamegoCommand(const char* args)
|
|||
// all's well, set bg id
|
||||
// when porting out from the bg, it will be reset to 0
|
||||
chr->SetBattleGroundId(m_session->GetPlayer()->GetBattleGroundId());
|
||||
// remember current position as entry point for return at bg end teleportation
|
||||
chr->SetBattleGroundEntryPoint(chr->GetMapId(),chr->GetPositionX(),chr->GetPositionY(),chr->GetPositionZ(),chr->GetOrientation());
|
||||
}
|
||||
else if(pMap->IsDungeon())
|
||||
{
|
||||
|
|
@ -498,6 +500,8 @@ bool ChatHandler::HandleGonameCommand(const char* args)
|
|||
// all's well, set bg id
|
||||
// when porting out from the bg, it will be reset to 0
|
||||
_player->SetBattleGroundId(chr->GetBattleGroundId());
|
||||
// remember current position as entry point for return at bg end teleportation
|
||||
_player->SetBattleGroundEntryPoint(_player->GetMapId(),_player->GetPositionX(),_player->GetPositionY(),_player->GetPositionZ(),_player->GetOrientation());
|
||||
}
|
||||
else if(cMap->IsDungeon() && cMap->Instanceable())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue