Core/SmartAI:

- Fixed some issues with SMART_ACTION_SET_FLY (#1073)
- Fixed allowing 0 as input for  SMART_EVENT_ACCEPTED_QUEST and SMART_EVENT_REWARD_QUEST (#2680)
- Some cleanup
This commit is contained in:
kaelima
2011-10-24 23:21:34 +01:00
parent 0ac431f52d
commit 3a3af64f68
4 changed files with 50 additions and 8 deletions

View File

@@ -1782,7 +1782,12 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
}
case SMART_ACTION_JUMP_TO_POS:
{
if (!me)
return;
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveJump(e.target.x, e.target.y, e.target.z, (float)e.action.jump.speedxy, (float)e.action.jump.speedz);
// TODO: Resume path when reached jump location
break;
}
case SMART_ACTION_SEND_GOSSIP_MENU:
@@ -1795,7 +1800,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
return;
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
if(Player* player = (*itr)->ToPlayer())
if (Player* player = (*itr)->ToPlayer())
{
if (e.action.sendGossipMenu.gossipMenuId)
player->PrepareGossipMenu(GetBaseObject(), e.action.sendGossipMenu.gossipMenuId, true);