mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
fix(Scripts/Commands): arena lookup/info improvemenets (#23355)
Co-authored-by: sudlud <sudlud@users.noreply.github.com>
This commit is contained in:
@@ -162,7 +162,7 @@ bool ArenaTeam::AddMember(ObjectGuid playerGuid)
|
||||
|
||||
// Feed data to the struct
|
||||
ArenaTeamMember newMember;
|
||||
//newMember.Name = playerName;
|
||||
newMember.Name = playerName;
|
||||
newMember.Guid = playerGuid;
|
||||
newMember.Class = playerClass;
|
||||
newMember.SeasonGames = 0;
|
||||
@@ -249,7 +249,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult result)
|
||||
newMember.WeekWins = fields[3].Get<uint16>();
|
||||
newMember.SeasonGames = fields[4].Get<uint16>();
|
||||
newMember.SeasonWins = fields[5].Get<uint16>();
|
||||
//newMember.Name = fields[6].Get<std::string>();
|
||||
newMember.Name = fields[6].Get<std::string>();
|
||||
newMember.Class = fields[7].Get<uint8>();
|
||||
newMember.PersonalRating = fields[8].Get<uint16>();
|
||||
newMember.MatchMakerRating = fields[9].Get<uint16>() > 0 ? fields[9].Get<uint16>() : sWorld->getIntConfig(CONFIG_ARENA_START_MATCHMAKER_RATING);
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
{ "rename", HandleArenaRenameCommand, SEC_ADMINISTRATOR, Console::Yes },
|
||||
{ "captain", HandleArenaCaptainCommand, SEC_ADMINISTRATOR, Console::No },
|
||||
{ "info", HandleArenaInfoCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "lookup", HandleArenaLookupCommand, SEC_GAMEMASTER, Console::No },
|
||||
{ "lookup", HandleArenaLookupCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "season", arenaSeasonCommandTable }
|
||||
};
|
||||
|
||||
@@ -209,7 +209,7 @@ public:
|
||||
handler->PSendSysMessage(LANG_ARENA_INFO_HEADER, arena->GetName(), arena->GetId(), arena->GetRating(), arena->GetType(), arena->GetType());
|
||||
|
||||
for (auto const& itr : arena->GetMembers())
|
||||
handler->PSendSysMessage(LANG_ARENA_INFO_MEMBERS, itr.Name, itr.Guid.ToString(), itr.PersonalRating, (arena->GetCaptain() == itr.Guid ? "- Captain" : ""));
|
||||
handler->PSendSysMessage(LANG_ARENA_INFO_MEMBERS, itr.Name, itr.Guid.GetCounter(), itr.PersonalRating, (arena->GetCaptain() == itr.Guid ? "Captain" : ""));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -224,17 +224,17 @@ public:
|
||||
{
|
||||
if (StringContainsStringI(team->GetName(), needle))
|
||||
{
|
||||
if (handler->GetSession())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ARENA_LOOKUP, team->GetName(), team->GetId(), team->GetType(), team->GetType());
|
||||
found = true;
|
||||
continue;
|
||||
}
|
||||
handler->PSendSysMessage(LANG_ARENA_LOOKUP, team->GetName(), team->GetId(), team->GetType(), team->GetType());
|
||||
found = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
handler->PSendSysMessage(LANG_ARENA_ERROR_NAME_NOT_FOUND, std::string(needle));
|
||||
{
|
||||
handler->SendErrorMessage(LANG_ARENA_ERROR_NAME_NOT_FOUND, std::string(needle));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user