| 778 | } |
| 779 | |
| 780 | void CGameWorld::UpdateGameObject( |
| 781 | uint32_t serial, |
| 782 | uint16_t graphic, |
| 783 | uint8_t graphicIncrement, |
| 784 | int count, |
| 785 | int x, |
| 786 | int y, |
| 787 | char z, |
| 788 | uint8_t direction, |
| 789 | uint16_t color, |
| 790 | uint8_t flags, |
| 791 | int a11, |
| 792 | UPDATE_GAME_OBJECT_TYPE updateType, |
| 793 | uint16_t a13) |
| 794 | { |
| 795 | Info( |
| 796 | Client, |
| 797 | "UpdateGameObject 0x%08X:0x%04X 0x%04X (%i) %d:%d:%d %i", |
| 798 | serial, |
| 799 | graphic, |
| 800 | color, |
| 801 | count, |
| 802 | x, |
| 803 | y, |
| 804 | z, |
| 805 | direction); |
| 806 | |
| 807 | CGameCharacter *character = nullptr; |
| 808 | CGameItem *item = nullptr; |
| 809 | CGameObject *obj = FindWorldObject(serial); |
| 810 | if (g_ObjectInHand.Enabled && g_ObjectInHand.Serial == serial) |
| 811 | { |
| 812 | if ((g_ObjectInHand.Container != 0u) && g_ObjectInHand.Container != 0xFFFFFFFF) |
| 813 | { |
| 814 | if (g_ObjectInHand.Layer == 0u) |
| 815 | { |
| 816 | g_GumpManager.UpdateContent(g_ObjectInHand.Container, 0, GT_CONTAINER); |
| 817 | g_GumpManager.UpdateContent(0, 0, GT_RESOURCETRACKER); |
| 818 | } |
| 819 | else |
| 820 | { |
| 821 | g_GumpManager.UpdateContent(g_ObjectInHand.Container, 0, GT_PAPERDOLL); |
| 822 | } |
| 823 | } |
| 824 | |
| 825 | g_ObjectInHand.UpdatedInWorld = true; |
| 826 | } |
| 827 | |
| 828 | bool created = false; |
| 829 | if (obj == nullptr) |
| 830 | { |
| 831 | created = true; |
| 832 | Info(Client, "created "); |
| 833 | if (((serial & 0x40000000) == 0) && updateType != 3) |
| 834 | { |
| 835 | character = GetWorldCharacter(serial); |
| 836 | if (character == nullptr) |
| 837 | { |
no test coverage detected