Core/SmartAI: Improve SMART_EVENT_GOSSIP_HELLO
Port From (https://github.com/TrinityCore/TrinityCore/commit/e9aed3e442374db74ebc98edc39ba4ee46acf123)
This commit is contained in:
@@ -2172,7 +2172,7 @@ namespace Game.AI
|
|||||||
}
|
}
|
||||||
public struct GossipHello
|
public struct GossipHello
|
||||||
{
|
{
|
||||||
public uint noReportUse;
|
public uint filter;
|
||||||
}
|
}
|
||||||
public struct Gossip
|
public struct Gossip
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3272,8 +3272,26 @@ namespace Game.AI
|
|||||||
break;
|
break;
|
||||||
case SmartEvents.GossipHello:
|
case SmartEvents.GossipHello:
|
||||||
{
|
{
|
||||||
if (e.Event.gossipHello.noReportUse != 0 && var0 != 0)
|
switch (e.Event.gossipHello.filter)
|
||||||
return;
|
{
|
||||||
|
case 0:
|
||||||
|
// no filter set, always execute action
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
// OnGossipHello only filter set, skip action if OnReportUse
|
||||||
|
if (var0 != 0)
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
// OnReportUse only filter set, skip action if OnGossipHello
|
||||||
|
if (var0 == 0)
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// Ignore any other value
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
ProcessAction(e, unit, var0, var1, bvar, spell, gob);
|
ProcessAction(e, unit, var0, var1, bvar, spell, gob);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user