Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2023-12-12 20:52:42 +08:00
1088 changed files with 35633 additions and 19812 deletions

View File

@@ -20,11 +20,11 @@
#include "GroupMgr.h"
#include "Log.h"
#include "ObjectAccessor.h"
#include "Pet.h"
#include "Player.h"
#include "ScriptMgr.h"
#include "World.h"
#include "WorldSession.h"
#include "Pet.h"
#include "ScriptMgr.h"
//#include "WorldStatePackets.h"
void ArenaScore::AppendToPacket(WorldPacket& data)

View File

@@ -29,6 +29,7 @@
#include "Creature.h"
#include "CreatureTextMgr.h"
#include "Formulas.h"
#include "GameEventMgr.h"
#include "GameGraveyard.h"
#include "GridNotifiersImpl.h"
#include "GroupMgr.h"
@@ -861,7 +862,7 @@ void Battleground::EndBattleground(PvPTeamId winnerTeamId)
UpdatePlayerScore(player, SCORE_BONUS_HONOR, GetBonusHonorFromKill(winner_kills));
// Xinef: check player level and not bracket level if (CanAwardArenaPoints())
if (player->GetLevel() >= BG_AWARD_ARENA_POINTS_MIN_LEVEL)
if (player->GetLevel() >= sWorld->getIntConfig(CONFIG_DAILY_RBG_MIN_LEVEL_AP_REWARD))
player->ModifyArenaPoints(winner_arena);
if (!player->GetRandomWinner())
@@ -1635,7 +1636,7 @@ bool Battleground::AddSpiritGuide(uint32 type, float x, float y, float z, float
if (Creature* creature = AddCreature(entry, type, x, y, z, o))
{
creature->setDeathState(DEAD);
creature->setDeathState(DeathState::Dead);
creature->SetGuidValue(UNIT_FIELD_CHANNEL_OBJECT, creature->GetGUID());
// aura
/// @todo: Fix display here

View File

@@ -45,7 +45,7 @@ class BattlegroundIC;
struct PvPDifficultyEntry;
struct GraveyardStruct;
enum BattlegroundDesertionType
enum BattlegroundDesertionType : uint8
{
BG_DESERTION_TYPE_LEAVE_BG = 0, // player leaves the BG
BG_DESERTION_TYPE_OFFLINE = 1, // player is kicked from BG because offline
@@ -277,7 +277,6 @@ enum BGHonorMode
BG_HONOR_MODE_NUM
};
#define BG_AWARD_ARENA_POINTS_MIN_LEVEL 71
#define ARENA_TIMELIMIT_POINTS_LOSS -16
#define ARENA_READY_MARKER_ENTRY 301337

View File

@@ -43,6 +43,7 @@
#include "ObjectMgr.h"
#include "Opcodes.h"
#include "Player.h"
#include "ScriptMgr.h"
#include "SharedDefines.h"
#include "World.h"
#include "WorldPacket.h"

View File

@@ -23,8 +23,8 @@
#include "Common.h"
#include "CreatureAIImpl.h"
#include "DBCEnums.h"
#include <unordered_map>
#include <functional>
#include <unordered_map>
typedef std::map<uint32, Battleground*> BattlegroundContainer;
typedef std::set<uint32> BattlegroundClientIdsContainer;

View File

@@ -551,6 +551,6 @@ void BattlegroundAB::ApplyPhaseMask()
for (auto const& itr : bgPlayerMap)
{
itr.second->SetPhaseMask(phaseMask, false);
itr.second->UpdateObjectVisibility(true);
itr.second->UpdateObjectVisibility(true, false);
}
}

View File

@@ -339,7 +339,7 @@ Creature* BattlegroundAV::AddAVCreature(uint16 cinfoid, uint16 type)
//else wander_distance will be 15, so creatures move maximum=10
//creature->SetDefaultMovementType(RANDOM_MOTION_TYPE);
creature->GetMotionMaster()->Initialize();
creature->setDeathState(JUST_DIED);
creature->setDeathState(DeathState::JustDied);
creature->Respawn();
//TODO: find a way to add a motionmaster without killing the creature (i
//just copied this code from a gm-command

View File

@@ -20,8 +20,8 @@
#include "Battleground.h"
#include "BattlegroundScore.h"
#include "Language.h"
#include "EventMap.h"
#include "Language.h"
enum BG_EY_Events
{