Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2022-04-04 07:53:51 -06:00
committed by GitHub
35 changed files with 8418 additions and 82 deletions

View File

@@ -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;

View File

@@ -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);