mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 14:16:31 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -1386,7 +1386,26 @@ public:
|
||||
|
||||
if (!target || !target->IsConnected())
|
||||
{
|
||||
return false;
|
||||
if (handler->HasLowerSecurity(nullptr, target->GetGUID()))
|
||||
return false;
|
||||
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_HOMEBIND);
|
||||
stmt->SetData(0, target->GetGUID().GetCounter());
|
||||
|
||||
PreparedQueryResult result = CharacterDatabase.Query(stmt);
|
||||
|
||||
if (result)
|
||||
{
|
||||
Field* fieldsDB = result->Fetch();
|
||||
WorldLocation loc(fieldsDB[0].Get<uint16>(), fieldsDB[2].Get<float>(), fieldsDB[3].Get<float>(), fieldsDB[4].Get<float>(), 0.0f);
|
||||
uint32 zoneId = fieldsDB[1].Get<uint16>();
|
||||
|
||||
Player::SavePositionInDB(loc, zoneId, target->GetGUID(), nullptr);
|
||||
|
||||
handler->PSendSysMessage(LANG_SUMMONING, target->GetName(), handler->GetAcoreString(LANG_OFFLINE));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Player* player = target->GetConnectedPlayer();
|
||||
|
||||
Reference in New Issue
Block a user