Index: src/hearthstone-world/Creature.cpp =================================================================== --- src/hearthstone-world/Creature.cpp (revision 595) +++ src/hearthstone-world/Creature.cpp (working copy) @@ -1408,3 +1408,16 @@ GetAIInterface()->addWayPoint(wp); } } + +// custom functions for scripting +uint32 Creature::GetProtoItemDisplayId(uint8 slot) +{ + switch (slot) + { + case 0: return GetProto()->Item1; + case 1: return GetProto()->Item2; + case 2: return GetProto()->Item3; + } + + return 0; +} Index: src/hearthstone-world/Creature.h =================================================================== --- src/hearthstone-world/Creature.h (revision 595) +++ src/hearthstone-world/Creature.h (working copy) @@ -543,6 +543,8 @@ bool m_PickPocketed; uint32 _fields[UNIT_END]; +// custom functions for scripting + uint32 GetProtoItemDisplayId(uint8 slot); public: // loooooot void GenerateLoot(); Index: src/hearthstone-world/GameObject.cpp =================================================================== --- src/hearthstone-world/GameObject.cpp (revision 595) +++ src/hearthstone-world/GameObject.cpp (working copy) @@ -729,3 +729,14 @@ } SetFloatValue(GAMEOBJECT_ROTATION, rad); } + +// custom functions for scripting +void GameObject::SetState(uint8 state) +{ + SetByte(GAMEOBJECT_BYTES_1, GAMEOBJECT_BYTES_STATE, state); +} + +uint8 GameObject::GetState() +{ + return GetByte(GAMEOBJECT_BYTES_1, GAMEOBJECT_BYTES_STATE); +} Index: src/hearthstone-world/GameObject.h =================================================================== --- src/hearthstone-world/GameObject.h (revision 595) +++ src/hearthstone-world/GameObject.h (working copy) @@ -251,6 +251,10 @@ // loooot void GenerateLoot(); +// custom functions for scripting + void SetState(uint8 state); + uint8 GetState(); + protected: bool m_summonedGo; Index: src/hearthstone-world/Unit.cpp =================================================================== --- src/hearthstone-world/Unit.cpp (revision 595) +++ src/hearthstone-world/Unit.cpp (working copy) @@ -6419,3 +6419,9 @@ SetFloatValue(PLAYER_RUNE_REGEN_1_1, 0.100000f); } } + +// custom functions for scripting +void Unit::SetWeaponDisplayId(uint8 slot, uint32 displayId) +{ + SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+slot, displayId); +} \ No newline at end of file Index: src/hearthstone-world/Unit.h =================================================================== --- src/hearthstone-world/Unit.h (revision 595) +++ src/hearthstone-world/Unit.h (working copy) @@ -1239,6 +1239,10 @@ float m_ignoreArmorPctMaceSpec; float m_ignoreArmorPct; + +// custom functions for scripting + void SetWeaponDisplayId(uint8 slot, uint32 displayId); + protected: Unit ();