*Merge.
--HG-- branch : trunk
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
delete from command where name in ('reload spell_linked_spell');
|
||||||
|
insert into command (name, security, help) values
|
||||||
|
('reload spell_linked_spell','3','Usage: .reload spell_linked_spell\r\nReloads the spell_linked_spell DB table.'),
|
||||||
@@ -20,11 +20,11 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "ScriptMgr.h"
|
#include "ScriptMgr.h"
|
||||||
#include "../../game/GossipDef.h"
|
#include "GossipDef.h"
|
||||||
#include "../../game/GameObject.h"
|
#include "GameObject.h"
|
||||||
#include "../../game/Player.h"
|
#include "Player.h"
|
||||||
#include "../../game/Map.h"
|
#include "Map.h"
|
||||||
#include "../../game/ObjectMgr.h"
|
#include "ObjectMgr.h"
|
||||||
|
|
||||||
//uint8 loglevel = 0;
|
//uint8 loglevel = 0;
|
||||||
int nrscripts;
|
int nrscripts;
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ extern int num_inst_scripts;
|
|||||||
|
|
||||||
struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
|
struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
|
||||||
{
|
{
|
||||||
ScriptedAI(Creature* creature) : m_creature(creature) {}
|
ScriptedAI(Creature* creature):CreatureAI(creature),m_creature(creature){}
|
||||||
~ScriptedAI() {}
|
~ScriptedAI() {}
|
||||||
|
|
||||||
// Called if IsVisible(Unit *who) is true at each *who move
|
// Called if IsVisible(Unit *who) is true at each *who move
|
||||||
|
|||||||
@@ -449,6 +449,7 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||||||
{ "spell_elixir", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellElixirCommand, "", NULL },
|
{ "spell_elixir", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellElixirCommand, "", NULL },
|
||||||
{ "spell_learn_spell", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellLearnSpellCommand, "", NULL },
|
{ "spell_learn_spell", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellLearnSpellCommand, "", NULL },
|
||||||
{ "spell_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesSpellCommand, "", NULL },
|
{ "spell_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesSpellCommand, "", NULL },
|
||||||
|
{ "spell_linked_spell", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellLinkedSpellCommand, "", NULL },
|
||||||
{ "spell_pet_auras", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellPetAurasCommand, "", NULL },
|
{ "spell_pet_auras", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellPetAurasCommand, "", NULL },
|
||||||
{ "spell_proc_event", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellProcEventCommand, "", NULL },
|
{ "spell_proc_event", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellProcEventCommand, "", NULL },
|
||||||
{ "spell_bonus_data", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellBonusesCommand, "", NULL },
|
{ "spell_bonus_data", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellBonusesCommand, "", NULL },
|
||||||
|
|||||||
@@ -356,6 +356,7 @@ class ChatHandler
|
|||||||
bool HandleReloadSpellAreaCommand(const char* args);
|
bool HandleReloadSpellAreaCommand(const char* args);
|
||||||
bool HandleReloadSpellElixirCommand(const char* args);
|
bool HandleReloadSpellElixirCommand(const char* args);
|
||||||
bool HandleReloadSpellLearnSpellCommand(const char* args);
|
bool HandleReloadSpellLearnSpellCommand(const char* args);
|
||||||
|
bool HandleReloadSpellLinkedSpellCommand(const char* args);
|
||||||
bool HandleReloadSpellProcEventCommand(const char* args);
|
bool HandleReloadSpellProcEventCommand(const char* args);
|
||||||
bool HandleReloadSpellBonusesCommand(const char* args);
|
bool HandleReloadSpellBonusesCommand(const char* args);
|
||||||
bool HandleReloadSpellScriptTargetCommand(const char* args);
|
bool HandleReloadSpellScriptTargetCommand(const char* args);
|
||||||
|
|||||||
@@ -612,6 +612,7 @@ bool ChatHandler::HandleReloadAllSpellCommand(const char*)
|
|||||||
HandleReloadSpellAreaCommand("a");
|
HandleReloadSpellAreaCommand("a");
|
||||||
HandleReloadSpellElixirCommand("a");
|
HandleReloadSpellElixirCommand("a");
|
||||||
HandleReloadSpellLearnSpellCommand("a");
|
HandleReloadSpellLearnSpellCommand("a");
|
||||||
|
HandleReloadSpellLinkedSpellCommand("a");
|
||||||
HandleReloadSpellProcEventCommand("a");
|
HandleReloadSpellProcEventCommand("a");
|
||||||
HandleReloadSpellBonusesCommand("a");
|
HandleReloadSpellBonusesCommand("a");
|
||||||
HandleReloadSpellScriptTargetCommand("a");
|
HandleReloadSpellScriptTargetCommand("a");
|
||||||
@@ -960,6 +961,14 @@ bool ChatHandler::HandleReloadSpellLearnSpellCommand(const char*)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ChatHandler::HandleReloadSpellLinkedSpellCommand(const char*)
|
||||||
|
{
|
||||||
|
sLog.outString( "Re-Loading Spell Linked Spells..." );
|
||||||
|
spellmgr.LoadSpellLinked();
|
||||||
|
SendGlobalGMSysMessage("DB table `spell_linked_spell` reloaded.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool ChatHandler::HandleReloadSpellProcEventCommand(const char*)
|
bool ChatHandler::HandleReloadSpellProcEventCommand(const char*)
|
||||||
{
|
{
|
||||||
sLog.outString( "Re-Loading Spell Proc Event conditions..." );
|
sLog.outString( "Re-Loading Spell Proc Event conditions..." );
|
||||||
|
|||||||
@@ -4130,6 +4130,7 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
|
|||||||
{
|
{
|
||||||
caster->m_currentSpells[CURRENT_CHANNELED_SPELL]->cancel();
|
caster->m_currentSpells[CURRENT_CHANNELED_SPELL]->cancel();
|
||||||
caster->m_currentSpells[CURRENT_CHANNELED_SPELL]=NULL;
|
caster->m_currentSpells[CURRENT_CHANNELED_SPELL]=NULL;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-8
@@ -1781,7 +1781,7 @@ void World::ForceGameEventUpdate()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Put scripts in the execution queue
|
/// Put scripts in the execution queue
|
||||||
void World::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source, Object* target)
|
void World::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source, Object* target, bool start)
|
||||||
{
|
{
|
||||||
///- Find the script map
|
///- Find the script map
|
||||||
ScriptMapMap::const_iterator s = scripts.find(id);
|
ScriptMapMap::const_iterator s = scripts.find(id);
|
||||||
@@ -1809,7 +1809,7 @@ void World::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source,
|
|||||||
immedScript = true;
|
immedScript = true;
|
||||||
}
|
}
|
||||||
///- If one of the effects should be immediate, launch the script execution
|
///- If one of the effects should be immediate, launch the script execution
|
||||||
if (immedScript)
|
if (start && immedScript)
|
||||||
ScriptsProcess();
|
ScriptsProcess();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2539,12 +2539,9 @@ void World::ScriptsProcess()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
uint32 script_id = step.script->datalong2;
|
uint32 script_id = step.script->datalong2;
|
||||||
//delete iter and return it to begin pos(next one)
|
//insert script into schedule but do not start it
|
||||||
m_scriptSchedule.erase(iter);
|
ScriptsStart(*datamap, script_id, target, NULL, false);
|
||||||
iter = m_scriptSchedule.begin();
|
break;
|
||||||
|
|
||||||
ScriptsStart(*datamap, script_id, target, NULL);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case SCRIPT_COMMAND_KILL:
|
case SCRIPT_COMMAND_KILL:
|
||||||
|
|||||||
+1
-1
@@ -530,7 +530,7 @@ class World
|
|||||||
BanReturn BanAccount(BanMode mode, std::string nameOrIP, std::string duration, std::string reason, std::string author);
|
BanReturn BanAccount(BanMode mode, std::string nameOrIP, std::string duration, std::string reason, std::string author);
|
||||||
bool RemoveBanAccount(BanMode mode, std::string nameOrIP);
|
bool RemoveBanAccount(BanMode mode, std::string nameOrIP);
|
||||||
|
|
||||||
void ScriptsStart(std::map<uint32, std::multimap<uint32, ScriptInfo> > const& scripts, uint32 id, Object* source, Object* target);
|
void ScriptsStart(std::map<uint32, std::multimap<uint32, ScriptInfo> > const& scripts, uint32 id, Object* source, Object* target, bool start = true);
|
||||||
void ScriptCommandStart(ScriptInfo const& script, uint32 delay, Object* source, Object* target);
|
void ScriptCommandStart(ScriptInfo const& script, uint32 delay, Object* source, Object* target);
|
||||||
bool IsScriptScheduled() const { return !m_scriptSchedule.empty(); }
|
bool IsScriptScheduled() const { return !m_scriptSchedule.empty(); }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user