--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-05 17:10:59 -05:00
9 changed files with 27 additions and 15 deletions
+1
View File
@@ -449,6 +449,7 @@ ChatCommand * ChatHandler::getCommandTable()
{ "spell_elixir", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellElixirCommand, "", NULL },
{ "spell_learn_spell", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellLearnSpellCommand, "", 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_proc_event", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellProcEventCommand, "", NULL },
{ "spell_bonus_data", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellBonusesCommand, "", NULL },
+1
View File
@@ -356,6 +356,7 @@ class ChatHandler
bool HandleReloadSpellAreaCommand(const char* args);
bool HandleReloadSpellElixirCommand(const char* args);
bool HandleReloadSpellLearnSpellCommand(const char* args);
bool HandleReloadSpellLinkedSpellCommand(const char* args);
bool HandleReloadSpellProcEventCommand(const char* args);
bool HandleReloadSpellBonusesCommand(const char* args);
bool HandleReloadSpellScriptTargetCommand(const char* args);
+9
View File
@@ -612,6 +612,7 @@ bool ChatHandler::HandleReloadAllSpellCommand(const char*)
HandleReloadSpellAreaCommand("a");
HandleReloadSpellElixirCommand("a");
HandleReloadSpellLearnSpellCommand("a");
HandleReloadSpellLinkedSpellCommand("a");
HandleReloadSpellProcEventCommand("a");
HandleReloadSpellBonusesCommand("a");
HandleReloadSpellScriptTargetCommand("a");
@@ -960,6 +961,14 @@ bool ChatHandler::HandleReloadSpellLearnSpellCommand(const char*)
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*)
{
sLog.outString( "Re-Loading Spell Proc Event conditions..." );
+1
View File
@@ -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]=NULL;
}
}
+5 -8
View File
@@ -1781,7 +1781,7 @@ void World::ForceGameEventUpdate()
}
/// 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
ScriptMapMap::const_iterator s = scripts.find(id);
@@ -1809,7 +1809,7 @@ void World::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source,
immedScript = true;
}
///- If one of the effects should be immediate, launch the script execution
if (immedScript)
if (start && immedScript)
ScriptsProcess();
}
@@ -2539,12 +2539,9 @@ void World::ScriptsProcess()
break;
uint32 script_id = step.script->datalong2;
//delete iter and return it to begin pos(next one)
m_scriptSchedule.erase(iter);
iter = m_scriptSchedule.begin();
ScriptsStart(*datamap, script_id, target, NULL);
return;
//insert script into schedule but do not start it
ScriptsStart(*datamap, script_id, target, NULL, false);
break;
}
case SCRIPT_COMMAND_KILL:
+1 -1
View File
@@ -530,7 +530,7 @@ class World
BanReturn BanAccount(BanMode mode, std::string nameOrIP, std::string duration, std::string reason, std::string author);
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);
bool IsScriptScheduled() const { return !m_scriptSchedule.empty(); }