Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Server/Taxi: Update ActivateTaxiReply enum to 5.4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Artamedes committed Mar 31, 2019
1 parent 3b9e9d2 commit c2f4dd2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 24 deletions.
20 changes: 10 additions & 10 deletions src/server/game/Entities/Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22275,7 +22275,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
// not let cheating with start flight in time of logout process || while in combat || has type state: stunned || has type state: root
if (GetSession()->isLogingOut() || IsInCombat() || HasUnitState(UNIT_STATE_STUNNED) || HasUnitState(UNIT_STATE_ROOT))
{
GetSession()->SendActivateTaxiReply(ERR_TAXIPLAYERBUSY);
GetSession()->SendActivateTaxiReply(ActivateTaxiReply::ERR_TAXI_PLAYER_BUSY);
return false;
}

Expand All @@ -22288,20 +22288,20 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
// not let cheating with start flight mounted
if (IsMounted())
{
GetSession()->SendActivateTaxiReply(ERR_TAXIPLAYERALREADYMOUNTED);
GetSession()->SendActivateTaxiReply(ActivateTaxiReply::ERR_TAXI_PLAYER_ALREADY_MOUNTED);
return false;
}

if (IsInDisallowedMountForm())
{
GetSession()->SendActivateTaxiReply(ERR_TAXIPLAYERSHAPESHIFTED);
GetSession()->SendActivateTaxiReply(ActivateTaxiReply::ERR_TAXI_PLAYER_SHAPESHIFTED);
return false;
}

// not let cheating with start flight in time of logout process || if casting not finished || while in combat || if not use Spell's with EffectSendTaxi
if (IsNonMeleeSpellCasted(false))
{
GetSession()->SendActivateTaxiReply(ERR_TAXIPLAYERBUSY);
GetSession()->SendActivateTaxiReply(ActivateTaxiReply::ERR_TAXI_PLAYER_BUSY);
return false;
}
}
Expand Down Expand Up @@ -22330,7 +22330,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(sourcenode);
if (!node)
{
GetSession()->SendActivateTaxiReply(ERR_TAXINOSUCHPATH);
GetSession()->SendActivateTaxiReply(ActivateTaxiReply::ERR_TAXI_NO_SUCH_PATH);
return false;
}

Expand All @@ -22343,14 +22343,14 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
(node->z - GetPositionZ())*(node->z - GetPositionZ()) >
(2*INTERACTION_DISTANCE)*(2*INTERACTION_DISTANCE)*(2*INTERACTION_DISTANCE))
{
GetSession()->SendActivateTaxiReply(ERR_TAXITOOFARAWAY);
GetSession()->SendActivateTaxiReply(ActivateTaxiReply::ERR_TAXI_TOO_FAR_AWAY);
return false;
}
}
// node must have pos if taxi master case (npc != NULL)
else if (npc)
{
GetSession()->SendActivateTaxiReply(ERR_TAXIUNSPECIFIEDSERVERERROR);
GetSession()->SendActivateTaxiReply(ActivateTaxiReply::ERR_TAXI_UNSPECIFIED_SERVER_ERROR);
return false;
}

Expand Down Expand Up @@ -22413,7 +22413,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
// in spell case allow 0 model
if ((mount_display_id == 0 && spellid == 0) || sourcepath == 0)
{
GetSession()->SendActivateTaxiReply(ERR_TAXIUNSPECIFIEDSERVERERROR);
GetSession()->SendActivateTaxiReply(ActivateTaxiReply::ERR_TAXI_UNSPECIFIED_SERVER_ERROR);
m_taxi.ClearTaxiDestinations();
return false;
}
Expand All @@ -22425,7 +22425,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc

if (money < totalcost)
{
GetSession()->SendActivateTaxiReply(ERR_TAXINOTENOUGHMONEY);
GetSession()->SendActivateTaxiReply(ActivateTaxiReply::ERR_TAXI_NOT_ENOUGH_MONEY);
m_taxi.ClearTaxiDestinations();
return false;
}
Expand All @@ -22447,7 +22447,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
}
else
{
GetSession()->SendActivateTaxiReply(ERR_TAXIOK);
GetSession()->SendActivateTaxiReply(ActivateTaxiReply::ERR_TAXI_OK);
GetSession()->SendDoFlight(mount_display_id, sourcepath);
}
return true;
Expand Down
29 changes: 15 additions & 14 deletions src/server/game/Miscellaneous/SharedDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -4102,21 +4102,22 @@ enum RemoveMethod
GROUP_REMOVEMETHOD_KICK_LFG = 3
};

/// 5.4.8 18414
enum ActivateTaxiReply
{
ERR_TAXIOK = 0,
ERR_TAXIUNSPECIFIEDSERVERERROR = 1,
ERR_TAXINOSUCHPATH = 2,
ERR_TAXINOTENOUGHMONEY = 3,
ERR_TAXITOOFARAWAY = 4,
ERR_TAXINOVENDORNEARBY = 5,
ERR_TAXINOTVISITED = 6,
ERR_TAXIPLAYERBUSY = 7,
ERR_TAXIPLAYERALREADYMOUNTED = 8,
ERR_TAXIPLAYERSHAPESHIFTED = 9,
ERR_TAXIPLAYERMOVING = 10,
ERR_TAXISAMENODE = 11,
ERR_TAXINOTSTANDING = 12
{
ERR_TAXI_SAME_NODE = 2,
ERR_TAXI_PLAYER_MOVING = 3,
ERR_TAXI_NOT_ENOUGH_MONEY = 4,
ERR_TAXI_UNSPECIFIED_SERVER_ERROR = 5,
ERR_TAXI_NO_SUCH_PATH = 6,
ERR_TAXI_PLAYER_ALREADY_MOUNTED = 7,
ERR_TAXI_OK = 8,
ERR_TAXI_PLAYER_SHAPESHIFTED = 9,
ERR_TAXI_PLAYER_BUSY = 10,
ERR_TAXI_NOT_STANDING = 11,
ERR_TAXI_NO_VENDOR_NEARBY = 12,
ERR_TAXI_TOO_FAR_AWAY = 13,
ERR_TAXI_NOT_VISITED = 15,

This comment has been minimized.

Copy link
@JadeCore

JadeCore Sep 20, 2019

14

This comment has been minimized.

Copy link
@Artamedes

Artamedes Sep 20, 2019

Author Contributor

No it's 15, this is straight from packet handler from client: https://gist.github.com/Artamedes/8a647acc5cd6290be77416b52c9511da

};

enum ProfessionUI
Expand Down

0 comments on commit c2f4dd2

Please sign in to comment.