From ec4b5d48dc02b4e75a4b3d6a3e161a5421adee8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caner=20K=C4=B1l=C4=B1=C3=A7o=C4=9Flu?= Date: Fri, 29 May 2026 20:25:25 +0300 Subject: [PATCH] added: TazUO maparea dialog prop https://tazuo.org/wiki/custom-server-gump-controls/#map-area --- Changelog.txt | 10 ++++++++++ src/common/resource/sections/CDialogDef.cpp | 20 ++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/Changelog.txt b/Changelog.txt index 782504276..3dea18d82 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -4141,3 +4141,13 @@ When setting a property like MORE to the a spell or skill defname, trying to rea 19-05-2026, nightNR - Fixed: pre-AOS armor rating (AR) calculation (#1550). - Fixed NPCs can't cast spells from spellbook after respawn (#1551). + +29-05-2026, canerksk +- Added: Maparea, one of the dialog features of TazUO added. + maparea x y w h mapIndex mapX mapY mapbitX mapbitY + eg; + [dialog d_mapareatest] + 0,0 + resizepic 0 0 3000 500 500 + maparea 20 20 400 300 -200> -150> +200> +150> + diff --git a/src/common/resource/sections/CDialogDef.cpp b/src/common/resource/sections/CDialogDef.cpp index dad0f17b8..7c370f33f 100644 --- a/src/common/resource/sections/CDialogDef.cpp +++ b/src/common/resource/sections/CDialogDef.cpp @@ -34,6 +34,8 @@ enum GUMPCTL_TYPE // controls we can put in a gump. GUMPCTL_ITEMPROPERTY, // 1 = uid of the item in question. + GUMPCTL_MAPAREA, // NEW: x,y,w,h,mapIndex,areaX,areaY,areaEndX,areaEndY + // Not really controls but more attributes. GUMPCTL_NOCLOSE, // 0 = The gump cannot be closed by right clicking. GUMPCTL_NODISPOSE, // 0 = The gump cannot be closed by gump-closing macro. @@ -83,6 +85,8 @@ lpctstr const CDialogDef::sm_szLoadKeys[GUMPCTL_QTY+1] = "ITEMPROPERTY", + "MAPAREA", + "NOCLOSE", "NODISPOSE", "NOMOVE", @@ -456,6 +460,22 @@ bool CDialogDef::r_Verb( CScript & s, CTextConsole * pSrc ) // some command on t return true; } + case GUMPCTL_MAPAREA: + { + GET_RELATIVE(x, m_iOriginX); + GET_RELATIVE(y, m_iOriginY); + GET_ABSOLUTE(width); + GET_ABSOLUTE(height); + GET_ABSOLUTE(mapIndex); + GET_ABSOLUTE(areaX); + GET_ABSOLUTE(areaY); + GET_ABSOLUTE(areaEndX); + GET_ABSOLUTE(areaEndY); + + m_sControls.emplace_back(false).Format("maparea %d %d %d %d %d %d %d %d %d", x, y, width, height, mapIndex, areaX, areaY, areaEndX, areaEndY); + return true; + } + case GUMPCTL_NODISPOSE: m_fNoDispose = true; break;