gitdalisar / mod-Faction-Free

Faction Free is a WOTLK 3.3.5a (Azerothcore base) selection of files to allow a player to interact with opposite factions to have access to those corresponding reputations, quests, and achievements.
GNU Affero General Public License v3.0
11 stars 3 forks source link

[FEATURE] Allow heal/buff of opposing faction players outside of group #13

Open gitdalisar opened 7 months ago

gitdalisar commented 7 months ago

Is your feature request related to a problem? Please describe. No, this is not related to a problem. The method that cross-faction operates in Azerothcore is through the worldserver.conf settings. This appears to override the allowance of being in a group or raid together and then that allows for cross-faction features to appear.

Describe the solution you'd like It would be good to have healing and buffing allowed for cross-faction play OUTSIDE of being in a group first to make those features work.

Describe alternatives you've considered There are not really any workarounds to this due to the limitations in place for factional game play. Will likely need to modify .dbc files to get this to occur, if it is even possible. Will need to research exactly what flags could be set to make this possible.

Additional context Initially reported by Ghost via DM in Discord.

gitdalisar commented 7 months ago

Comment about spells from Issue #8 : Looking more into this, to cast spells on players of opposite faction outside of your group, this may cause a LOT of unintended behavior. Within the targets you can pick for a spell you do have TARGET_UNIT_TARGET_ALLY or TARGET_UNIT_TARGET_ENEMY typically for buffs/damage accordingly. There does NOT seem to be a TARGET_UNIT_TARGET_PLAYER so I think if we open up the ability to heal/buff/etc players outside the faction, it will result in also being able to accidently drop a heal on a boss mid fight... I'll look into it a bit more but do not think this one is going to be doable.

gitdalisar commented 7 months ago

So I do think this is plausible but I still think there will be some conflicts and unintended behavior... It looks like it will need to be a combination of a few things:

  1. Need to find all spells and abilities that would be beneficial in nature (buff, heal, cure, revive, etc.) that are player castable since modifying the spells an NPC will cast or an item will cast may not be needed or wanted
  2. Will have to ensure both TARGET_UNIT_TARGET_ALLY and TARGET_UNIT_TARGET_ENEMY are both set as opposing faction members are considered "enemy" until in a group
  3. Need to set SPELL_ATTR3_ONLY_ON_PLAYER on AttributesExC to ensure the heals and such cannot land on enemy NPC to avoid accidently healing a boss mid fight or breaking the mechanic of casting a heal mid-fight and it automatically landing on you as monster is invalid target

Now for what this means:

  1. I think this will break any cases where a quest requires you to cast those spells on an NPC in order to progress a quest as you will now have a flag set that say "heal" can only be cast on a player (thinking the early quest for Priests and such)
  2. I think this will break spells like Penance where it has dual function of hitting an ally (heal) or enemy (damage) as an opposing faction player is still an "enemy"

Just not sure there is a clean way to do this.