feat(Core/SmartScripts): Warn when an unused parameter is set in the database (#10124)

This commit is contained in:
IntelligentQuantum
2022-02-15 20:32:39 +03:30
committed by GitHub
parent 77bab657e5
commit 38a33e7ef0
4 changed files with 1538 additions and 96 deletions

View File

@@ -310,14 +310,6 @@ struct SmartEvent
uint32 repeatMax;
} aura;
struct
{
uint32 spell;
uint32 count;
uint32 repeatMin;
uint32 repeatMax;
} targetAura;
struct
{
uint32 type;
@@ -382,12 +374,6 @@ struct SmartEvent
uint32 action;
} gossip;
struct
{
uint32 spell;
uint32 effIndex;
} dummy;
struct
{
uint32 cooldownMin;
@@ -670,6 +656,12 @@ struct SmartAction
SAIBool useTalkTarget;
} talk;
struct
{
uint32 textGroupID;
uint32 duration;
} simpleTalk;
struct
{
uint32 factionID;
@@ -790,23 +782,9 @@ struct SmartAction
struct
{
uint32 flag1;
uint32 flag2;
uint32 flag3;
uint32 flag4;
uint32 flag5;
uint32 flag6;
} addUnitFlag;
struct
{
uint32 flag1;
uint32 flag2;
uint32 flag3;
uint32 flag4;
uint32 flag5;
uint32 flag6;
} removeUnitFlag;
uint32 threatINC;
uint32 threatDEC;
} threat;
struct
{
@@ -829,6 +807,11 @@ struct SmartAction
uint32 dec;
} incEventPhase;
struct
{
uint32 spell;
} addAura;
struct
{
uint32 spell;
@@ -1048,6 +1031,11 @@ struct SmartAction
uint32 type;
} unitFlag;
struct
{
uint32 flag;
} flag;
struct
{
uint32 byte1;
@@ -1060,11 +1048,6 @@ struct SmartAction
uint32 type;
} delunitByte;
struct
{
uint32 seat;
} enterVehicle;
struct
{
uint32 id;
@@ -1081,6 +1064,12 @@ struct SmartAction
uint32 entry6;
} randTimedActionList;
struct
{
uint32 idMin;
uint32 idMax;
} randRangeTimedActionList;
struct
{
SAIBool withDelayed;
@@ -1147,7 +1136,7 @@ struct SmartAction
struct
{
uint32 regenHealth;
SAIBool regenHealth;
} setHealthRegen;
struct
@@ -1494,8 +1483,10 @@ struct SmartTarget
struct
{
uint32 map;
} position;
uint32 entry;
uint32 dist;
SAIBool dead;
} unitClosest;
struct
{
@@ -1504,17 +1495,20 @@ struct SmartTarget
struct
{
uint32 entry;
uint32 dist;
SAIBool dead;
} closest;
uint32 seatMask;
} vehicle;
struct
{
uint32 maxDist;
} threatList;
struct
{
uint32 entry;
uint32 dist;
uint32 onlySpawned;
} closestGameobject;
} goClosest;
struct
{
@@ -1550,11 +1544,6 @@ struct SmartTarget
uint32 param3;
uint32 param4;
} raw;
struct
{
uint32 seat;
} vehicle;
};
};
@@ -2027,7 +2016,10 @@ private:
return true;
}
//bool IsTextValid(SmartScriptHolder const& e, uint32 id);
static bool IsTextValid(SmartScriptHolder const& e, uint32 id);
static bool CheckUnusedEventParams(SmartScriptHolder const& e);
static bool CheckUnusedActionParams(SmartScriptHolder const& e);
static bool CheckUnusedTargetParams(SmartScriptHolder const& e);
};
#define sSmartScriptMgr SmartAIMgr::instance()