[Release] Fix for WeaponMaster (5165)

08/21/2010 16:44 pintser#16
hehehe, nice release....
mostlikely they r missing just 1 simple line of code...

-Congratz-
08/29/2010 20:39 haotyca#17
thanks alot 12talis !!!! u saved meeee xD i gave u 5 thanks for this post lol :P
11/16/2013 19:11 xScylez#18
Sorry for bumping old threads, just had to test this, and i see that if the character doesn't have for example boots on, and he tried to upgrade the boots, it gives error at this line:
Code:
DatabaseItem Di = (DatabaseItem)Database.DatabaseItems[IMan.ToID()];
And in the CMD window: System.NullReferenceException:
Code:
Object reference not set to an instance of an object. at NewestCOServer.PacketHandling.NPCDialog.Handle(GameClient GC, Byte[] Data, UInt32 NPC, Byte Control)
11/16/2013 20:00 Spirited#19
Quote:
Originally Posted by xScylez View Post
Sorry for bumping old threads, just had to test this, and i see that if the character doesn't have for example boots on, and he tried to upgrade the boots, it gives error at this line:
Code:
DatabaseItem Di = (DatabaseItem)Database.DatabaseItems[IMan.ToID()];
And in the CMD window: System.NullReferenceException:
Code:
Object reference not set to an instance of an object. at NewestCOServer.PacketHandling.NPCDialog.Handle(GameClient GC, Byte[] Data, UInt32 NPC, Byte Control)
So before the body of code that handles the boots is called, check if the player is wearing boots to begin with. You can do that using a selection statement.
11/18/2013 11:40 xScylez#20
Quote:
Originally Posted by Fang View Post
So before the body of code that handles the boots is called, check if the player is wearing boots to begin with. You can do that using a selection statement.
Woah, didn't think of that.. How come(?) haha!
Thanks :)