Merge remote-tracking branch 'acore/master' into test-staging

This commit is contained in:
Keleborn
2026-05-22 09:12:43 -07:00
57 changed files with 1574 additions and 97 deletions
+5
View File
@@ -36,6 +36,11 @@ target_compile_options(acore-compile-option-interface
INTERFACE
/utf-8)
target_compile_options(acore-compile-option-interface
INTERFACE
/Zc:preprocessor)
message(STATUS "MSVC: Enabled standard conforming preprocessor")
if(PLATFORM EQUAL 64)
# This definition is necessary to work around a bug with Intellisense described
# here: http://tinyurl.com/2cb428. Syntax highlighting is important for proper
@@ -3388,6 +3388,16 @@ DungeonAccessRequirements.OptionalStringID = 0
JoinBGAndLFG.Enable = 0
#
# LFG.MailItemOnFullInventory
# Description: When a player wins a group roll but their inventory is full, mail
# the item to them instead of leaving it on the corpse.
# Default: 0 - Disabled
# 1 - Only in LFG/RDF groups
# 2 - In all group types
LFG.MailItemOnFullInventory = 0
#
# DungeonFinder.OptionsMask
# Description: Dungeon and raid finder system.
@@ -1369,6 +1369,7 @@ void SmartGameObjectAI::UpdateAI(uint32 diff)
void SmartGameObjectAI::InitializeAI()
{
GetScript()->OnInitialize(me);
aiDataSet.clear();
// Xinef: do not call respawn event if go is not spawned
if (me->isSpawned())
@@ -1437,9 +1438,19 @@ void SmartGameObjectAI::SetData(uint32 id, uint32 value, WorldObject* invoker)
gob = invoker->ToGameObject();
}
aiDataSet[id] = value;
GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, unit, id, value, false, nullptr, gob);
}
uint32 SmartGameObjectAI::GetData(uint32 id) const
{
std::unordered_map<uint32, uint32>::const_iterator itr = aiDataSet.find(id);
if (itr != aiDataSet.end())
return itr->second;
return 0;
}
void SmartGameObjectAI::SetScript9(SmartScriptHolder& e, uint32 entry, WorldObject* invoker)
{
if (invoker)
@@ -304,6 +304,7 @@ public:
void Destroyed(Player* player, uint32 eventId) override;
void SetData(uint32 id, uint32 value) override { SetData(id, value, nullptr); }
void SetData(uint32 id, uint32 value, WorldObject* invoker);
uint32 GetData(uint32 id) const override;
void SetScript9(SmartScriptHolder& e, uint32 entry, WorldObject* invoker);
void OnGameEvent(bool start, uint16 eventId) override;
void OnStateChanged(uint32 state, Unit* unit) override;
@@ -324,6 +325,7 @@ public:
protected:
SmartScript mScript;
std::unordered_map<uint32, uint32> aiDataSet;
};
/// Registers scripts required by the SAI scripting system
@@ -1463,6 +1463,35 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
}
break;
}
case SMART_ACTION_INC_DATA:
{
WorldObject* invoker = me ? static_cast<WorldObject*>(me) : static_cast<WorldObject*>(go);
for (WorldObject* target : targets)
{
if (Creature* cTarget = target->ToCreature())
{
if (SmartAI* smartAI = CAST_AI(SmartAI, cTarget->AI()))
{
uint32 const newValue = smartAI->GetData(e.action.setData.field) + e.action.setData.data;
smartAI->SetData(e.action.setData.field, newValue, invoker);
}
else
LOG_ERROR("sql.sql", "SmartScript: Action target for SMART_ACTION_INC_DATA is not using SmartAI, skipping");
}
else if (GameObject* oTarget = target->ToGameObject())
{
if (SmartGameObjectAI* smartGOAI = CAST_AI(SmartGameObjectAI, oTarget->AI()))
{
uint32 const newValue = smartGOAI->GetData(e.action.setData.field) + e.action.setData.data;
smartGOAI->SetData(e.action.setData.field, newValue, invoker);
}
else
LOG_ERROR("sql.sql", "SmartScript: Action target for SMART_ACTION_INC_DATA is not using SmartGameObjectAI, skipping");
}
}
break;
}
case SMART_ACTION_MOVE_FORWARD:
{
if (!me)
@@ -759,6 +759,7 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e)
case SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL: return sizeof(SmartAction::morphOrMount);
case SMART_ACTION_SET_INGAME_PHASE_MASK: return sizeof(SmartAction::ingamePhaseMask);
case SMART_ACTION_SET_DATA: return sizeof(SmartAction::setData);
case SMART_ACTION_INC_DATA: return sizeof(SmartAction::setData);
case SMART_ACTION_MOVE_FORWARD: return sizeof(SmartAction::moveRandom);
case SMART_ACTION_ATTACK_STOP: return NO_PARAMS;
case SMART_ACTION_SET_VISIBILITY: return sizeof(SmartAction::visibility);
@@ -1975,6 +1976,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_THREAT_SINGLE_PCT:
case SMART_ACTION_SET_INST_DATA64:
case SMART_ACTION_SET_DATA:
case SMART_ACTION_INC_DATA:
case SMART_ACTION_MOVE_FORWARD:
case SMART_ACTION_ESCORT_PAUSE:
case SMART_ACTION_SET_FLY:
@@ -726,8 +726,9 @@ enum SMART_ACTION
SMART_ACTION_SET_ANIM_TIER = 239, // animtier
SMART_ACTION_SET_GOSSIP_MENU = 240, // gossipMenuId
SMART_ACTION_SUMMON_GAMEOBJECT_GROUP = 241, // group
SMART_ACTION_INC_DATA = 242, // field, increment (uses aiDataSet, wipe-safe across evade)
SMART_ACTION_AC_END = 242, // placeholder
SMART_ACTION_AC_END = 243, // placeholder
};
enum class SmartActionSummonCreatureFlags
+2
View File
@@ -681,6 +681,8 @@ enum RBACPermissions
RBAC_PERM_COMMAND_RESPAWN_GAMEOBJECT_GUID = 917,
RBAC_PERM_COMMAND_RESPAWN_CREATURE_ENTRY = 918,
RBAC_PERM_COMMAND_RESPAWN_GAMEOBJECT_ENTRY = 919,
RBAC_PERM_COMMAND_DEBUG_INFO = 920,
RBAC_PERM_COMMAND_DEBUG_COSMETIC = 921,
// custom permissions 1000+
RBAC_PERM_MAX
};
+11 -9
View File
@@ -129,17 +129,16 @@ void Battlefield::HandlePlayerLeaveZone(Player* player, uint32 /*zone*/)
for (BfCapturePoint* cp : CapturePoints)
cp->HandlePlayerLeave(player);
InvitedPlayers[player->GetTeamId()].erase(player->GetGUID());
PlayersInQueue[player->GetTeamId()].erase(player->GetGUID());
PlayersWillBeKick[player->GetTeamId()].erase(player->GetGUID());
Players[player->GetTeamId()].erase(player->GetGUID());
for (uint8 i = 0; i < PVP_TEAMS_COUNT; ++i)
{
InvitedPlayers[i].erase(player->GetGUID());
PlayersInQueue[i].erase(player->GetGUID());
PlayersWillBeKick[i].erase(player->GetGUID());
Players[i].erase(player->GetGUID());
}
SendRemoveWorldStates(player);
RemovePlayerFromResurrectQueue(player->GetGUID());
OnPlayerLeaveZone(player);
// Scripts must restore player->GetTeamId() here (e.g. ClearFakePlayer).
// All Battlefield data-structure cleanup above has already completed using
// the assigned team, so it is safe to restore the real team now.
sScriptMgr->OnBattlefieldPlayerLeaveZone(this, player);
}
bool Battlefield::Update(uint32 diff)
@@ -379,7 +378,10 @@ void Battlefield::DoPlaySoundToAll(uint32 soundId)
bool Battlefield::HasPlayer(Player* player) const
{
return Players[player->GetTeamId()].find(player->GetGUID()) != Players[player->GetTeamId()].end();
for (uint8 i = 0; i < PVP_TEAMS_COUNT; ++i)
if (Players[i].count(player->GetGUID()))
return true;
return false;
}
// Called in WorldSession::HandleBfQueueInviteResponse
@@ -17,6 +17,7 @@
#include "BattlefieldMgr.h"
#include "Player.h"
#include "ScriptMgr.h"
#include "Zones/BattlefieldWG.h"
BattlefieldMgr::BattlefieldMgr() : _updateTimer(0)
@@ -86,6 +87,7 @@ void BattlefieldMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneId)
// teleport: remove once in removefromworld, once in updatezone
if (!itr->second->HasPlayer(player))
return;
sScriptMgr->OnBattlefieldPlayerLeaveZone(itr->second, player);
itr->second->HandlePlayerLeaveZone(player, zoneId);
LOG_DEBUG("bg.battlefield", "Player {} left outdoorpvp id {}", player->GetGUID().ToString(), itr->second->GetTypeId());
}
@@ -21,6 +21,7 @@
#include "AreaDefines.h"
#include "BattlefieldWG.h"
#include "ScriptMgr.h"
#include "Chat.h"
#include "GameTime.h"
#include "MapMgr.h"
@@ -722,16 +723,19 @@ void BattlefieldWG::HandleKill(Player* killer, Unit* victim)
// xinef: tower cannons also grant rank
if (victim->IsPlayer() || IsKeepNpc(victim->GetEntry()) || victim->GetEntry() == NPC_WINTERGRASP_TOWER_CANNON)
{
if (victim->IsPlayer() && victim->HasAura(SPELL_LIEUTENANT))
if (Player* victimPlayer = victim->ToPlayer())
{
// Quest - Wintergrasp - PvP Kill - Horde/Alliance
for (ObjectGuid const& playerGuid : PlayersInWar[killerTeam])
sScriptMgr->OnBattlefieldPlayerKill(this, killer, victimPlayer);
if (victimPlayer->HasAura(SPELL_LIEUTENANT))
{
if (Player* player = ObjectAccessor::FindPlayer(playerGuid))
// Quest - Wintergrasp - PvP Kill - Horde/Alliance
for (ObjectGuid const& playerGuid : PlayersInWar[killerTeam])
{
if (player->GetDistance2d(killer) < 40)
if (Player* player = ObjectAccessor::FindPlayer(playerGuid))
{
player->KilledMonsterCredit(killerTeam == TEAM_HORDE ? NPC_QUEST_PVP_KILL_ALLIANCE : NPC_QUEST_PVP_KILL_HORDE);
if (player->GetDistance2d(killer) < 40)
player->KilledMonsterCredit(killerTeam == TEAM_HORDE ? NPC_QUEST_PVP_KILL_ALLIANCE : NPC_QUEST_PVP_KILL_HORDE);
}
}
}
@@ -703,13 +703,21 @@ void BattlegroundSA::OverrideGunFaction()
for (uint8 i = BG_SA_GUN_1; i <= BG_SA_GUN_10; i++)
{
if (Creature* gun = GetBGCreature(i))
{
gun->SetFaction(BG_SA_Factions[Attackers ? TEAM_ALLIANCE : TEAM_HORDE]);
// NullCreatureAI never evades and PvE combat refs have no timer,
// so attackers would stay in combat until death after damaging it.
gun->SetIsCombatDisallowed(true);
}
}
for (uint8 i = BG_SA_DEMOLISHER_1; i <= BG_SA_DEMOLISHER_4; i++)
{
if (Creature* dem = GetBGCreature(i))
{
dem->SetFaction(BG_SA_Factions[Attackers]);
dem->SetIsCombatDisallowed(true);
}
}
}
@@ -968,7 +976,10 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
BG_SA_NpcSpawnlocs[j][2], BG_SA_NpcSpawnlocs[j][3], 600);
if (Creature* dem = GetBGCreature(j))
{
dem->SetFaction(BG_SA_Factions[Attackers]);
dem->SetIsCombatDisallowed(true);
}
}
UpdateWorldState(WORLD_STATE_BATTLEGROUND_SA_LEFT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE ? 1 : 0));
@@ -999,7 +1010,10 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
BG_SA_NpcSpawnlocs[j][2], BG_SA_NpcSpawnlocs[j][3], 600);
if (Creature* dem = GetBGCreature(j))
{
dem->SetFaction(BG_SA_Factions[Attackers]);
dem->SetIsCombatDisallowed(true);
}
}
UpdateWorldState(WORLD_STATE_BATTLEGROUND_SA_RIGHT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE ? 1 : 0));
+5
View File
@@ -967,6 +967,11 @@ std::string CliHandler::GetAcoreString(uint32 entry) const
return sObjectMgr->GetAcoreStringForDBCLocale(entry);
}
std::string const* CliHandler::GetModuleString(std::string module, uint32 id) const
{
return sObjectMgr->GetModuleString(module, id, LocaleConstant(sObjectMgr->GetDBCLocaleIndex()));
}
void CliHandler::SendSysMessage(std::string_view str, bool /*escapeCharacters*/)
{
m_print(m_callbackArg, str);
+2 -1
View File
@@ -163,7 +163,7 @@ public:
return Acore::StringFormat(GetAcoreString(entry), std::forward<Args>(args)...);
}
std::string const* GetModuleString(std::string module, uint32 id) const;
virtual std::string const* GetModuleString(std::string module, uint32 id) const;
template<typename... Args>
void PSendModuleSysMessage(std::string module, uint32 id, Args&&... args)
@@ -267,6 +267,7 @@ public:
// overwrite functions
std::string GetAcoreString(uint32 entry) const override;
std::string const* GetModuleString(std::string module, uint32 id) const override;
void SendSysMessage(std::string_view, bool escapeCharacters) override;
bool ParseCommands(std::string_view str) override;
std::string GetNameLink() const override;
+1
View File
@@ -1669,6 +1669,7 @@ public:
[[nodiscard]] PlayerMails const& GetMails() const { return m_mail; }
void SendItemRetrievalMail(uint32 itemEntry, uint32 count); // Item retrieval mails sent by The Postmaster (34337)
void SendItemRetrievalMail(std::vector<std::pair<uint32, uint32>> mailItems); // Item retrieval mails sent by The Postmaster (34337)
void SendItemRetrievalMail(Item* item); // As above, but for a pre-created item (preserves randomPropertyId)
/*********************************************************/
/*** MAILED ITEMS SYSTEM ***/
@@ -508,3 +508,16 @@ void Player::SendItemRetrievalMail(std::vector<std::pair<uint32, uint32>> mailIt
CharacterDatabase.CommitTransaction(trans);
}
void Player::SendItemRetrievalMail(Item* item)
{
if (!item)
return;
CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction();
item->SaveToDB(trans);
MailDraft("Recovered Item", "We recovered a lost item in the twisting nether and noted that it was yours.$B$BPlease find said object enclosed.")
.AddItem(item)
.SendMailTo(trans, MailReceiver(this, GetGUID().GetCounter()), MailSender(MAIL_CREATURE, 34337 /* The Postmaster */));
CharacterDatabase.CommitTransaction(trans);
}
@@ -422,6 +422,7 @@ bool Player::CanRewardQuest(Quest const* quest, bool msg)
void Player::AddQuestAndCheckCompletion(Quest const* quest, Object* questGiver)
{
AddQuest(quest, questGiver);
sScriptMgr->OnPlayerQuestAccept(this, quest);
if (CanCompleteQuest(quest->GetQuestId()))
CompleteQuest(quest->GetQuestId());
@@ -5425,6 +5425,11 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, CharacterDatabaseQueryHolder cons
uint32 extraflags = fields[36].Get<uint16>();
// Mirror before the gate below so saved bits survive when the gate
// skips effect application; otherwise the next SaveToDB writes 0
// over them.
m_ExtraFlags = extraflags;
_LoadPetStable(fields[37].Get<uint8>(), holder.GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_PET_SLOTS));
m_atLoginFlags = fields[38].Get<uint16>();
+4 -1
View File
@@ -506,6 +506,9 @@ void Vehicle::RemovePassenger(Unit* unit)
seat->second.Passenger.Reset();
// RemoveCharmedBy() clears MOVEMENTFLAG_FLYING, so cache this before uncharm.
bool wasFlying = _me->IsFlying();
if (_me->IsCreature() && unit->IsPlayer() && seat->second.SeatInfo->m_flags & VEHICLE_SEAT_FLAG_CAN_CONTROL)
_me->RemoveCharmedBy(unit);
@@ -521,7 +524,7 @@ void Vehicle::RemovePassenger(Unit* unit)
}
// only for flyable vehicles
if (_me->IsFlying() && !_me->GetInstanceId() && unit->IsPlayer() && !(unit->ToPlayer()->GetDelayedOperations() & DELAYED_VEHICLE_TELEPORT) && _me->GetEntry() != 30275 /*NPC_WILD_WYRM*/)
if (wasFlying && !_me->GetInstanceId() && unit->IsPlayer() && !(unit->ToPlayer()->GetDelayedOperations() & DELAYED_VEHICLE_TELEPORT) && _me->GetEntry() != 30275 /*NPC_WILD_WYRM*/)
_me->CastSpell(unit, VEHICLE_SPELL_PARACHUTE, true);
if (_me->IsCreature())
+32 -6
View File
@@ -1497,9 +1497,22 @@ void Group::CountTheRoll(Rolls::iterator rollI, Map* allowedMap)
}
else
{
item->is_blocked = false;
item->rollWinnerGUID = player->GetGUID();
player->SendEquipError(msg, nullptr, nullptr, roll->itemid);
uint32 mailOnFull = sWorld->getIntConfig(CONFIG_LFG_MAIL_ITEM_ON_FULL_INVENTORY);
if (mailOnFull == MAIL_ITEM_ON_FULL_INVENTORY_EVERYWHERE || (mailOnFull == MAIL_ITEM_ON_FULL_INVENTORY_LFG_ONLY && isLFGGroup()))
{
item->is_looted = true;
roll->getLoot()->NotifyItemRemoved(roll->itemSlot);
roll->getLoot()->unlootedCount--;
player->SendEquipError(msg, nullptr, nullptr, roll->itemid);
if (Item* mailItem = Item::CreateItem(roll->itemid, item->count, player, false, item->randomPropertyId))
player->SendItemRetrievalMail(mailItem);
}
else
{
item->is_blocked = false;
item->rollWinnerGUID = player->GetGUID();
player->SendEquipError(msg, nullptr, nullptr, roll->itemid);
}
}
}
}
@@ -1567,9 +1580,22 @@ void Group::CountTheRoll(Rolls::iterator rollI, Map* allowedMap)
}
else
{
item->is_blocked = false;
item->rollWinnerGUID = player->GetGUID();
player->SendEquipError(msg, nullptr, nullptr, roll->itemid);
uint32 mailOnFull = sWorld->getIntConfig(CONFIG_LFG_MAIL_ITEM_ON_FULL_INVENTORY);
if (mailOnFull == MAIL_ITEM_ON_FULL_INVENTORY_EVERYWHERE || (mailOnFull == MAIL_ITEM_ON_FULL_INVENTORY_LFG_ONLY && isLFGGroup()))
{
item->is_looted = true;
roll->getLoot()->NotifyItemRemoved(roll->itemSlot);
roll->getLoot()->unlootedCount--;
player->SendEquipError(msg, nullptr, nullptr, roll->itemid);
if (Item* mailItem = Item::CreateItem(roll->itemid, item->count, player, false, item->randomPropertyId))
player->SendItemRetrievalMail(mailItem);
}
else
{
item->is_blocked = false;
item->rollWinnerGUID = player->GetGUID();
player->SendEquipError(msg, nullptr, nullptr, roll->itemid);
}
}
}
else if (rollvote == DISENCHANT)
+7
View File
@@ -128,6 +128,13 @@ enum lfgGroupFlags
GROUP_LFG_FLAG_IS_HEROIC = 0x004
};
enum MailItemOnFullInventory
{
MAIL_ITEM_ON_FULL_INVENTORY_DISABLED = 0,
MAIL_ITEM_ON_FULL_INVENTORY_LFG_ONLY = 1,
MAIL_ITEM_ON_FULL_INVENTORY_EVERYWHERE = 2,
};
enum DifficultyPreventionChangeType
{
DIFFICULTY_PREVENTION_CHANGE_NONE = 0,
@@ -49,6 +49,11 @@ void ScriptMgr::OnBattlefieldWarEnd(Battlefield* bf, bool endByTimer)
CALL_ENABLED_HOOKS(BattlefieldScript, BATTLEFIELDHOOK_ON_WAR_END, script->OnBattlefieldWarEnd(bf, endByTimer));
}
void ScriptMgr::OnBattlefieldPlayerKill(Battlefield* bf, Player* killer, Player* victim)
{
CALL_ENABLED_HOOKS(BattlefieldScript, BATTLEFIELDHOOK_ON_PLAYER_KILL, script->OnBattlefieldPlayerKill(bf, killer, victim));
}
BattlefieldScript::BattlefieldScript(char const* name, std::vector<uint16> enabledHooks) :
ScriptObject(name, BATTLEFIELDHOOK_END)
{
@@ -29,6 +29,7 @@ enum BattlefieldHook
BATTLEFIELDHOOK_ON_PLAYER_LEAVE_WAR, // 3 - fires after player is removed from the active war
BATTLEFIELDHOOK_BEFORE_INVITE_PLAYER_TO_WAR, // 4 - fires in InvitePlayerToWar before InvitedPlayers insert
BATTLEFIELDHOOK_ON_WAR_END, // 5 - fires in EndBattle after OnBattleEnd(), before timer reset
BATTLEFIELDHOOK_ON_PLAYER_KILL, // 6 - fires in HandleKill for every player-kills-player event
BATTLEFIELDHOOK_END
};
@@ -99,6 +100,17 @@ public:
* @param endByTimer True if the war ended by the countdown timer expiring
*/
virtual void OnBattlefieldWarEnd(Battlefield* /*bf*/, bool /*endByTimer*/) { }
/**
* @brief Called inside BattlefieldWG::HandleKill for every player-kills-player event,
* regardless of the victim's WG rank. Fired before the core's own lieutenant-gated
* quest-credit loop so modules may grant credit for non-lieutenant kills.
*
* @param bf The Battlefield instance
* @param killer The player who landed the killing blow
* @param victim The player who was killed
*/
virtual void OnBattlefieldPlayerKill(Battlefield* /*bf*/, Player* /*killer*/, Player* /*victim*/) { }
};
#endif // SCRIPT_OBJECT_BATTLEFIELD_SCRIPT_H_
@@ -858,6 +858,11 @@ void ScriptMgr::OnPlayerQuestAbandon(Player* player, uint32 questId)
CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_QUEST_ABANDON, script->OnPlayerQuestAbandon(player, questId));
}
void ScriptMgr::OnPlayerQuestAccept(Player* player, Quest const* quest)
{
CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_PLAYER_QUEST_ACCEPT, script->OnPlayerQuestAccept(player, quest));
}
// Player anti cheat
void ScriptMgr::AnticheatSetCanFlybyServer(Player* player, bool apply)
{
@@ -196,6 +196,7 @@ enum PlayerHook
PLAYERHOOK_ON_PLAYER_ENTER_COMBAT,
PLAYERHOOK_ON_PLAYER_LEAVE_COMBAT,
PLAYERHOOK_ON_QUEST_ABANDON,
PLAYERHOOK_ON_PLAYER_QUEST_ACCEPT,
PLAYERHOOK_ON_GET_QUEST_RATE,
PLAYERHOOK_ON_CAN_PLAYER_FLY_IN_ZONE,
PLAYERHOOK_ANTICHEAT_SET_CAN_FLY_BY_SERVER,
@@ -737,6 +738,14 @@ public:
*/
virtual void OnPlayerQuestAbandon(Player* /*player*/, uint32 /*questId*/) { }
/**
* @brief This hook called after a player accepts a quest, regardless of quest giver type
*
* @param player Contains information about the Player
* @param quest Contains information about the Quest
*/
virtual void OnPlayerQuestAccept(Player* /*player*/, Quest const* /*quest*/) { }
/**
* @brief This hook called before other CanFlyChecks are applied
*
+2
View File
@@ -475,6 +475,7 @@ public: /* PlayerScript */
void OnPlayerEnterCombat(Player* player, Unit* enemy);
void OnPlayerLeaveCombat(Player* player);
void OnPlayerQuestAbandon(Player* player, uint32 questId);
void OnPlayerQuestAccept(Player* player, Quest const* quest);
bool OnPlayerCanSendErrorAlreadyLooted(Player* player);
void OnPlayerAfterCreatureLoot(Player* player);
void OnPlayerAfterCreatureLootMoney(Player* player);
@@ -609,6 +610,7 @@ public: /* BattlefieldScript */
void OnBattlefieldPlayerLeaveWar(Battlefield* bf, Player* player);
void OnBattlefieldBeforeInvitePlayerToWar(Battlefield* bf, Player* player);
void OnBattlefieldWarEnd(Battlefield* bf, bool endByTimer);
void OnBattlefieldPlayerKill(Battlefield* bf, Player* killer, Player* victim);
public: /* BGScript */
void OnBattlegroundStart(Battleground* bg);
+2 -2
View File
@@ -2111,8 +2111,8 @@ void Spell::SearchChainTargets(std::list<WorldObject*>& targets, uint32 chainTar
jumpRadius = 7.5f;
break;
case SPELL_DAMAGE_CLASS_MELEE:
// 5y for swipe, cleave and similar
jumpRadius = 5.0f;
// 10y for swipe, cleave and similar
jumpRadius = 10.0f;
break;
case SPELL_DAMAGE_CLASS_NONE:
case SPELL_DAMAGE_CLASS_MAGIC:
@@ -562,11 +562,15 @@ void SpellMgr::LoadSpellInfoCorrections()
20184, // Judgement of Justice
20185, // Judgement of Light
20186, // Judgement of Wisdom
20267, // Judgement of Light (triggered heal on attacker)
20268, // Judgement of Wisdom (triggered mana on attacker)
68055 // Judgements of the Just
}, [](SpellInfo* spellInfo)
{
// hack for seal of light and few spells, judgement consists of few single casts and each of them can proc
// some spell, base one has disabled proc flag but those dont have this flag
// 20267/20268 are passive proc effects from the judgement debuff; they must not cause the paladin's
// on-heal/on-cast procs (e.g. Soul Preserver, which has CAN_PROC_FROM_PROCS) to fire
spellInfo->AttributesEx3 |= SPELL_ATTR3_SUPPRESS_CASTER_PROCS;
});
+2
View File
@@ -494,6 +494,8 @@ void WorldConfig::BuildConfigCache()
SetConfigValue<bool>(CONFIG_ALLOW_JOIN_BG_AND_LFG, "JoinBGAndLFG.Enable", false);
SetConfigValue<uint32>(CONFIG_LFG_MAIL_ITEM_ON_FULL_INVENTORY, "LFG.MailItemOnFullInventory", 0);
SetConfigValue<bool>(CONFIG_LEAVE_GROUP_ON_LOGOUT, "LeaveGroupOnLogout.Enabled", false);
SetConfigValue<uint32>(CONFIG_RANDOM_ROLL_MAXIMUM, "Group.RandomRollMaximum", 1000000);
+1
View File
@@ -375,6 +375,7 @@ enum ServerConfigs
CONFIG_LOOT_NEED_BEFORE_GREED_ILVL_RESTRICTION,
CONFIG_LFG_MAX_KICK_COUNT,
CONFIG_LFG_KICK_PREVENTION_TIMER,
CONFIG_LFG_MAIL_ITEM_ON_FULL_INVENTORY,
CONFIG_CHANGE_FACTION_MAX_MONEY,
CONFIG_WATER_BREATH_TIMER,
CONFIG_DAILY_RBG_MIN_LEVEL_AP_REWARD,
+53 -53
View File
@@ -58,71 +58,71 @@ public:
{
static ChatCommandTable debugPlayCommandTable =
{
{ "cinematic", HandleDebugPlayCinematicCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "movie", HandleDebugPlayMovieCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "sound", HandleDebugPlaySoundCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "music", HandleDebugPlayMusicCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "visual", HandleDebugVisualCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No }
{ "cinematic", HandleDebugPlayCinematicCommand, rbac::RBAC_PERM_COMMAND_DEBUG_COSMETIC, Console::No },
{ "movie", HandleDebugPlayMovieCommand, rbac::RBAC_PERM_COMMAND_DEBUG_COSMETIC, Console::No },
{ "sound", HandleDebugPlaySoundCommand, rbac::RBAC_PERM_COMMAND_DEBUG_COSMETIC, Console::No },
{ "music", HandleDebugPlayMusicCommand, rbac::RBAC_PERM_COMMAND_DEBUG_COSMETIC, Console::No },
{ "visual", HandleDebugVisualCommand, rbac::RBAC_PERM_COMMAND_DEBUG_COSMETIC, Console::No }
};
static ChatCommandTable debugSendCommandTable =
{
{ "buyerror", HandleDebugSendBuyErrorCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "channelnotify", HandleDebugSendChannelNotifyCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "chatmessage", HandleDebugSendChatMsgCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "equiperror", HandleDebugSendEquipErrorCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "largepacket", HandleDebugSendLargePacketCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "opcode", HandleDebugSendOpcodeCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "qpartymsg", HandleDebugSendQuestPartyMsgCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "qinvalidmsg", HandleDebugSendQuestInvalidMsgCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "sellerror", HandleDebugSendSellErrorCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "setphaseshift", HandleDebugSendSetPhaseShiftCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "spellfail", HandleDebugSendSpellFailCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No }
{ "buyerror", HandleDebugSendBuyErrorCommand, rbac::RBAC_PERM_COMMAND_DEBUG_COSMETIC, Console::No },
{ "channelnotify", HandleDebugSendChannelNotifyCommand, rbac::RBAC_PERM_COMMAND_DEBUG_COSMETIC, Console::No },
{ "chatmessage", HandleDebugSendChatMsgCommand, rbac::RBAC_PERM_COMMAND_DEBUG_COSMETIC, Console::No },
{ "equiperror", HandleDebugSendEquipErrorCommand, rbac::RBAC_PERM_COMMAND_DEBUG_COSMETIC, Console::No },
{ "largepacket", HandleDebugSendLargePacketCommand, rbac::RBAC_PERM_COMMAND_DEBUG_COSMETIC, Console::No },
{ "opcode", HandleDebugSendOpcodeCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "qpartymsg", HandleDebugSendQuestPartyMsgCommand, rbac::RBAC_PERM_COMMAND_DEBUG_COSMETIC, Console::No },
{ "qinvalidmsg", HandleDebugSendQuestInvalidMsgCommand, rbac::RBAC_PERM_COMMAND_DEBUG_COSMETIC, Console::No },
{ "sellerror", HandleDebugSendSellErrorCommand, rbac::RBAC_PERM_COMMAND_DEBUG_COSMETIC, Console::No },
{ "setphaseshift", HandleDebugSendSetPhaseShiftCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "spellfail", HandleDebugSendSpellFailCommand, rbac::RBAC_PERM_COMMAND_DEBUG_COSMETIC, Console::No }
};
static ChatCommandTable debugCommandTable =
{
{ "setbit", HandleDebugSet32BitCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "threat", HandleDebugThreatListCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "threatinfo", HandleDebugThreatInfoCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "combat", HandleDebugCombatListCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "hostile", HandleDebugHostileRefListCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "anim", HandleDebugAnimCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "arena", HandleDebugArenaCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "bg", HandleDebugBattlegroundCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::Yes},
{ "cooldown", HandleDebugCooldownCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "getitemstate", HandleDebugGetItemStateCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "lootrecipient", HandleDebugGetLootRecipientCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "getvalue", HandleDebugGetValueCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "getitemvalue", HandleDebugGetItemValueCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "Mod32Value", HandleDebugMod32ValueCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "setbit", HandleDebugSet32BitCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "threat", HandleDebugThreatListCommand, rbac::RBAC_PERM_COMMAND_DEBUG_INFO, Console::No },
{ "threatinfo", HandleDebugThreatInfoCommand, rbac::RBAC_PERM_COMMAND_DEBUG_INFO, Console::No },
{ "combat", HandleDebugCombatListCommand, rbac::RBAC_PERM_COMMAND_DEBUG_INFO, Console::No },
{ "hostile", HandleDebugHostileRefListCommand, rbac::RBAC_PERM_COMMAND_DEBUG_INFO, Console::No },
{ "anim", HandleDebugAnimCommand, rbac::RBAC_PERM_COMMAND_DEBUG_COSMETIC, Console::No },
{ "arena", HandleDebugArenaCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "bg", HandleDebugBattlegroundCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::Yes},
{ "cooldown", HandleDebugCooldownCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "getitemstate", HandleDebugGetItemStateCommand, rbac::RBAC_PERM_COMMAND_DEBUG_INFO, Console::No },
{ "lootrecipient", HandleDebugGetLootRecipientCommand, rbac::RBAC_PERM_COMMAND_DEBUG_INFO, Console::No },
{ "getvalue", HandleDebugGetValueCommand, rbac::RBAC_PERM_COMMAND_DEBUG_INFO, Console::No },
{ "getitemvalue", HandleDebugGetItemValueCommand, rbac::RBAC_PERM_COMMAND_DEBUG_INFO, Console::No },
{ "Mod32Value", HandleDebugMod32ValueCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "play", debugPlayCommandTable },
{ "send", debugSendCommandTable },
{ "setaurastate", HandleDebugSetAuraStateCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "setitemvalue", HandleDebugSetItemValueCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "setvalue", HandleDebugSetValueCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "spawnvehicle", HandleDebugSpawnVehicleCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "setvid", HandleDebugSetVehicleIdCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "entervehicle", HandleDebugEnterVehicleCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "uws", HandleDebugUpdateWorldStateCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "update", HandleDebugUpdateCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "itemexpire", HandleDebugItemExpireCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "areatriggers", HandleDebugAreaTriggersCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "lfg", HandleDebugDungeonFinderCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::Yes},
{ "loot", HandleDebugLootCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::Yes},
{ "los", HandleDebugLoSCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "moveflags", HandleDebugMoveflagsCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "unitstate", HandleDebugUnitStateCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "objectcount", HandleDebugObjectCountCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::Yes},
{ "dummy", HandleDebugDummyCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "mapdata", HandleDebugMapDataCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "boundary", HandleDebugBoundaryCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "visibilitydata", HandleDebugVisibilityDataCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "factionchange", HandleDebugFactionChangeCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::Yes},
{ "zonestats", HandleDebugZoneStatsCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::Yes}
{ "setaurastate", HandleDebugSetAuraStateCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "setitemvalue", HandleDebugSetItemValueCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "setvalue", HandleDebugSetValueCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "spawnvehicle", HandleDebugSpawnVehicleCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "setvid", HandleDebugSetVehicleIdCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "entervehicle", HandleDebugEnterVehicleCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "uws", HandleDebugUpdateWorldStateCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "update", HandleDebugUpdateCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "itemexpire", HandleDebugItemExpireCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "areatriggers", HandleDebugAreaTriggersCommand, rbac::RBAC_PERM_COMMAND_DEBUG_INFO, Console::No },
{ "lfg", HandleDebugDungeonFinderCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::Yes},
{ "loot", HandleDebugLootCommand, rbac::RBAC_PERM_COMMAND_DEBUG_INFO, Console::Yes},
{ "los", HandleDebugLoSCommand, rbac::RBAC_PERM_COMMAND_DEBUG_INFO, Console::No },
{ "moveflags", HandleDebugMoveflagsCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "unitstate", HandleDebugUnitStateCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "objectcount", HandleDebugObjectCountCommand, rbac::RBAC_PERM_COMMAND_DEBUG_INFO, Console::Yes},
{ "dummy", HandleDebugDummyCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No },
{ "mapdata", HandleDebugMapDataCommand, rbac::RBAC_PERM_COMMAND_DEBUG_INFO, Console::No },
{ "boundary", HandleDebugBoundaryCommand, rbac::RBAC_PERM_COMMAND_DEBUG_COSMETIC, Console::No },
{ "visibilitydata", HandleDebugVisibilityDataCommand, rbac::RBAC_PERM_COMMAND_DEBUG_INFO, Console::No },
{ "factionchange", HandleDebugFactionChangeCommand, rbac::RBAC_PERM_COMMAND_DEBUG_INFO, Console::Yes},
{ "zonestats", HandleDebugZoneStatsCommand, rbac::RBAC_PERM_COMMAND_DEBUG_INFO, Console::Yes}
};
static ChatCommandTable commandTable =
{
{ "debug", debugCommandTable },
{ "wpgps", HandleWPGPSCommand, rbac::RBAC_PERM_COMMAND_DEBUG, Console::No }
{ "wpgps", HandleWPGPSCommand, rbac::RBAC_PERM_COMMAND_DEBUG_COSMETIC, Console::No }
};
return commandTable;
}
@@ -1190,7 +1190,7 @@ public:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
me->CastSpell(target, SPELL_ARTHAS_EXORCISM, false);
combatEvents.Repeat(7300ms);
combatEvents.Repeat(7s, 14s);
break;
case EVENT_COMBAT_HEALTH_CHECK:
if (HealthBelowPct(40))
@@ -1247,8 +1247,8 @@ void npc_arthas::npc_arthasAI::JustEngagedWith(Unit* /*who*/)
DoCast(me, SPELL_ARTHAS_AURA);
// Fight
combatEvents.ScheduleEvent(EVENT_COMBAT_EXORCISM, 2s);
combatEvents.ScheduleEvent(EVENT_COMBAT_HEALTH_CHECK, 2s);
combatEvents.RescheduleEvent(EVENT_COMBAT_EXORCISM, 7s, 14s);
combatEvents.RescheduleEvent(EVENT_COMBAT_HEALTH_CHECK, 2s);
}
void npc_arthas::npc_arthasAI::ReorderInstance(uint32 data)
@@ -382,7 +382,11 @@ public:
if (Creature* leader = GetCreature(NPC_SYLVANAS_PART2))
leader->setActive(false);
if (Creature* lichKing = GetCreature(NPC_LICH_KING_BOSS))
{
lichKing->GetThreatMgr().ClearAllThreat();
lichKing->CombatStop(true);
lichKing->setActive(false);
}
_isLichKingFightActive = false;
_outroStep = 1;
_outroTimer = 0;
@@ -342,7 +342,7 @@ struct boss_blindeye_the_seer : public ScriptedAI
DoCast(target, SPELL_HEAL);
}
context.Repeat(7200ms);
}).Schedule(37500s, [this](TaskContext context)
}).Schedule(37500ms, [this](TaskContext context)
{
DoCastSelf(SPELL_GREATER_PW_SHIELD);
_scheduler.Schedule(1200ms, [this](TaskContext)
+1 -1
View File
@@ -191,7 +191,7 @@ enum Heartpierce
enum MarkOfConquest
{
SPELL_MARK_OF_CONQUEST_ENERGIZE = 33671
SPELL_MARK_OF_CONQUEST_ENERGIZE = 39599
};
enum PersistentShieldMisc
@@ -110,7 +110,8 @@ TEST_F(GameObjectSummonGroupTest, DifferentGroupsAreIndependent)
TEST_F(GameObjectSummonGroupTest, SmartActionEnumValue)
{
EXPECT_EQ(SMART_ACTION_SUMMON_GAMEOBJECT_GROUP, 241);
EXPECT_EQ(SMART_ACTION_AC_END, 242);
EXPECT_EQ(SMART_ACTION_INC_DATA, 242);
EXPECT_EQ(SMART_ACTION_AC_END, 243);
}
TEST_F(GameObjectSummonGroupTest, SmartActionUnionSize)