BattleGroundEnemies

BattleGroundEnemies

6M Downloads

Classic TBC same faction BGs issues

hazzal opened this issue ยท 1 comments

commented

In same faction BGs the api call UnitFactionGroup("player") does not return the faction the player plays as but rather your normal faction. But it's possible to check if the player is playing as the opposite faction by checking the players buffs. If they are alliance playing as horde they'll have the Horde buff, with spellID: 81744. If they are horde playing as alliance they'll have the alliance buff with spellID: 81748

Another issue with the same faction BGs is that the scoreboard doesn't return the race of the players in the "mercenary mode". So the check with GetBattlefieldScore for race doesn't work in same faction BGs in TBC since the mercenary mode players cannot become populated with your CreateOrUpdatePlayer call as it requires a valid race. I've made a dirty fix for myself to set every unknown race to Orc. But I assume you'd have to check races with UnitTarget's with the way it works right now if you want to display correct racials for mercenary players.

The mapID for Netherstorm in TBC is 1956
Spell id for flag is still 34976 though

The mapID for Warsong Gulch in TBC is 1460
Alliance flag has spellid: 301091
Horde flag has spellid: 301089

commented

Hi, thanks for your Post, i havent done any bgs since the same faction BGs yet, but from reading through your text my thoughts are the following:

the UnitFactionGroup call shouldn't really be an issue since i am adapting the faction by checking a different way.
if name == self.PlayerDetails.PlayerName and faction == self.EnemyFaction then self.EnemyFaction = self.AllyFaction self.AllyFaction = faction

This should basically ensure that the faction is always correct and according to the scoreboard.
The second issue is something that i can easily fix, since the race was only really used for the relentless pvp talent,
i simply will remove the requirement for the race and it should be working again.

I also added the mapIDs for netherstorm, warsong gulch was already existing and should be working.
I am currently also working on adding support for arenas, Retail seems to be working but there is still some issues with TBCC.
I will push my current repo to github and this will create a alpha on curseforge, you can give it a try and see if this fixes the issues