void CGrenade::GetBriefInfo(xr_string& str_name, xr_string& icon_sect_name, xr_string& str_count) { str_name = NameShort(); u32 ThisGrenadeCount = m_pCurrentInventory->dwfGetSameItemCount(*cNameSect(), true); string16 stmp; sprintf_s (stmp, "%d", ThisGrenadeCount); str_count = stmp; icon_sect_name = *cNameSect(); }
/* s32 CWeaponAmmo::Sort(PIItem pIItem) { // Если нужно разместить IItem после this - вернуть 1, если // перед - -1. Если пофиг то 0. CWeaponAmmo *l_pA = smart_cast<CWeaponAmmo*>(pIItem); if(!l_pA) return 0; if(xr_strcmp(cNameSect(), l_pA->cNameSect())) return 0; if(m_boxCurr <= l_pA->m_boxCurr) return 1; else return -1; } */ bool CWeaponAmmo::Get(CCartridge &cartridge) { if(!m_boxCurr) return false; cartridge.m_ammoSect = cNameSect(); cartridge.m_kDist = m_kDist; cartridge.m_kDisp = m_kDisp; cartridge.m_kHit = m_kHit; cartridge.m_kImpulse = m_kImpulse; cartridge.m_kPierce = m_kPierce; cartridge.m_kAP = m_kAP; cartridge.m_kAirRes = m_kAirRes; cartridge.m_u8ColorID = m_u8ColorID; cartridge.m_flags.set(CCartridge::cfTracer ,m_tracer); cartridge.m_buckShot = m_buckShot; cartridge.m_impair = m_impair; cartridge.fWallmarkSize = fWallmarkSize; cartridge.bullet_material_idx = GMLib.GetMaterialIdx(WEAPON_MATERIAL_NAME); cartridge.m_InvShortName = NameShort(); --m_boxCurr; if(m_pInventory)m_pInventory->InvalidateState(); return true; }
void CWeaponKnife::GetBriefInfo(xr_string& str_name, xr_string& icon_sect_name, xr_string& str_count, string16& fire_mode) { str_name = NameShort(); str_count = ""; icon_sect_name = *cNameSect(); }