Merge commit '44959aeedddb552c50bf9ff06a2685d216844f24' into 4.3.4

Conflicts:
	.travis.yml
	README.md
	sql/updates/world/2015_04_18_00_world.sql
	sql/updates/world/2015_04_18_05_world_335.sql
	sql/updates/world/2015_04_26_03_world_335.sql
	sql/updates/world/2015_05_09_00_world_335.sql
	src/server/game/Conditions/ConditionMgr.h
	src/server/game/Entities/GameObject/GameObject.cpp
	src/server/game/Entities/GameObject/GameObject.h
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Spells/SpellInfo.cpp
This commit is contained in:
Carbenium committed 2015-07-22 01:33:48 +02:00
commit 82ea8da720
61 files changed
+1019 -626

No files matched your search

@@ -1332,7 +1332,31 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
}
case SMART_ACTION_SET_COUNTER:
{
StoreCounter(e.action.setCounter.counterId, e.action.setCounter.value, e.action.setCounter.reset);
if (ObjectList* targets = GetTargets(e, unit))
{
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
{
if (IsCreature(*itr))
{
if (SmartAI* ai = CAST_AI(SmartAI, (*itr)->ToCreature()->AI()))
ai->GetScript()->StoreCounter(e.action.setCounter.counterId, e.action.setCounter.value, e.action.setCounter.reset);
else
TC_LOG_ERROR("sql.sql", "SmartScript: Action target for SMART_ACTION_SET_COUNTER is not using SmartAI, skipping");
}
else if (IsGameObject(*itr))
{
if (SmartGameObjectAI* ai = CAST_AI(SmartGameObjectAI, (*itr)->ToGameObject()->AI()))
ai->GetScript()->StoreCounter(e.action.setCounter.counterId, e.action.setCounter.value, e.action.setCounter.reset);
else
TC_LOG_ERROR("sql.sql", "SmartScript: Action target for SMART_ACTION_SET_COUNTER is not using SmartGameObjectAI, skipping");
}
}
delete targets;
}
else
StoreCounter(e.action.setCounter.counterId, e.action.setCounter.value, e.action.setCounter.reset);
break;
}
case SMART_ACTION_WP_START: