Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2024-08-18 23:02:22 +08:00
50 changed files with 2365 additions and 1344 deletions

View File

@@ -139,7 +139,6 @@ public:
{ "points_of_interest", HandleReloadPointsOfInterestCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "prospecting_loot_template", HandleReloadLootTemplatesProspectingCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "quest_greeting", HandleReloadQuestGreetingCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "quest_greeting_locale", HandleReloadLocalesQuestGreetingCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "quest_poi", HandleReloadQuestPOICommand, SEC_ADMINISTRATOR, Console::Yes },
{ "quest_template", HandleReloadQuestTemplateCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "reference_loot_template", HandleReloadLootTemplatesReferenceCommand, SEC_ADMINISTRATOR, Console::Yes },
@@ -166,6 +165,7 @@ public:
{ "spell_threats", HandleReloadSpellThreatsCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "spell_group_stack_rules", HandleReloadSpellGroupStackRulesCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "player_loot_template", HandleReloadLootTemplatesPlayerCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "module_string", HandleReloadModuleStringCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "acore_string", HandleReloadAcoreStringCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "warden_action", HandleReloadWardenactionCommand, SEC_ADMINISTRATOR, Console::Yes },
{ "waypoint_scripts", HandleReloadWpScriptsCommand, SEC_ADMINISTRATOR, Console::Yes },
@@ -269,7 +269,6 @@ public:
HandleReloadQuestAreaTriggersCommand(handler);
HandleReloadQuestPOICommand(handler);
HandleReloadQuestTemplateCommand(handler);
HandleReloadLocalesQuestGreetingCommand(handler);
LOG_INFO("server.loading", "Reloading Quests Relations...");
sObjectMgr->LoadQuestStartersAndEnders();
@@ -555,13 +554,8 @@ public:
LOG_INFO("server.loading", "Reloading Quest Greeting ...");
sObjectMgr->LoadQuestGreetings();
handler->SendGlobalGMSysMessage("DB table `quest_greeting` reloaded.");
return true;
}
static bool HandleReloadLocalesQuestGreetingCommand(ChatHandler* handler)
{
LOG_INFO("server.loading", "Reloading Quest Greeting locales...");
sObjectMgr->LoadQuestGreetingsLocales();
sObjectMgr->LoadQuestGreetingsLocales(); // Must be after LoadQuestGreetings()
handler->SendGlobalGMSysMessage("DB table `quest_greeting_locale` reloaded.");
return true;
}
@@ -716,6 +710,17 @@ public:
return true;
}
static bool HandleReloadModuleStringCommand(ChatHandler* handler)
{
LOG_INFO("server.loading", "Reloading module_string Table!");
sObjectMgr->LoadModuleStrings();
handler->SendGlobalGMSysMessage("DB table `module_string` reloaded.");
LOG_INFO("server.loading", "Reloading module_string_locale Table!");
sObjectMgr->LoadModuleStringsLocale();
handler->SendGlobalGMSysMessage("DB table `module_string_locale` reloaded.");
return true;
}
static bool HandleReloadAcoreStringCommand(ChatHandler* handler)
{
LOG_INFO("server.loading", "Reloading acore_string Table!");

View File

@@ -659,13 +659,14 @@ class spell_illidari_council_judgement : public SpellScript
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
Unit::AuraEffectList const& auras = GetCaster()->GetAuraEffectsByType(SPELL_AURA_DUMMY);
for (Unit::AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
auto const& auras = GetCaster()->GetAuraEffectsByType(SPELL_AURA_DUMMY);
for (auto i = auras.begin(); i != auras.end(); ++i)
{
if ((*i)->GetSpellInfo()->GetSpellSpecific() == SPELL_SPECIFIC_SEAL && (*i)->GetEffIndex() == EFFECT_2)
if (sSpellMgr->GetSpellInfo((*i)->GetAmount()))
{
GetCaster()->CastSpell(GetHitUnit(), (*i)->GetAmount(), true);
GetCaster()->RemoveAurasDueToSpell((*i)->GetSpellInfo()->Id);
break;
}
}

View File

@@ -468,6 +468,57 @@ public:
}
};
/*####
## go_l70_etc_music
####*/
enum L70ETCMusic
{
MUSIC_L70_ETC_MUSIC = 11803
};
enum L70ETCMusicEvents
{
EVENT_ETC_START_MUSIC = 1
};
class go_l70_etc_music : public GameObjectScript
{
public:
go_l70_etc_music() : GameObjectScript("go_l70_etc_music") { }
struct go_l70_etc_musicAI : public GameObjectAI
{
go_l70_etc_musicAI(GameObject* go) : GameObjectAI(go)
{
_events.ScheduleEvent(EVENT_ETC_START_MUSIC, 1600);
}
void UpdateAI(uint32 diff) override
{
_events.Update(diff);
while (uint32 eventId = _events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_ETC_START_MUSIC:
me->PlayDirectMusic(MUSIC_L70_ETC_MUSIC);
_events.ScheduleEvent(EVENT_ETC_START_MUSIC, 1600); // Every 1.6 seconds SMSG_PLAY_MUSIC packet (PlayDirectMusic) is pushed to the client (sniffed value)
break;
default:
break;
}
}
}
private:
EventMap _events;
};
GameObjectAI* GetAI(GameObject* go) const override
{
return new go_l70_etc_musicAI(go);
}
};
// Theirs
/*####
## go_brewfest_music
@@ -1911,6 +1962,7 @@ void AddSC_go_scripts()
new go_heat();
new go_bear_trap();
new go_duskwither_spire_power_source();
new go_l70_etc_music();
// Theirs
new go_brewfest_music();