Okyanus
Member
- Joined
- Apr 7, 2018
- Messages
- 25
- Reaction score
- 7
Wrong Position how can i change?
Config i made but dont working
Config i made but dont working
Attachments
-
Adsız.png1.7 MB · Views: 27 · VirusTotal
alter in database Town na pos...Wrong Position how can i change?
Config i made but dont working
Go to the database and manually change the Account Manager position to a valid one, it probably got saved with an invalid one and will not be changed updating the town id
player->town = result->getDataInt("town_id");
if(Town* town = Towns::getInstance()->getTown(player->town))
player->setMasterPosition(town->getPosition());
//snipped//
player->loginPosition = Position(result->getDataInt("posx"), result->getDataInt("posy"), result->getDataInt("posz"));
if(!player->loginPosition.x || !player->loginPosition.y)
player->loginPosition = player->getMasterPosition();
if(!g_game.placeCreature(player, player->getLoginPosition()) && !g_game.placeCreature(player, player->getMasterPosition(), false, true))
{
disconnectClient(0x14, "Temple position is wrong. Contact with the administration.");
return false;
}
Interesting, I remember running into the same problem years ago and the only solution was to manually change the position in the databaseU wut. It absolutely should be.
iologin
C++:player->town = result->getDataInt("town_id"); if(Town* town = Towns::getInstance()->getTown(player->town)) player->setMasterPosition(town->getPosition()); //snipped// player->loginPosition = Position(result->getDataInt("posx"), result->getDataInt("posy"), result->getDataInt("posz")); if(!player->loginPosition.x || !player->loginPosition.y) player->loginPosition = player->getMasterPosition();
gameprotocol
C++:if(!g_game.placeCreature(player, player->getLoginPosition()) && !g_game.placeCreature(player, player->getMasterPosition(), false, true)) { disconnectClient(0x14, "Temple position is wrong. Contact with the administration."); return false; }
if last login position simply doesn't exist in player loader, it uses temple position
game will try to use last-login position first, and if that is invalid, it will use the temple position of the set town.
This is for example, why when players login after the map has been changed and they logged out on a tile that now no longer exist, they can still login successfully. If this system is broken, then you will have bigger problems than the account manager not working.
The SQL query above is all he should need. If it still doesn't work then he needs to edit his map file and make sure the town temple positions are set correctly.