Core/AI: segregate GameObject ReportUse from normal Use (lock open/normal click)
Port From (https://github.com/TrinityCore/TrinityCore/commit/5903a10a834b1198702b024182581799648540ff)
This commit is contained in:
@@ -1069,10 +1069,17 @@ namespace Game.AI
|
||||
GetScript().OnReset();
|
||||
}
|
||||
|
||||
public override bool GossipHello(Player player, bool reportUse)
|
||||
public override bool GossipHello(Player player)
|
||||
{
|
||||
_gossipReturn = false;
|
||||
GetScript().ProcessEventsFor(SmartEvents.GossipHello, player, reportUse ? 1 : 0u, 0, false, null, me);
|
||||
GetScript().ProcessEventsFor(SmartEvents.GossipHello, player, 0, 0, false, null, me);
|
||||
return _gossipReturn;
|
||||
}
|
||||
|
||||
public override bool OnReportUse(Player player)
|
||||
{
|
||||
_gossipReturn = false;
|
||||
GetScript().ProcessEventsFor(SmartEvents.GossipHello, player, 1, 0, false, null, me);
|
||||
return _gossipReturn;
|
||||
}
|
||||
|
||||
|
||||
@@ -2228,9 +2228,8 @@ namespace Game.AI
|
||||
// We may want to execute action rarely and because of this if condition is not fulfilled the action will be rechecked in a long time
|
||||
if (Global.ConditionMgr.IsObjectMeetingSmartEventConditions(e.entryOrGuid, e.event_id, e.source_type, unit, GetBaseObject()))
|
||||
{
|
||||
ProcessAction(e, unit, var0, var1, bvar, spell, gob, varString);
|
||||
|
||||
RecalcTimer(e, min, max);
|
||||
ProcessAction(e, unit, var0, var1, bvar, spell, gob, varString);
|
||||
}
|
||||
else
|
||||
RecalcTimer(e, Math.Min(min, 5000), Math.Min(min, 5000));
|
||||
|
||||
Reference in New Issue
Block a user