EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Bug Reports (https://www.eqemulator.org/forums/forumdisplay.php?f=591)
-   -   New NPC color tint bug (https://www.eqemulator.org/forums/showthread.php?t=28322)

ChaosSlayerZ 05-24-2009 11:08 PM

New NPC color tint bug
 
guys the new npc color tint is just a little bit screwed up - the RED collumn is in fact gives BLUE color, and vice-verse :D

Shendare 05-25-2009 02:54 AM

Hey, you're right!

I think I fixed this in my pre-release testing, but managed to un-fix it before posting it on the forums.

That's what I get for working on personal stuff at work as well as home. :D Multiple versions of code.

The Fix (hopefully Trev or someone can source it into the SVN pretty quickly):

zonedb.cpp - Line 1268

Code:

...
  tmpNPCType->drakkin_details = atoi(row[r++]);
  tmpNPCType->armor_tint = (atoi(row[r++]) & 0xFF);
  tmpNPCType->armor_tint |= (atoi(row[r++]) & 0xFF) << 8;
  tmpNPCType->armor_tint |= (atoi(row[r++]) & 0xFF) << 16;
  tmpNPCType->armor_tint |= (tmpNPCType->armor_tint) ? (0xFF << 24) : 0;

  tmpNPCType->see_invis = atoi(row[r++])==0?false:true;      // Mongrel: Set see_invis flag
...

...should be changed to...

Code:

...
  tmpNPCType->drakkin_details = atoi(row[r++]);
  tmpNPCType->armor_tint = (atoi(row[r++]) & 0xFF) << 16;
  tmpNPCType->armor_tint |= (atoi(row[r++]) & 0xFF) << 8;
  tmpNPCType->armor_tint |= (atoi(row[r++]) & 0xFF);
  tmpNPCType->armor_tint |= (tmpNPCType->armor_tint) ? (0xFF << 24) : 0;

  tmpNPCType->see_invis = atoi(row[r++])==0?false:true;      // Mongrel: Set see_invis flag
...

Just swapping the "(...0xFF) << 16;" and "(...0xFF);" lines and adjusting the "=" and "|=" to correlate.

- Shendare

ChaosSlayerZ 05-25-2009 03:31 AM

isn't it simpler to just rename the collumns? :D

trevius 05-25-2009 05:55 AM

Thanks for the quick fix, Shendare. I got it added to the SVN.


All times are GMT -4. The time now is 07:59 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.