- CGObject_C base, CEffect, CObjectEffect/CObjectEffectManager effect states - Unit, Player, Item/Container/Bag, Corpse, DynamicObject, GameObject and all GameObject type classes (vtables matched slot by slot), Movement, MovementShared, Missile, Vehicle/Passenger/Camera, combat log, caches - Client object manager (0x4D3100-0x4D7880) incl. SMSG_UPDATE_OBJECT, SMSG_COMPRESSED_UPDATE_OBJECT, SMSG_DESTROY_OBJECT; type ctors/PostInit - CGGameUI::CanPerformAction and the ready part of CGInputControl - Layouts named from descriptor fields and code; CM2Model 0x134 matrix, CClientObjCreate tail, CGUnit_C/CGPlayer_C sizes 0x1008/0x1958 - WOWGUID struct replaces the IDB's WGUID low/high pair and guid uint64_t; SmartGUID derives from it; member functions returning a guid keep uint64_t (MSVC returns class types from members via hidden pointer); structs with 4-aligned guids in 12340 use pack(4) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
32 lines
980 B
C++
32 lines
980 B
C++
#include "PlayerSound_C.h"
|
|
#include "WoW/Source/DB/DBClient/DBClient.h"
|
|
#include "WoW/Source/DB/Rec/MaterialRec.h"
|
|
#include "WoW/Source/Object/ObjectClient/Item_C.h"
|
|
#include "WoW/Source/Object/ObjectClient/Player_C.h"
|
|
#include "WoW/Source/ObjectMgrClient/ObjectMgrClient.h"
|
|
|
|
// VERIFY: 91d27b03 manual
|
|
// OFFSET: 0x007634F0
|
|
uint32_t CGPlayer_C::GetImpactType() const {
|
|
const CGBag_C* bag = this->GetBag();
|
|
WOWGUID guid = static_cast<uint32_t>(bag->m_numSlots) > 4 ? bag->m_slots[4] : WOWGUID();
|
|
CGItem_C* item = static_cast<CGItem_C*>(ClntObjMgrObjectPtr(guid, TYPEMASK_ITEM, __FILE__, __LINE__));
|
|
const CGUnitVirtualItem* chest = item ? &item->m_virtualItem : nullptr;
|
|
|
|
if (!chest || chest->m_classID != 4) {
|
|
return 0;
|
|
}
|
|
|
|
MaterialRec* rec = g_materialDB.GetRecord(chest->m_material);
|
|
|
|
if (!rec) {
|
|
return 0;
|
|
}
|
|
|
|
if (rec->m_flags & 0x2) {
|
|
return 2;
|
|
}
|
|
|
|
return (static_cast<int8_t>(rec->m_flags) & 0x4) >> 2;
|
|
}
|