bool AttributeMap::Add( uint32 attributeID, EvilNumber& num ) { Notify_OnModuleAttributeChange modChange; modChange.ownerID = mItem.ownerID(); modChange.itemKey = mItem.itemID(); modChange.attributeID = attributeID; modChange.time = Win32TimeNow(); modChange.newValue = num.GetPyObject(); modChange.oldValue = num.GetPyObject(); return SendAttributeChanges(modChange.Encode()); }
bool AttributeMap::Add( uint32 attributeID, EvilNumber& num ) { mChanged = true; PyTuple* AttrChange = new PyTuple(7); AttrChange->SetItem(0, new PyString( "OnModuleAttributeChange" )); AttrChange->SetItem(1, new PyInt( mItem.ownerID() )); AttrChange->SetItem(2, new PyInt( mItem.itemID() )); AttrChange->SetItem(3, new PyInt( attributeID )); AttrChange->SetItem(4, new PyLong( Win32TimeNow() )); AttrChange->SetItem(5, num.GetPyObject()); AttrChange->SetItem(6, num.GetPyObject()); return SendAttributeChanges(AttrChange); }