SHARE
TWEET

1v1_arena_patch.diff

a guest Apr 24th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp
  2. index 4b8ba05578..03431c32c0 100644
  3. dodac do loadera:
  4. void AddSC_npc_1v1arena();
  5. AddSC_npc_1v1arena();
  6. --- a/src/server/game/Battlegrounds/ArenaTeam.cpp
  7. +++ b/src/server/game/Battlegrounds/ArenaTeam.cpp
  8. @@ -603,6 +603,7 @@ uint8 ArenaTeam::GetSlotByType(uint32 type)
  9.          case ARENA_TEAM_2v2: return 0;
  10.          case ARENA_TEAM_3v3: return 1;
  11.          case ARENA_TEAM_5v5: return 2;
  12. +        case ARENA_TEAM_1v1: return 3; // Custom 1v1 Arena Rated
  13.          default:
  14.              break;
  15.      }
  16. @@ -641,6 +642,8 @@ uint32 ArenaTeam::GetPoints(uint32 memberRating)
  17.          points *= 0.76f;
  18.      else if (Type == ARENA_TEAM_3v3)
  19.          points *= 0.88f;
  20. +    else if (Type == ARENA_TEAM_1v1) //Custom 1v1 Arena Rated
  21. +        points *= 0.70f;
  22.  
  23.      points *= sWorld->getRate(RATE_ARENA_POINTS);
  24.  
  25. diff --git a/src/server/game/Battlegrounds/ArenaTeam.h b/src/server/game/Battlegrounds/ArenaTeam.h
  26. index 87fdd69b6c..a6b5b35bad 100644
  27. --- a/src/server/game/Battlegrounds/ArenaTeam.h
  28. +++ b/src/server/game/Battlegrounds/ArenaTeam.h
  29. @@ -80,6 +80,7 @@ ERR_ARENA_TEAM_LEVEL_TOO_LOW_I
  30.  
  31.  enum ArenaTeamTypes
  32.  {
  33. +    ARENA_TEAM_1v1      = 1, //Custom 1v1 Rated Arena
  34.      ARENA_TEAM_2v2      = 2,
  35.      ARENA_TEAM_3v3      = 3,
  36.      ARENA_TEAM_5v5      = 5
  37. @@ -111,7 +112,7 @@ struct ArenaTeamStats
  38.      uint32 Rank;
  39.  };
  40.  
  41. -#define MAX_ARENA_SLOT 3                                    // 0..2 slots
  42. +#define MAX_ARENA_SLOT 4                                    // 0..3 slots
  43.  
  44.  class TC_GAME_API ArenaTeam
  45.  {
  46. diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
  47. index caa8afe776..b176122aa5 100644
  48. --- a/src/server/game/Battlegrounds/Battleground.cpp
  49. +++ b/src/server/game/Battlegrounds/Battleground.cpp
  50. @@ -427,6 +427,10 @@ inline void Battleground::_ProcessJoin(uint32 diff)
  51.          if (StartMessageIds[BG_STARTING_EVENT_FIRST])
  52.              SendBroadcastText(StartMessageIds[BG_STARTING_EVENT_FIRST], CHAT_MSG_BG_SYSTEM_NEUTRAL);
  53.      }
  54. +
  55. +    //1v1 Arena - Start arena after 15s, when all players are in arena
  56. +    if (GetArenaType() == ARENA_TYPE_1v1 && GetStartDelayTime() > StartDelayTimes[BG_STARTING_EVENT_THIRD] && (m_PlayersCount[0] + m_PlayersCount[1]) == 2)        SetStartDelayTime(StartDelayTimes[BG_STARTING_EVENT_THIRD]);
  57. +
  58.      // After 1 minute or 30 seconds, warning is signaled
  59.      else if (GetStartDelayTime() <= StartDelayTimes[BG_STARTING_EVENT_SECOND] && !(m_Events & BG_STARTING_EVENT_2))
  60.      {
  61. diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h
  62. index 58d40f28f1..276e5b5604 100644
  63. --- a/src/server/game/Battlegrounds/Battleground.h
  64. +++ b/src/server/game/Battlegrounds/Battleground.h
  65. @@ -200,6 +200,7 @@ struct BattlegroundObjectInfo
  66.  
  67.  enum ArenaType
  68.  {
  69. +    ARENA_TYPE_1v1          = 1,
  70.      ARENA_TYPE_2v2          = 2,
  71.      ARENA_TYPE_3v3          = 3,
  72.      ARENA_TYPE_5v5          = 5
  73. diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
  74. index 7e7b4b3e9f..bb006a8d0a 100644
  75. --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp
  76. +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
  77. @@ -152,7 +152,7 @@ void BattlegroundMgr::Update(uint32 diff)
  78.          {
  79.              // forced update for rated arenas (scan all, but skipped non rated)
  80.              TC_LOG_TRACE("bg.arena", "BattlegroundMgr: UPDATING ARENA QUEUES");
  81. -            for (int qtype = BATTLEGROUND_QUEUE_2v2; qtype <= BATTLEGROUND_QUEUE_5v5; ++qtype)
  82. +            for (int qtype = BATTLEGROUND_QUEUE_2v2; qtype <= BATTLEGROUND_QUEUE_1v1; ++qtype)
  83.                  for (int bracket = BG_BRACKET_ID_FIRST; bracket < MAX_BATTLEGROUND_BRACKETS; ++bracket)
  84.                      m_BattlegroundQueues[qtype].BattlegroundQueueUpdate(diff,
  85.                          BATTLEGROUND_AA, BattlegroundBracketId(bracket),
  86. @@ -438,6 +438,9 @@ Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId original
  87.              case ARENA_TYPE_5v5:
  88.                  maxPlayersPerTeam = 5;
  89.                  break;
  90. +            case ARENA_TYPE_1v1:
  91. +                maxPlayersPerTeam = 1;
  92. +                break;
  93.          }
  94.  
  95.          bg->SetMaxPlayersPerTeam(maxPlayersPerTeam);
  96. @@ -772,6 +775,8 @@ BattlegroundQueueTypeId BattlegroundMgr::BGQueueTypeId(BattlegroundTypeId bgType
  97.                      return BATTLEGROUND_QUEUE_3v3;
  98.                  case ARENA_TYPE_5v5:
  99.                      return BATTLEGROUND_QUEUE_5v5;
  100. +                case ARENA_TYPE_1v1:
  101. +                    return BATTLEGROUND_QUEUE_1v1;
  102.                  default:
  103.                      return BATTLEGROUND_QUEUE_NONE;
  104.              }
  105. @@ -801,6 +806,7 @@ BattlegroundTypeId BattlegroundMgr::BGTemplateId(BattlegroundQueueTypeId bgQueue
  106.          case BATTLEGROUND_QUEUE_2v2:
  107.          case BATTLEGROUND_QUEUE_3v3:
  108.          case BATTLEGROUND_QUEUE_5v5:
  109. +        case BATTLEGROUND_QUEUE_1v1:
  110.              return BATTLEGROUND_AA;
  111.          default:
  112.              return BattlegroundTypeId(0);                   // used for unknown template (it exists and does nothing)
  113. @@ -817,6 +823,8 @@ uint8 BattlegroundMgr::BGArenaType(BattlegroundQueueTypeId bgQueueTypeId)
  114.              return ARENA_TYPE_3v3;
  115.          case BATTLEGROUND_QUEUE_5v5:
  116.              return ARENA_TYPE_5v5;
  117. +        case BATTLEGROUND_QUEUE_1v1:
  118. +            return ARENA_TYPE_1v1;
  119.          default:
  120.              return 0;
  121.      }
  122. diff --git a/src/server/shared/SharedDefines.h b/src/server/shared/SharedDefines.h
  123. index 00b9b1f01e..fde27a32e0 100644
  124. --- a/src/server/shared/SharedDefines.h
  125. +++ b/src/server/shared/SharedDefines.h
  126. @@ -3605,6 +3605,7 @@ enum BattlegroundQueueTypeId
  127.      BATTLEGROUND_QUEUE_2v2      = 8,
  128.      BATTLEGROUND_QUEUE_3v3      = 9,
  129.      BATTLEGROUND_QUEUE_5v5      = 10,
  130. +    BATTLEGROUND_QUEUE_1v1      = 11,
  131.      MAX_BATTLEGROUND_QUEUE_TYPES
  132.  };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top