address respawning/zoning with wrong grid id
This commit is contained in:
parent
d593ceafff
commit
e0356472d6
@ -739,7 +739,7 @@ void Client::SendControlGhost(int32 send_id, int8 unknown2) {
|
|||||||
void Client::BeginPreCharInfo() {
|
void Client::BeginPreCharInfo() {
|
||||||
if (!IsReadyForSpawns()) {
|
if (!IsReadyForSpawns()) {
|
||||||
if (GetPlayer()->GetMap()) {
|
if (GetPlayer()->GetMap()) {
|
||||||
if(!GetPlayer()->GetLocation()) { // find the appropriate grid id
|
if(!firstlogin) { // find the appropriate grid id
|
||||||
auto loc = glm::vec3(GetPlayer()->GetX(), GetPlayer()->GetZ(), GetPlayer()->GetY());
|
auto loc = glm::vec3(GetPlayer()->GetX(), GetPlayer()->GetZ(), GetPlayer()->GetY());
|
||||||
uint32 GridID = 0;
|
uint32 GridID = 0;
|
||||||
float new_z = GetPlayer()->FindBestZ(loc, nullptr, &GridID);
|
float new_z = GetPlayer()->FindBestZ(loc, nullptr, &GridID);
|
||||||
@ -5745,6 +5745,7 @@ bool Client::ChangeLevel(int16 old_level, int16 new_level, int32 xp_earned) {
|
|||||||
|
|
||||||
if (GetPlayer()->GetHP() < GetPlayer()->GetTotalHP() || GetPlayer()->GetPower() < GetPlayer()->GetTotalPower())
|
if (GetPlayer()->GetHP() < GetPlayer()->GetTotalHP() || GetPlayer()->GetPower() < GetPlayer()->GetTotalPower())
|
||||||
GetPlayer()->GetZone()->AddDamagedSpawn(GetPlayer());
|
GetPlayer()->GetZone()->AddDamagedSpawn(GetPlayer());
|
||||||
|
|
||||||
if(playerScript || playerZoneScript) {
|
if(playerScript || playerZoneScript) {
|
||||||
std::vector<LuaArg> args = {
|
std::vector<LuaArg> args = {
|
||||||
LuaArg(GetPlayer()->GetZone()),
|
LuaArg(GetPlayer()->GetZone()),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user