diff options
| author | Caroline Madsen <69010899+randomsalience@users.noreply.github.com> | 2025-02-23 17:43:25 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-23 14:43:25 -0800 |
| commit | e3d0b94122116ae1cd8188078ad6e710eb54a26c (patch) | |
| tree | ebca4b093d6afcaa9f344e99cd11bc3de0024169 /src/d/d_event.cpp | |
| parent | 531a6d6d68655a1e7aad0b511971ff6c777e6d86 (diff) | |
d_a_npc work (#2306)
Diffstat (limited to 'src/d/d_event.cpp')
| -rw-r--r-- | src/d/d_event.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/d/d_event.cpp b/src/d/d_event.cpp index 13d55cd8df..10a8a9f04a 100644 --- a/src/d/d_event.cpp +++ b/src/d/d_event.cpp @@ -1160,24 +1160,24 @@ dStage_MapEvent_dt_c* dEvt_control_c::searchMapEventData(u8 mapToolID, s32 roomN return NULL; } - dStage_roomStatus_c* room = dComIfGp_roomControl_getStatusRoomDt(roomNo); - if (room != NULL) { - dStage_MapEventInfo_c* roomDt = room->mRoomDt.getMapEventInfo(); - - if (roomDt != NULL) { - for (int i = 0; i < roomDt->mCount; i++) { - if (mapToolID == roomDt->mData[i].field_0x4) { - return &roomDt->mData[i]; + dStage_roomDt_c* room_dt = dComIfGp_roomControl_getStatusRoomDt(roomNo); + if (room_dt != NULL) { + dStage_MapEventInfo_c* roomInfo = room_dt->getMapEventInfo(); + + if (roomInfo != NULL) { + for (int i = 0; i < roomInfo->mCount; i++) { + if (mapToolID == roomInfo->mData[i].field_0x4) { + return &roomInfo->mData[i]; } } } } - dStage_MapEventInfo_c* stageDt = dComIfGp_getStage()->getMapEventInfo(); - if (stageDt != NULL) { - for (int i = 0; i < stageDt->mCount; i++) { - if (mapToolID == stageDt->mData[i].field_0x4) { - return &stageDt->mData[i]; + dStage_MapEventInfo_c* stageInfo = dComIfGp_getStage()->getMapEventInfo(); + if (stageInfo != NULL) { + for (int i = 0; i < stageInfo->mCount; i++) { + if (mapToolID == stageInfo->mData[i].field_0x4) { + return &stageInfo->mData[i]; } } } |
