mirror of
https://github.com/mangosfour/server.git
synced 2025-12-25 22:37:04 +00:00
[9389] Cleanup config data. Use proper names and expected types.
This commit is contained in:
parent
58d188f21a
commit
ebfb0f9835
63 changed files with 1591 additions and 967 deletions
|
|
@ -110,9 +110,9 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
|
|||
else
|
||||
{
|
||||
// TODO: find correct opcode
|
||||
if(_player->getLevel() < sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
if(_player->getLevel() < sWorld.getConfig(CONFIG_UINT32_MAX_PLAYER_LEVEL))
|
||||
{
|
||||
SendNotification(LANG_ARENA_ONE_TOOLOW, sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL));
|
||||
SendNotification(LANG_ARENA_ONE_TOOLOW, sWorld.getConfig(CONFIG_UINT32_MAX_PLAYER_LEVEL));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -475,7 +475,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
|
|||
return;
|
||||
|
||||
// not let enemies sign guild charter
|
||||
if(!sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != sObjectMgr.GetPlayerTeamByGUID(ownerguid))
|
||||
if(!sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != sObjectMgr.GetPlayerTeamByGUID(ownerguid))
|
||||
{
|
||||
if(type != 9)
|
||||
SendArenaTeamCommandResult(ERR_ARENA_TEAM_INVITE_SS, "", "", ERR_ARENA_TEAM_NOT_ALLIED);
|
||||
|
|
@ -486,7 +486,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
|
|||
|
||||
if(type != 9)
|
||||
{
|
||||
if(_player->getLevel() < sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
if(_player->getLevel() < sWorld.getConfig(CONFIG_UINT32_MAX_PLAYER_LEVEL))
|
||||
{
|
||||
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, "", _player->GetName(), ERR_ARENA_TEAM_TARGET_TOO_LOW_S);
|
||||
return;
|
||||
|
|
@ -622,7 +622,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data)
|
|||
|
||||
sLog.outDebug("OFFER PETITION: type %u, GUID1 %u, to player id: %u", type, GUID_LOPART(petitionguid), GUID_LOPART(plguid));
|
||||
|
||||
if (!sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != player->GetTeam() )
|
||||
if (!sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != player->GetTeam() )
|
||||
{
|
||||
if(type != 9)
|
||||
SendArenaTeamCommandResult(ERR_ARENA_TEAM_INVITE_SS, "", "", ERR_ARENA_TEAM_NOT_ALLIED);
|
||||
|
|
@ -633,7 +633,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data)
|
|||
|
||||
if(type != 9)
|
||||
{
|
||||
if(player->getLevel() < sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
if(player->getLevel() < sWorld.getConfig(CONFIG_UINT32_MAX_PLAYER_LEVEL))
|
||||
{
|
||||
// player is too low level to join an arena team
|
||||
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, player->GetName(), "", ERR_ARENA_TEAM_TARGET_TOO_LOW_S);
|
||||
|
|
@ -768,9 +768,9 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
|
|||
signs = 0;
|
||||
|
||||
uint32 count;
|
||||
//if(signs < sWorld.getConfig(CONFIG_MIN_PETITION_SIGNS))
|
||||
//if(signs < sWorld.getConfig(CONFIG_UINT32_MIN_PETITION_SIGNS))
|
||||
if(type == 9)
|
||||
count = sWorld.getConfig(CONFIG_MIN_PETITION_SIGNS);
|
||||
count = sWorld.getConfig(CONFIG_UINT32_MIN_PETITION_SIGNS);
|
||||
else
|
||||
count = type - 1;
|
||||
if(signs < count)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue