mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-06 12:27:48 +00:00
Merge branch 'azerothcore:master' into Playerbot
This commit is contained in:
@@ -2009,13 +2009,8 @@ void WorldSession::HandleCharFactionOrRaceChangeCallback(std::shared_ptr<Charact
|
||||
return;
|
||||
}
|
||||
|
||||
// xinef: check money
|
||||
bool valid = Player::TeamIdForRace(oldRace) == Player::TeamIdForRace(factionChangeInfo->Race);
|
||||
if ((level < 10 && money <= 0) || (level > 10 && level <= 30 && money <= 3000000) || (level > 30 && level <= 50 && money <= 10000000) ||
|
||||
(level > 50 && level <= 70 && money <= 50000000) || (level > 70 && money <= 200000000))
|
||||
valid = true;
|
||||
|
||||
if (!valid)
|
||||
uint32 maxMoney = sWorld->getIntConfig(CONFIG_CHANGE_FACTION_MAX_MONEY);
|
||||
if (maxMoney && money > maxMoney)
|
||||
{
|
||||
SendCharFactionChange(CHAR_CREATE_CHARACTER_GOLD_LIMIT, factionChangeInfo.get());
|
||||
return;
|
||||
|
||||
@@ -227,7 +227,7 @@ void WorldSession::HandleActivateTaxiOpcode(WorldPacket& recvData)
|
||||
ObjectGuid guid;
|
||||
std::vector<uint32> nodes;
|
||||
nodes.resize(2);
|
||||
|
||||
GetPlayer()->SetCanTeleport(true);
|
||||
recvData >> guid >> nodes[0] >> nodes[1];
|
||||
LOG_DEBUG("network", "WORLD: Received CMSG_ACTIVATETAXI from {} to {}", nodes[0], nodes[1]);
|
||||
Creature* npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
|
||||
@@ -251,6 +251,7 @@ void WorldSession::HandleActivateTaxiOpcode(WorldPacket& recvData)
|
||||
|
||||
void WorldSession::SendActivateTaxiReply(ActivateTaxiReply reply)
|
||||
{
|
||||
GetPlayer()->SetCanTeleport(true);
|
||||
WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4);
|
||||
data << uint32(reply);
|
||||
SendPacket(&data);
|
||||
|
||||
Reference in New Issue
Block a user