(hopefully this is the correct subforum - though this involves SAI it also involves changes to other core code)
I was trying to script Pusillin in Dire Maul with SAI and it appears I’d need an SAI action that can change a unit’s gossip ID.
Since gossipID is currently pulled straight from CreatureInfo/GoInfo (the template data), there’s no existing way for a script to change it.
My idea:
-
add getGossipID to GameObjectAI & CreatureAI base classes. The base implementation will just use the creatureInfo/goInfo like they do now
-
add getGossipID to Creature & GameObject classes, these will defer to the AI’s getGossipID if they have an AI, otherwise they’ll use the template info like they do now.
-
all locations in the core where the gossipID is currently pulled from creatureinfo/goinfo will be changed to use the new Creature.getGossipID() & GameObject.getGossipID()
-
create the SAI action SMART_ACTION_SET_GOSSIP_ID
-
SmartAI & SmartGameObjectAI will override getGossipID and return a local member gossipID if it has been set by a previous action (otherwise it will return the template gossipID)
I can create the patch file for this, but wanted to run it past the devs to make sure I’m not going about it all wrong.