HerculesWS / Hercules

Hercules is a collaborative software development project revolving around the creation of a robust massively multiplayer online role playing game (MMORPG) server package. Written in C, the program is very versatile and provides NPCs, warps and modifications. The project is jointly managed by a group of volunteers located around the world as well as a tremendous community providing QA and support. Hercules is a continuation of the original Athena project.
http://herc.ws
GNU General Public License v3.0
896 stars 752 forks source link

Warning when creating instance dungeon #693

Closed belfallen closed 8 years ago

belfallen commented 9 years ago

Using lastest revision..

zxc

belfallen commented 9 years ago

npc base in file already use contants but still appear this warning :(

alexa_in,82,155,3 script Guild Manager 1_M_LIBRARYMASTER,{

AnisotropicDefixation commented 9 years ago

Just comment the warning, line 2539 in npc.c.

Emistry commented 9 years ago

Change your NPC ID number into a NPC Constant.

NPC Constant Full List https://github.com/HerculesWS/Hercules/blob/master/db/const.txt http://nn.nachtwolke.com/dev/npclist/?q=45-999%2C10000-10090&qq=search

dastgirp commented 9 years ago

@Emistry, what's interesting is file name and line

@MishimaHaruna , what's with those random name and line?

MishimaHaruna commented 9 years ago

This is happening because of how npc_duplicate4instance works... It calls npc->parse_duplicate, passing a buffer with a duplicate() NPC header forged for the purpose.

It'll need some refactoring. We can use the values directly, instead of writing to a buffer and parsing them again as a string (it'll be also faster and less subject to errors...)

MishimaHaruna commented 8 years ago

This was fixed through #820