The minus symbol tells it to calculate the NPC's MaxHP based on its level. It's calculating it to 723, so that feature's working okay.
I'm experimenting with StringFormat and MessageBox now, to figure out when the last arg changes from 28 to an arbitrary value.
You know what the weird thing is? I changed the affected line in the source (npc.cpp line 1052) from:
Quote:
spawn->MerchantType, 0, spawn->GetRunspeed(), 28, 28);
|
...to:
Quote:
spawn->MerchantType, 0, spawn->GetRunspeed(), 28, 28, 0);
|
The query runs as:
Quote:
INSERT INTO npc_types (id, name, level, race, class, hp, gender, texture, helmtexture, size, loottable_id, merchant_id, face, runspeed, prim_melee_type, sec_melee_type) VALUES(54308, "WoodElf" , 25, 4, 0, 723, 1, 0, 0, 0.000000, 0, 0, 0, 0.000000, 28, 0)
|
And when I change the line to:
Quote:
spawn->MerchantType, 0, spawn->GetRunspeed(), 28, 28, 28);
|
...it gets run successfully as:
Quote:
INSERT INTO npc_types (id, name, level, race, class, hp, gender, texture, helmtexture, size, loottable_id, merchant_id, face, runspeed, prim_melee_type, sec_melee_type) VALUES(54308, "WoodElf" , 25, 4, 0, 723, 1, 0, 0, 0.000000, 0, 0, 0, 0.000000, 28, 28)
|
Something funky is going on after that first 28. It's skipping over an argument after it.
|