void LogManager::ItemLog(LPCHARACTER ch, LPITEM item, const char * c_pszText, const char * c_pszHint) { if (NULL == ch || NULL == item) { sys_err("character or item nil (ch %p item %p text %s)", get_pointer(ch), get_pointer(item), c_pszText); return; } ItemLog(ch->GetPlayerID(), ch->GetX(), ch->GetY(), item->GetID(), NULL == c_pszText ? "" : c_pszText, c_pszHint, ch->GetDesc() ? ch->GetDesc()->GetHostName() : "", item->GetOriginalVnum()); }
void Item_GetDamage(LPITEM pkItem, int* pdamMin, int* pdamMax) { *pdamMin = 0; *pdamMax = 1; if (!pkItem) return; switch (pkItem->GetType()) { case ITEM_ROD: case ITEM_PICK: return; } if (pkItem->GetType() != ITEM_WEAPON) sys_err("Item_GetDamage - !ITEM_WEAPON vnum=%d, type=%d", pkItem->GetOriginalVnum(), pkItem->GetType()); *pdamMin = pkItem->GetValue(3); *pdamMax = pkItem->GetValue(4); }