mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-18 05:49:41 -04:00
Merge branch 'master' of git://github.com/TrinityCore/TrinityCore
This commit is contained in:
@@ -0,0 +1 @@
|
||||
UPDATE `command` SET `name`='reload waypoint_data',`help`='Syntax: .reload waypoint_data will reload waypoint_data table.' WHERE `name`='reload wp_data';
|
||||
@@ -0,0 +1 @@
|
||||
UPDATE `conditions` SET `SourceGroup`=23324 WHERE `SourceTypeOrReferenceId`=1 AND `SourceGroup`=23342;
|
||||
@@ -46,7 +46,7 @@ SmartAI::SmartAI(Creature* c) : CreatureAI(c)
|
||||
|
||||
// spawn in run mode
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
mRun = true;
|
||||
mRun = false;
|
||||
|
||||
me->GetPosition(&mLastOOCPos);
|
||||
|
||||
|
||||
@@ -1794,6 +1794,38 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
delete targets;
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SEND_TARGET_TO_TARGET:
|
||||
{
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
|
||||
if (!targets)
|
||||
return;
|
||||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
{
|
||||
bool smart = false;
|
||||
SmartAI* ai = NULL;
|
||||
if (IsGameObject(*itr))
|
||||
{
|
||||
smart = IsSmartGO((*itr)->ToGameObject());
|
||||
ai = CAST_AI(SmartAI, (*itr)->ToGameObject()->AI());
|
||||
}
|
||||
|
||||
if (IsCreature(*itr))
|
||||
{
|
||||
smart = IsSmart((*itr)->ToCreature());
|
||||
ai = CAST_AI(SmartAI, (*itr)->ToCreature()->AI());
|
||||
}
|
||||
|
||||
if (smart && ai)
|
||||
ai->GetScript()->StoreTargetList(GetTargetList(e.action.sendTargetToTarget.id), e.action.sendTargetToTarget.id);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SEND_GOSSIP_MENU:
|
||||
{
|
||||
if (!GetBaseObject())
|
||||
|
||||
@@ -282,6 +282,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
|
||||
case SMART_TARGET_HOSTILE_RANDOM:
|
||||
case SMART_TARGET_HOSTILE_RANDOM_NOT_TOP:
|
||||
case SMART_TARGET_ACTION_INVOKER:
|
||||
case SMART_TARGET_INVOKER_PARTY:
|
||||
case SMART_TARGET_POSITION:
|
||||
case SMART_TARGET_NONE:
|
||||
case SMART_TARGET_ACTION_INVOKER_VEHICLE:
|
||||
|
||||
@@ -473,8 +473,9 @@ enum SMART_ACTION
|
||||
SMART_ACTION_JUMP_TO_POS = 97, // speedXY, speedZ, targetX, targetY, targetZ
|
||||
SMART_ACTION_SEND_GOSSIP_MENU = 98, // menuId, optionId
|
||||
SMART_ACTION_GO_SET_LOOT_STATE = 99, // state
|
||||
SMART_ACTION_SEND_TARGET_TO_TARGET = 100, // id
|
||||
|
||||
SMART_ACTION_END = 100,
|
||||
SMART_ACTION_END = 101,
|
||||
};
|
||||
|
||||
struct SmartAction
|
||||
@@ -883,6 +884,11 @@ struct SmartAction
|
||||
uint32 state;
|
||||
} setGoLootState;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 id;
|
||||
} sendTargetToTarget;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 param1;
|
||||
|
||||
Reference in New Issue
Block a user