View Single Post
  #1  
Old 07-12-2007, 09:45 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default Fix for Spawning mobs with weapons

I wished I would have tested this sooner - it works like a champ;

Inside the file mob.cpp in the zone folder, look for the Mob::FillSpawnStruct function. Inside this function @ line 652 (latest build 1002) you will find a for loop
Code:
for(i = 0; i < 7; i++)
{
   ns->spawn.equipment[i] = GetEquipmentMaterial(i);
   ns->spawn.colors[i].color = GetEquipmentColor(i);

}
The problem here is that there are 9 slots 0 thru 8 so, the code should be:
Code:
for(i = 0; i < 9; i++)
{
   ns->spawn.equipment[i] = GetEquipmentMaterial(i);
   ns->spawn.colors[i].color = GetEquipmentColor(i);

}
This new code was PM'd to me by Glather ( I quoted all the above from him), and all the credit goes to him. I have tested it on my server and all seems to work fine, mobs are now showing weapons.

KLS: I hope we get an update with all this new stuff to the source soon?
Reply With Quote