mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Fix Monster faction group bit: use 8 (Monster) not 4 (Horde)
FactionGroupMask bits are 1=Player, 2=Alliance, 4=Horde, 8=Monster. The hostility check was using bit 4 (Horde) to detect monsters, causing all hostile mobs to appear friendly/green.
This commit is contained in:
parent
2859c95372
commit
d7a26ed3c5
2 changed files with 6 additions and 4 deletions
|
|
@ -652,8 +652,9 @@ void Application::setupUICallbacks() {
|
|||
uint32_t factionGroup = dbc->getUInt32(i, 3);
|
||||
uint32_t enemyGroup = dbc->getUInt32(i, 5);
|
||||
bool hostile = (enemyGroup & playerFriendGroup) != 0;
|
||||
// Monster factionGroup bit (4) = hostile to players
|
||||
if (!hostile && (factionGroup & 4) != 0) {
|
||||
// Monster factionGroup bit (8) = hostile to players
|
||||
// Bits: 1=Player, 2=Alliance, 4=Horde, 8=Monster
|
||||
if (!hostile && (factionGroup & 8) != 0) {
|
||||
hostile = true;
|
||||
}
|
||||
// Check individual enemy faction IDs (fields 6-9)
|
||||
|
|
|
|||
|
|
@ -751,8 +751,9 @@ void NpcManager::initialize(pipeline::AssetManager* am,
|
|||
uint32_t enemyGroup = dbc->getUInt32(i, 5);
|
||||
// Check group-level hostility
|
||||
bool hostile = (enemyGroup & playerFriendGroup) != 0;
|
||||
// Check if creature is a Monster type (factionGroup bit 4)
|
||||
if (!hostile && (factionGroup & 4) != 0) {
|
||||
// Check if creature is a Monster type (factionGroup bit 8)
|
||||
// Bits: 1=Player, 2=Alliance, 4=Horde, 8=Monster
|
||||
if (!hostile && (factionGroup & 8) != 0) {
|
||||
hostile = true;
|
||||
}
|
||||
// Check individual enemy faction IDs (fields 6-9)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue