To learn more about the health calculation check rochet2's first comment ![/COLOR]
Hello,



I had an idea on how to update instance mobs by percentage, So the health and mana and stuff gets updated. But instead of going inside each instance and do .npc info for each mob to find their entry and then go in DB and update them one by one. I had a better idea... I made a inner join query so the query will join creature table to select the creatures by their Map ID. So now with this query all you have to do is to go inside the instance and do .gps, You will see the Map ID for the instance. So then add the MapID to the query and run the query and wollah ! All mobs in the instance have been updated

Upgrade Query
Code:
  1. SET
  2. /* Edit these values */
  3. @Health = 10,
  4. @Mana = 10,
  5. @minlevel = 255,
  6. @maxlevel = 255,
  7. @MapID = 548;
  8. /* Do not edit anything under this text unless you know what you are doing */
  9. UPDATE creature_template AS t
  10. INNER JOIN creature AS c
  11. ON t.entry = c.id
  12. SET
  13. t.Health_mod = t.health_mod * @Health, t.minlevel = @minlevel, t.maxlevel = @maxlevel, t.Mana_mod = t.Mana_mod * @Mana
  14. WHERE
  15. c.map = @MapID;




Keep in mind that if you use this query and update the level to 255 then the creature will get lower health if you dont have edited anything in creature_classlevelstats. But you can run the query multiple times or choose a higher percentage value.

If you want to downgrade the mobs in the instance you can use this query
Downgrade Query
Code:
  1. SET
  2. /* Edit these values */
  3. @Health = 10,
  4. @Mana = 10,
  5. @minlevel = 255,
  6. @maxlevel = 255,
  7. @MapID = 548;
  8. /* Do not edit anything under this text unless you know what you are doing */
  9. UPDATE creature_template AS t
  10. INNER JOIN creature AS c
  11. ON t.entry = c.id
  12. SET
  13. t.Health_mod = t.health_mod / @Health, t.minlevel = @minlevel, t.maxlevel = @maxlevel, t.Mana_mod = t.Mana_mod / @Mana
  14. WHERE
  15. c.map = @MapID;

This query will downgrade the mobs by percentage, So if you set the health to 10 for this query then it will downgrade health by 10

Good luck with the query, Let me know if you want me to edit anything, Like adding more columns or something


› See More: Fastest and best way to update instances