mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[10782] Use Team enum types in all appropriate cases and catches bug in result fix.
* Fixed wrong arenaid use at leave arena queue. * Fixed memory lost and etc at not virtual EndBattleground call * Fixed crash at arena join with fake data from client. * Code cleanups.
This commit is contained in:
parent
c2331f58bc
commit
cc0655a402
38 changed files with 315 additions and 321 deletions
|
|
@ -3892,9 +3892,9 @@ bool ChatHandler::HandleLinkGraveCommand(char* args)
|
|||
|
||||
char* teamStr = ExtractLiteralArg(&args);
|
||||
|
||||
uint32 g_team;
|
||||
Team g_team;
|
||||
if (!teamStr)
|
||||
g_team = 0;
|
||||
g_team = TEAM_NONE;
|
||||
else if (strncmp(teamStr, "horde", strlen(teamStr))==0)
|
||||
g_team = HORDE;
|
||||
else if (strncmp(teamStr, "alliance", strlen(teamStr))==0)
|
||||
|
|
@ -3923,22 +3923,22 @@ bool ChatHandler::HandleLinkGraveCommand(char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (sObjectMgr.AddGraveYardLink(g_id,zoneId,g_team))
|
||||
PSendSysMessage(LANG_COMMAND_GRAVEYARDLINKED, g_id,zoneId);
|
||||
if (sObjectMgr.AddGraveYardLink(g_id, zoneId, g_team))
|
||||
PSendSysMessage(LANG_COMMAND_GRAVEYARDLINKED, g_id, zoneId);
|
||||
else
|
||||
PSendSysMessage(LANG_COMMAND_GRAVEYARDALRLINKED, g_id,zoneId);
|
||||
PSendSysMessage(LANG_COMMAND_GRAVEYARDALRLINKED, g_id, zoneId);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleNearGraveCommand(char* args)
|
||||
{
|
||||
uint32 g_team;
|
||||
Team g_team;
|
||||
|
||||
size_t argslen = strlen(args);
|
||||
|
||||
if(!*args)
|
||||
g_team = 0;
|
||||
g_team = TEAM_NONE;
|
||||
else if (strncmp(args, "horde", argslen) == 0)
|
||||
g_team = HORDE;
|
||||
else if (strncmp(args, "alliance", argslen) == 0)
|
||||
|
|
@ -3950,7 +3950,7 @@ bool ChatHandler::HandleNearGraveCommand(char* args)
|
|||
uint32 zone_id = player->GetZoneId();
|
||||
|
||||
WorldSafeLocsEntry const* graveyard = sObjectMgr.GetClosestGraveYard(
|
||||
player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(),player->GetMapId(),g_team);
|
||||
player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), g_team);
|
||||
|
||||
if(graveyard)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue