Quote:
Originally Posted by Drajor
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.
|
in SetStartingItems(), it looks as though CreateBaseItem() is called on the result of GetItem(), and then that item instance is passed to inv->PutItem().