View Single Post
  #1  
Old 11-27-2012, 06:13 AM
Drajor's Avatar
Drajor
Developer
 
Join Date: Nov 2012
Location: Halas
Posts: 355
Default Possible issue using GetItem() in SharedDatabase::SetStartingItems()

Heyas,

I add some items to players inventories during character creation and everything works fine except for an item that has a click effect on it.

In the SharedDatabase::SetStartingItems() method I add a charm for each class like this.
Code:
	// Charms
	if (pp->class_ == WARRIOR)
		inv->PutItem(inv->FindFreeSlot(0,0), GetItem(3400));
The item appears in the player inventory correctly, however when I try to right click the item I get the message 'Item is out of charges'. If I delete the item and #si it again, the click effect works fine.

This makes me think that something is not getting initialised correctly when calling GetItem() at this point. Any ideas? I looked at the code but I can't find anything which would cause this.

EDIT: I am using HoT client and rev 2214 of the source.
__________________
Drajor regards you indifferently -- what would you like your tombstone to say?
Reply With Quote