| 1109 | } |
| 1110 | |
| 1111 | void CGameWorld::UpdateItemInContainer(CGameObject *obj, CGameObject *container, int x, int y) |
| 1112 | { |
| 1113 | obj->SetX(x); |
| 1114 | obj->SetY(y); |
| 1115 | PutContainer(obj, container); |
| 1116 | const uint32_t containerSerial = container->Serial; |
| 1117 | |
| 1118 | CGump *gump = g_GumpManager.UpdateContent(containerSerial, 0, GT_BULLETIN_BOARD); |
| 1119 | // Message board item |
| 1120 | if (gump != nullptr) |
| 1121 | { |
| 1122 | CPacketBulletinBoardRequestMessageSummary(containerSerial, obj->Serial).Send(); |
| 1123 | } |
| 1124 | else |
| 1125 | { |
| 1126 | gump = g_GumpManager.UpdateContent(containerSerial, 0, GT_SPELLBOOK); |
| 1127 | if (gump == nullptr) |
| 1128 | { |
| 1129 | gump = g_GumpManager.UpdateContent(containerSerial, 0, GT_CONTAINER); |
| 1130 | if (gump != nullptr && gump->GumpType == GT_CONTAINER) |
| 1131 | { |
| 1132 | ((CGumpContainer *)gump)->UpdateItemCoordinates(obj); |
| 1133 | g_GumpManager.UpdateContent(0, 0, GT_RESOURCETRACKER); |
| 1134 | } |
| 1135 | } |
| 1136 | if (gump != nullptr && !container->NPC) |
| 1137 | { |
| 1138 | ((CGameItem *)container)->Opened = true; |
| 1139 | } |
| 1140 | } |
| 1141 | |
| 1142 | CGameObject *top = container->GetTopObject(); |
| 1143 | if (top != nullptr) |
| 1144 | { |
| 1145 | top = top->FindSecureTradeBox(); |
| 1146 | if (top != nullptr) |
| 1147 | { |
| 1148 | g_GumpManager.UpdateContent(0, top->Serial, GT_TRADE); |
| 1149 | } |
| 1150 | } |
| 1151 | } |
| 1152 | |
| 1153 | void CGameWorld::UpdateContainedItem( |
| 1154 | uint32_t serial, |
nothing calls this directly
no test coverage detected