Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MinimapWnd extends UICommonAPI;
- const OTHER_HIGHLIGHT_ICON_INDEX = 100;
- const REGIONINFO_OFFSETX = 225;
- const REGIONINFO_OFFSETY = 400;
- const TIMER_ID = 225;
- const TIMER_DELAY = 1500;
- var string m_WindowName;
- var int m_PartyMemberCount;
- var int m_PartyLocIndex;
- var int isNoShowMissionWindow;
- var bool m_AdjustCursedLoc;
- var bool m_bShowCurrentLocation;
- var bool m_bShowGameTime;
- var bool bMiniMapDisabled;
- var bool m_bExpandState;
- var Vector BlockedLoc1;
- var Vector BlockedLoc2;
- var int FortressID;
- var int SiegeStatus;
- var int TotalBarrackCnt;
- var int GlobalCurFortressID;
- var int G_ZoneID;
- var int G_ZoneID2;
- var string m_combocursedName;
- var int m_CurContinent;
- var int CurrentLayer;
- var int TotalLayers;
- var WindowHandle me;
- var WindowHandle m_MinimapMissionWnd;
- var ItemWindowHandle m_questItem;
- var MinimapCtrlHandle m_MiniMap;
- var ButtonHandle ReduceButton;
- var TabHandle m_MapSelectTab;
- var ButtonHandle ServerInfo01_Button;
- var ButtonHandle ServerInfo02_Button;
- var ButtonHandle ServerInfo03_Button;
- var ButtonHandle ServerInfo04_Button;
- var array<MapServerInfo> serverInfoArray;
- var Vector QuestLocation;
- var int DelayRequestSeedInfo;
- var array<string> SeedDataforMap;
- var TextureHandle TabBg_Line;
- var Rect smallMapRect;
- var MinimapMissionWnd MinimapMissionWndScript;
- var bool bCompleteBaseElementShow;
- var bool bIsTownMap;
- var int nTownMapZoneID;
- var MinimapCtrlHandle TeleportBookMarkWnd_MiniMap;
- function OnRegisterEvent()
- {
- RegisterEvent( EV_ShowMinimap );
- RegisterEvent( EV_PartyMemberChanged );
- RegisterEvent( EV_MinimapAddTarget );
- RegisterEvent( EV_MinimapDeleteTarget );
- RegisterEvent( EV_MinimapDeleteAllTarget );
- RegisterEvent( EV_MinimapShowQuest );
- RegisterEvent( EV_MinimapHideQuest );
- RegisterEvent( EV_MinimapChangeZone );
- RegisterEvent( EV_MinimapCursedWeaponList );
- RegisterEvent( EV_MinimapCursedWeaponLocation );
- RegisterEvent( EV_BeginShowZoneTitleWnd );
- RegisterEvent( EV_MinimapShowReduceBtn );
- RegisterEvent( EV_MinimapHideReduceBtn );
- RegisterEvent( EV_MinimapUpdateGameTime );
- RegisterEvent( EV_MinimapTravel );
- RegisterEvent( EV_BeginShowZoneTitleWnd );
- RegisterEvent( EV_MinimapRegionInfoBtnClick );
- RegisterEvent( EV_ShowFortressMapInfo );
- RegisterEvent( EV_FortressMapBarrackInfo);
- RegisterEvent( EV_ShowFortressSiegeInfo );
- RegisterEvent( EV_SystemMessage );
- RegisterEvent( EV_MinimapShowMultilayer );
- RegisterEvent( EV_MinimapCloseMultilayer );
- RegisterEvent( EV_GamingStateEnter );
- registerEvent( EV_ResolutionChanged);
- RegisterEvent(EV_AddCastleInfo);
- RegisterEvent(EV_AddFortressInfo);
- RegisterEvent(EV_AddAgitSiegeInfo);
- RegisterEvent( EV_ShowSeedMapInfo );
- RegisterEvent( EV_RaidServerInfo );
- RegisterEvent( EV_ItemAuctionStatus );
- RegisterEvent( EV_NeedResetUIData );
- RegisterEvent( EV_FactionInfo );
- RegisterEvent( EV_Restart );
- RegisterEvent( EV_MinimapAdjustViewLocation );
- RegisterEvent( EV_Test_2 );
- }
- function OnLoad()
- {
- local Color txtVarCurLocColor;
- SetClosingOnESC();
- MinimapMissionWndScript = MinimapMissionWnd(GetScript("MinimapMissionWnd"));
- me = GetWindowHandle( "MinimapWnd" );
- m_MinimapMissionWnd = GetWindowHandle( "MinimapMissionWnd" );
- m_questItem = GetItemWindowHandle("InventoryWnd.QuestItem");
- m_MiniMap = GetMinimapCtrlHandle( "MinimapWnd.Minimap" );
- ReduceButton = GetButtonHandle( "MinimapWnd.btnReduce");
- m_MapSelectTab = GetTabHandle("MiniMapWnd.MapSelectTab");
- TabBg_Line = GetTextureHandle( "MiniMapWnd.TabBg_Line" );
- ServerInfo01_Button = GetButtonHandle("MiniMapWnd.ServerInfo01_Button");
- ServerInfo02_Button = GetButtonHandle("MiniMapWnd.ServerInfo02_Button");
- ServerInfo03_Button = GetButtonHandle("MiniMapWnd.ServerInfo03_Button");
- ServerInfo04_Button = GetButtonHandle("MiniMapWnd.ServerInfo04_Button");
- TeleportBookMarkWnd_MiniMap = GetMinimapCtrlHandle ( "TeleportBookMarkWnd.Minimap" );
- m_PartyLocIndex = -1;
- m_PartyMemberCount = GetPartyMemberCount();
- m_AdjustCursedLoc = false;
- m_bShowCurrentLocation=true;
- m_bShowGameTime=true;
- BlockedLoc1.x = -32768f;
- BlockedLoc1.y = 32768f;
- BlockedLoc2.x = 229376f;
- BlockedLoc2.y = 262144f;
- bMiniMapDisabled = true;
- txtVarCurLocColor.R = 254;
- txtVarCurLocColor.G = 243;
- txtVarCurLocColor.B = 124;
- class'UIAPI_TEXTBOX'.static.SetTextColor("Minimapwnd.txtVarCurLoc",txtVarCurLocColor);
- initServerInfoArray();
- initServerButton();
- }
- function OnEvent( int a_EventID, String a_Param )
- {
- switch( a_EventID )
- {
- case EV_BeginShowZoneTitleWnd:
- HandleZoneTitle();
- SetCurrentLocation();
- G_ZoneID2 = GetCurrentZoneID();
- break;
- case EV_MinimapRegionInfoBtnClick:
- HandleDungeonMapRefresh(a_Param);
- break;
- case EV_ShowMinimap:
- G_ZoneID2 = GetCurrentZoneID();
- HandleShowMinimap( a_Param );
- break;
- case EV_PartyMemberChanged:
- HandlePartyMemberChanged( a_Param );
- break;
- case EV_MinimapAddTarget:
- HandleMinimapAddTarget( a_Param );
- break;
- case EV_MinimapDeleteTarget:
- HandleMinimapDeleteTarget( a_Param );
- break;
- case EV_MinimapDeleteAllTarget:
- HandleMinimapDeleteAllTarget();
- break;
- case EV_MinimapShowQuest:
- HandleMinimapShowQuest();
- break;
- case EV_MinimapHideQuest:
- HandleMinimapHideQuest();
- break;
- case EV_MinimapChangeZone :
- AdjustMapToPlayerPosition( true );
- G_ZoneID2 = GetCurrentZoneID();
- ParamAdd(a_Param, "ZoneID", String(G_ZoneID2));
- Class'MiniMapAPI'.static.RequestSeedPhase();
- break;
- case EV_MinimapCursedweaponList :
- break;
- case EV_MinimapCursedweaponLocation :
- HandleCursedWeaponLoctaion(a_Param);
- break;
- case EV_MinimapShowReduceBtn :
- if (a_Param != "") ParseInt(a_Param,"ZoneID", nTownMapZoneID);
- else nTownMapZoneID = 0;
- bIsTownMap = true;
- ReduceButton.ShowWindow();
- showAllRegionIcon(false);
- setDirIconDest();
- break;
- case EV_MinimapHideReduceBtn :
- bIsTownMap = false;
- ReduceButton.HideWindow();
- showAllRegionIcon(true);
- setDirIconDest();
- break;
- case EV_MinimapUpdateGameTime :
- if(m_bShowGameTime)
- {
- HandleUpdateGameTime(a_Param);
- }
- break;
- case EV_MinimapTravel:
- HandleMinimapTravel( a_Param );
- break;
- case EV_ShowFortressMapInfo:
- Debug("minimap" @ "EV_ShowFortressMapInfo" @ a_Param );
- break;
- case EV_FortressMapBarrackInfo:
- Debug("minimap" @ "EV_FortressMapBarrackInfo" @ a_Param );
- break;
- case EV_ShowFortressSiegeInfo:
- Debug("minimap" @ "EV_ShowFortressSiegeInfo" @ a_Param );
- break;
- case EV_SystemMessage:
- case EV_GamingStateEnter:
- SiegeStatus = 0;
- FortressID =0;
- TotalBarrackCnt =0;
- GlobalCurFortressID = 0;
- G_ZoneID = 0;
- G_ZoneID2 = 0;
- break;
- case EV_MinimapShowMultilayer:
- ShowMultilayer(a_param);
- break;
- case EV_MinimapCloseMultilayer:
- CloseMultilayer();
- break;
- case EV_NeedResetUIData:
- class'UIAPI_MINIMAPCTRL'.static.ResetMinimapData( "MinimapWnd.Minimap" );
- checkClassicForm();
- break;
- case EV_ResolutionChanged:
- if (IsExpandState()) setMapSize(true);
- break;
- case EV_AddCastleInfo:
- LoadCastleInfo(a_Param);
- break;
- case EV_AddFortressInfo :
- LoadFortressInfo(a_Param);
- break;
- case EV_AddAgitSiegeInfo :
- LoadAgitSiegeInfo(a_Param);
- break;
- case EV_ShowSeedMapInfo:
- Debug("minimap" @ "EV_ShowSeedMapInfo" );
- HandleSeedMapInfo(a_Param);
- break;
- case EV_RaidServerInfo :
- LoadRaidServerInfo(a_Param);
- break;
- case EV_ItemAuctionStatus :
- LoadItemAuctionStatus(a_Param);
- break;
- case EV_FactionInfo :
- loadFactionInfo(a_Param);
- break;
- case EV_MinimapAdjustViewLocation :
- minimapAdjustViewLocationProcess(a_Param);
- break;
- case EV_Restart :
- resetMapData();
- break;
- case EV_Test_2 :
- testCode(a_Param);
- break;
- }
- }
- function minimapAdjustViewLocationProcess(string param)
- {
- local int x, y, z;
- local Vector loc;
- Debug("param" @ param);
- ParseInt(Param, "LocX", x);
- ParseInt(Param, "LocY", y);
- ParseInt(Param, "LocZ", z);
- loc = setVector(x, y, z);
- SetLocContinent(loc);
- class'UIAPI_MINIMAPCTRL'.static.AdjustMapView( "MinimapWnd.Minimap", loc, true);
- }
- function testCode(string param)
- {
- local int x, y, z;
- local Vector loc;
- ParseInt(Param, "x", x);
- ParseInt(Param, "y", y);
- ParseInt(Param, "z", z);
- loc = setVector(x, y, z);
- SetLocContinent(loc);
- class'UIAPI_MINIMAPCTRL'.static.AdjustMapView( "MinimapWnd.Minimap", loc, true);
- }
- function loadFactionInfo(string a_Param)
- {
- local array<L2UserFactionUIInfo> factionInfoListArray;
- local MinimapRegionInfo regionInfo;
- local UserInfo pUserInfo;
- if (Me.IsShowWindow())
- {
- GetPlayerInfo(pUserInfo);
- if (bCompleteBaseElementShow)
- drawFactionMapIcon(true);
- else
- drawFactionMapIcon();
- }
- }
- function drawFactionMapIcon(optional bool bUseUpdate)
- {
- local array<L2UserFactionUIInfo> factionInfoListArray;
- local MinimapRegionInfo regionInfo, emptyRegionInfo;
- local UserInfo pUserInfo;
- local int i;
- local L2FactionUIData factionData;
- local MinimapRegionIconData iconData;
- GetPlayerInfo(pUserInfo);
- GetUserFactionInfoList(pUserInfo.nID, factionInfoListArray);
- for(i = 0; i < factionInfoListArray.Length; i++)
- {
- regionInfo = emptyRegionInfo;
- GetFactionData(factionInfoListArray[i].nFactionID, factionData);
- ParamAdd(regionInfo.strTooltip, "Type", String(EMinimapRegionType.MRT_Faction));
- ParamAdd(regionInfo.strTooltip, "nFactionID", String(factionInfoListArray[i].nFactionID));
- ParamAdd(regionInfo.strTooltip, "nFactionLevel", String(factionInfoListArray[i].nFactionLevel));
- regionInfo.nIndex = factionData.nRegionID;
- regionInfo.eType = EMinimapRegionType.MRT_Faction;
- regionInfo.DescColor = getInstanceL2Util().ColorMinimapFont;
- if(GetMinimapRegionIconData(factionData.nRegionID, iconData))
- {
- regionInfo.IconData = iconData;
- regionInfo.iconData.nIconOffsetX = -16;
- regionInfo.iconData.nIconOffsetY = -16;
- }
- addMapIcon(regionInfo, bUseUpdate);
- }
- }
- function resetMapData()
- {
- Debug("resetMapData");
- bCompleteBaseElementShow = false;
- initServerInfoArray();
- m_MiniMap.EraseAllRegionInfo();
- TeleportBookMarkWnd_MiniMap.EraseAllRegionInfo();
- }
- function LoadItemAuctionStatus ( string Param )
- {
- local Vector loc;
- local int nState;
- local bool bUse;
- ParseInt(Param, "State", nState);
- if (nState > 0)
- {
- bUse = true;
- ParseFloat(Param, "WorldLocX", loc.x);
- ParseFloat(Param, "WorldLocY", loc.y);
- ParseFloat(Param, "WorldLocZ", loc.z);
- Debug("Ŭ¸¯!!!");
- }
- Debug("LoadItemAuctionStatus " @ Param);
- setServerParse(MapServerInfoType.AUCTION, Param, bUse, loc);
- }
- function LoadRaidServerInfo ( string Param )
- {
- local int nWorldRaidState, nWorldCastleSiegeState;
- local bool bUse;
- Debug("LoadRaidServerInfo Param: " @Param);
- ParseInt( Param, "WorldRaidState" , nWorldRaidState);
- ParseInt( Param, "WorldCastleSiegeState", nWorldCastleSiegeState);
- if (nWorldRaidState > 0) bUse = true;
- else bUse = false;
- setServerParse(MapServerInfoType.RAID_DIMENSION, Param, bUse);
- if (nWorldCastleSiegeState > 0) bUse = true;
- else bUse = false;
- setServerParse(MapServerInfoType.SIEGEWARFARE_DIMENSION, Param, bUse);
- }
- function LoadAgitSiegeInfo( string Param)
- {
- local MinimapRegionInfo regionInfo, emptyRegionInfo;
- local MinimapRegionIconData iconData;
- local int nRegionID;
- local string OwnerClanName, OwnerClanMasterName;
- local string OwnerClanNameToolTip;
- local string NextSiegeYear;
- local string NextSiegeMonth;
- local string NextSiegeDay;
- local string NextSiegeHour;
- local string NextSiegeMin;
- local string NextSiegeSec;
- local int i;
- local int agitCount, agitID;
- local string NextSiegeTime, agitName;
- ParseInt( Param, "AgitCount", agitCount);
- for(i = 0; i < agitCount; i++)
- {
- regionInfo = emptyRegionInfo;
- ParseInt( Param, "AgitID" $ i, agitID);
- ParseString( Param, "NextSiegeYear" $ i, NextSiegeYear);
- ParseString( Param, "NextSiegeMonth" $ i, NextSiegeMonth);
- ParseString( Param, "NextSiegeDay" $ i, NextSiegeDay);
- ParseString( Param, "NextSiegeHour" $ i, NextSiegeHour);
- ParseString( Param, "NextSiegeMin" $ i, NextSiegeMin);
- ParseString( Param, "NextSiegeSec" $ i, NextSiegeSec);
- ParseString( Param, "OwnerClanName" $ i, OwnerClanName);
- ParseString( Param, "OwnerClanMasterName" $ i, OwnerClanMasterName);
- nRegionID = GetCastleRegionID(agitID);
- agitName = GetCastleName(agitID);
- if (OwnerClanName == "")
- {
- OwnerClanName = GetSystemString(27);
- OwnerClanNameToolTip = GetSystemMessage(2196);
- }
- else
- {
- OwnerClanNameToolTip = MakeFullSystemMsg(GetSystemMessage(2197), OwnerClanName);
- OwnerClanName = OwnerClanName @ GetSystemString(439);
- }
- if (NextSiegeMonth == "0" && NextSiegeYear == "70" && NextSiegeDay == "1")
- {
- NextSiegeTime = GetSystemString(584);
- }
- else
- {
- NextSiegeMonth = String(Int(NextSiegeMonth) + 1);
- NextSiegeTime = MakeFullSystemMsg(GetSystemMessage(2203), NextSiegeMonth, NextSiegeDay) $ ", " $ MakeFullSystemMsg(GetSystemMessage(2204), NextSiegeHour);
- }
- ParamAdd(regionInfo.strTooltip, "AgitName", agitName);
- ParamAdd(regionInfo.strTooltip, "Type", String(EMinimapRegionType.MRT_Agit));
- ParamAdd(regionInfo.strTooltip, "OwnerClanName", OwnerClanName);
- ParamAdd(regionInfo.strTooltip, "OwnerClanMasterName", OwnerClanMasterName);
- ParamAdd(regionInfo.strTooltip, "NextSiegeTime", NextSiegeTime);
- ParamAdd(regionInfo.strTooltip, "LocationName", GetCastleLocationName(agitID));
- regionInfo.nIndex = nRegionID;
- regionInfo.eType = EMinimapRegionType.MRT_Agit;
- regionInfo.DescColor = getInstanceL2Util().ColorMinimapFont;
- if(GetMinimapRegionIconData(nRegionID, iconData))
- {
- regionInfo.IconData = iconData;
- }
- if(nRegionID > 0) addMapIcon(regionInfo, true);
- }
- }
- function LoadFortressInfo( string Param)
- {
- local MinimapRegionInfo regionInfo;
- local MinimapRegionIconData iconData;
- local int nRegionID;
- local string tempStr;
- local int FortressID;
- local string OwnerClanName;
- local int SiegeState;
- local int LastOwndedTime;
- local string CastleName;
- local string Statcur;
- local string iconname;
- local int Hour;
- local int Date;
- local int Min;
- local string DateTotal;
- Hour = 0;
- Date = 0;
- Min = 0;
- ParseInt( Param, "FortressID", FortressID);
- CastleName = GetCastleName(FortressID);
- ParseString( Param, "OwnerClanName", OwnerClanName);
- ParseInt( Param, "SiegeStatae", SiegeState);
- ParseInt( Param, "LastOwnedTime", LastOwndedTime);
- nRegionID = GetCastleRegionID(FortressID);
- if (OwnerClanName == "")
- OwnerClanName = GetSystemString(27);
- else
- OwnerClanName = OwnerClanName @ GetSystemString(439);
- if (SiegeState == 0)
- {
- Statcur = GetSystemString(894);
- iconname = "L2UI_CT1.ICON_DF_SIEGE_SHIELD";
- }
- else if(SiegeState == 1)
- {
- Statcur = GetSystemString(340);
- iconname = "L2UI_CT1.ICON_DF_SIEGE_SWORD";
- }
- Min = (LastOwndedTime/60);
- Hour = (Min/60);
- Date = (Hour/24);
- if (Min <60 && Min != 0)
- {
- DateTotal = String(Min) @ GetSystemString(1111);
- }
- else if (Hour <60 && Hour != 0)
- {
- DateTotal = String(Hour) @ GetSystemString(1110);
- }
- else if (Date != 0)
- {
- DateTotal = String(Date) @ GetSystemString(1109);
- }
- ParamAdd(regionInfo.strTooltip, "Type", String(EMinimapRegionType.MRT_Fortress));
- ParamAdd(regionInfo.strTooltip, "CastleName", CastleName);
- ParamAdd(regionInfo.strTooltip, "OwnerClanName", OwnerClanName);
- ParamAdd(regionInfo.strTooltip, "SiegeState", Statcur);
- ParamAdd(regionInfo.strTooltip, "LocationName", GetCastleLocationName(FortressID));
- ParamAdd(regionInfo.strTooltip, "DateTotal", DateTotal);
- regionInfo.nIndex = nRegionID;
- regionInfo.eType = EMinimapRegionType.MRT_Fortress;
- regionInfo.DescColor = getInstanceL2Util().ColorMinimapFont;
- if(GetMinimapRegionIconData(nRegionID, iconData))
- {
- regionInfo.IconData = iconData;
- }
- addMapIcon(regionInfo, true);
- }
- function LoadCastleInfo( string Param)
- {
- local int castleID;
- local string OwnerClanName;
- local string OwnerClanNameToolTip;
- local string TaxRate;
- local string NextSiegeTime;
- local string NextSiegeYear;
- local string NextSiegeMonth;
- local string NextSiegeDay;
- local string NextSiegeHour;
- local string NextSiegeMin;
- local string NextSiegeSec;
- local string NextSiegeTotalTime;
- local string CastleName;
- local int siegeState, castleType;
- local MinimapRegionInfo regionInfo;
- local MinimapRegionIconData iconData;
- local int nRegionID, huntingZoneIndex;
- local bool bUse;
- local Vector tVector, emptyVector;
- local string tempStr;
- ParseInt( Param, "CastleID", castleID);
- CastleName = GetCastleName(castleID);
- ParseString( Param, "OwnerClanName", OwnerClanName);
- ParseString( Param, "TaxRate", TaxRate);
- ParseString( Param, "NextSiegeYear", NextSiegeYear);
- ParseString( Param, "NextSiegeMonth", NextSiegeMonth);
- ParseString( Param, "NextSiegeDay", NextSiegeDay);
- ParseString( Param, "NextSiegeHour", NextSiegeHour);
- ParseString( Param, "NextSiegeMin", NextSiegeMin);
- ParseString( Param, "NextSiegeSec", NextSiegeSec);
- ParseString( Param, "NextSiegeTime", NextSiegeTotalTime);
- ParseInt( Param, "SiegeState", siegeState);
- ParseInt( Param, "CastleType", castleType);
- if (OwnerClanName == "")
- {
- OwnerClanName = GetSystemString(27);
- OwnerClanNameToolTip = GetSystemMessage(2196);
- }
- else
- {
- OwnerClanNameToolTip = MakeFullSystemMsg(GetSystemMessage(2197), OwnerClanName);
- OwnerClanName = OwnerClanName @ GetSystemString(439);
- }
- if (NextSiegeMonth == "0" && NextSiegeYear == "70" && NextSiegeDay == "1")
- {
- NextSiegeTime = GetSystemString(584);
- }
- else
- {
- if( Int(NextSiegeTotalTime) > 0 )
- {
- NextSiegeTime = BR_ConvertTimeToStr(Int(NextSiegeTotalTime), 0);
- }
- else
- {
- NextSiegeMonth = String(Int(NextSiegeMonth)+1);
- NextSiegeTime = MakeFullSystemMsg(GetSystemMessage(2203), NextSiegeMonth, NextSiegeDay);
- }
- }
- nRegionID = GetCastleRegionID(castleID);
- ParamAdd(regionInfo.strTooltip, "Type", String(EMinimapRegionType.MRT_Castle));
- ParamAdd(regionInfo.strTooltip, "CastleName", CastleName);
- ParamAdd(regionInfo.strTooltip, "LocationName", GetCastleLocationName(castleID));
- ParamAdd(regionInfo.strTooltip, "OwnerClanNameToolTip", OwnerClanNameToolTip);
- ParamAdd(regionInfo.strTooltip, "OwnerClanName", OwnerClanName);
- ParamAdd(regionInfo.strTooltip, "NextSiegeTime", NextSiegeTime);
- ParamAdd(regionInfo.strTooltip, "TaxRate", TaxRate $ "%");
- tempStr = "";
- if (siegeState == 0)
- {
- bUse = false;
- tempStr = GetSystemString(894);
- }
- else
- {
- bUse = true;
- tempStr = GetSystemString(339);
- }
- ParamAdd(regionInfo.strTooltip, "SiegeState", tempStr);
- tempStr = "";
- if (castleType == 1)
- tempStr = GetSystemString(3519);
- else if (castleType == 2)
- tempStr = GetSystemString(3520);
- else
- tempStr = "";
- ParamAdd(regionInfo.strTooltip, "CastleType", tempStr);
- regionInfo.eType = EMinimapRegionType.MRT_Castle;
- regionInfo.nIndex = nRegionID;
- regionInfo.DescColor = getInstanceL2Util().ColorMinimapFont;
- regionInfo.strDesc = CastleName;
- tVector = emptyVector;
- if(GetMinimapRegionIconData(nRegionID, iconData))
- {
- regionInfo.IconData = iconData;
- tVector.x = iconData.nWorldLocX;
- tVector.y = iconData.nWorldLocY;
- tVector.z = iconData.nWorldLocZ;
- }
- addMapIcon(regionInfo, true);
- setServerParse(MapServerInfoType.SIEGEWARFARE, CastleName, bUse, tVector, nRegionID);
- }
- function String currentWndName()
- {
- local string mapName;
- mapName = "MinimapWnd";
- return mapName;
- }
- function ShowMultilayer(string Param)
- {
- local int i;
- local string ComboBoxName;
- local string ComboBoxShadowName;
- local string WndName;
- local string btnString_None;
- local string btnString_Down;
- local string btnString_Over;
- WndName= currentWndName();
- ComboBoxShadowName = WndName$".ComboBoxShadow";
- ComboBoxName = WndName$".FloorComboBox";
- class'UIAPI_WINDOW'.static.ShowWindow(ComboBoxName);
- class'UIAPI_WINDOW'.static.ShowWindow(ComboBoxShadowName);
- ParseInt(Param, "CurrentLayer",CurrentLayer);
- ParseInt(Param, "TotalLayers",TotalLayers);
- class'UIAPI_COMBOBOX'.static.Clear(ComboBoxName);
- for( i=1;i<=TotalLayers;i++)
- {
- class'UIAPI_COMBOBOX'.static.AddString( ComboBoxName,i $ GetSystemString(5081));
- class'UIAPI_COMBOBOX'.static.SetSelectedNum( ComboBoxName,CurrentLayer-1 );
- }
- btnString_None="L2ui_ct1.Minimap.Minimap_DF_Minusbtn_Purple";
- btnString_Down="L2ui_ct1.Minimap.Minimap_DF_Minusbtn_Purple_Down";
- btnString_Over="L2ui_ct1.Minimap.Minimap_DF_Minusbtn_Purple_Over";
- ReduceButton.SetTexture(btnString_None, btnString_Down, btnString_Over);
- }
- function CloseMultilayer()
- {
- local string ComboBoxName;
- local string ComboBoxShadowName;
- local string WndName;
- local string btnString_None;
- local string btnString_Down;
- local string btnString_Over;
- WndName = currentWndName();
- ComboBoxShadowName = WndName $".ComboBoxShadow";
- ComboBoxName = WndName $ ".FloorComboBox";
- class'UIAPI_COMBOBOX'.static.Clear(ComboBoxName);
- class'UIAPI_WINDOW'.static.HideWindow(ComboBoxName);
- class'UIAPI_WINDOW'.static.HideWindow(ComboBoxShadowName);
- btnString_None="L2ui_ct1.Minimap.Minimap_df_Minusbtn_Blue";
- btnString_Down="L2ui_ct1.Minimap.Minimap_df_Minusbtn_Blue_Down";
- btnString_Over="L2ui_ct1.Minimap.Minimap_df_Minusbtn_Blue_Over";
- ReduceButton.SetTexture(btnString_None, btnString_Down, btnString_Over);
- }
- function HandleSeedMapInfo(string Param)
- {
- local int i;
- local int nSeedCount;
- local MinimapRegionInfo regionInfo;
- local MinimapRegionIconData iconData;
- local string toolTipParam, huntingZoneName;
- local int huntingZoneID, huntingZoneIndex, SeedMessageNum;
- local bool bUse;
- local HuntingZoneUIData huntingZoneData;
- if ( getInstanceUIData().getIsClassicServer() ) return;
- ParseInt(param, "SeedCount", nSeedCount);
- for(i = 0; i < nSeedCount; i++)
- {
- ParseInt(param, "HuntingZoneID_" $ i, huntingZoneID);
- ParseInt(param, "SysMsgNo_" $ i, SeedMessageNum);
- if(class'UIDATA_HUNTINGZONE'.static.IsValidData(huntingZoneID) == false) continue;
- regionInfo.eType = EMinimapRegionType.MRT_HuntingZone_Base;
- if(huntingZoneID == 303 || huntingZoneID == 286)
- {
- class'UIDATA_HUNTINGZONE'.static.GetHuntingZoneData(huntingZoneID, huntingZoneData);
- toolTipParam = "";
- ParamAdd(toolTipParam, "Type", String(regionInfo.eType));
- ParamAdd(toolTipParam, "Index", String(huntingZoneID));
- ParamAdd(toolTipParam, "SeedMessage", GetSystemMessage(SeedMessageNum));
- regionInfo.nIndex = huntingZoneData.nRegionID;
- regionInfo.DescColor = getInstanceL2Util().ColorMinimapFont;
- regionInfo.strDesc = huntingZoneData.strName;
- regionInfo.strTooltip = toolTipParam;
- GetMinimapRegionIconData(huntingZoneData.nRegionID, iconData);
- regionInfo.IconData = iconData;
- addMapIcon(regionInfo, true);
- if (huntingZoneID == 286)
- {
- bUse = false;
- switch(SeedMessageNum)
- {
- case 4432 :
- bUse = true;
- break;
- }
- setServerParse(MapServerInfoType.DEFENSEWARFARE, GetSystemMessage(SeedMessageNum), bUse, huntingZoneData.nWorldLoc, huntingZoneData.nRegionID, SeedMessageNum);
- }
- }
- }
- DelayRequestSeedInfo = 0;
- }
- function HandleZoneTitle()
- {
- local int nZoneID;
- nZoneID = GetCurrentZoneID();
- if( IsHideMinimapZone(nZoneID) )
- {
- if(me.IsShowWindow() && !IsBuilderPC())
- {
- me.HideWindow();
- if (bMiniMapDisabled )
- AddSystemMessage(2205);
- else
- AddSystemMessage(2207);
- }
- bMiniMapDisabled = false;
- }
- else
- {
- if (bMiniMapDisabled == false)
- {
- AddSystemMessage(2206);
- }
- bMiniMapDisabled = true;
- }
- if (IsHideMinimapZone_new(nZoneID) )
- {
- if(me.IsShowWindow() && !IsBuilderPC() )
- {
- me.HideWindow();
- if (bMiniMapDisabled )
- AddSystemMessage(2205);
- else
- AddSystemMessage(2207);
- }
- bMiniMapDisabled = false;
- }
- else
- {
- if (bMiniMapDisabled == false)
- {
- AddSystemMessage(2206);
- }
- bMiniMapDisabled = true;
- }
- }
- function HandleDungeonMapRefresh(string Param)
- {
- local int Index;
- ParseInt(Param, "Index", Index);
- if (Index == 8888)
- {
- if (me.IsShowWindow())
- {
- me.HideWindow();
- me.ShowWindow();
- }
- }
- }
- function FilterDungeonMap()
- {
- local Vector MyPosition;
- MyPosition = GetPlayerPosition();
- if (MyPosition.x > BlockedLoc1.x && MyPosition.x < BlockedLoc2.x && MyPosition.y > BlockedLoc1.y && MyPosition.y < BlockedLoc2.y)
- {
- if (!IsBuilderPC() )
- {
- class'UIAPI_MINIMAPCTRL'.static.RequestReduceBtn("MinimapWnd.Minimap");
- ReduceButton.HideWindow();
- }
- }
- }
- function OnShow()
- {
- GetInIBool ( "MinimapWnd", "l", isNoShowMissionWindow, "windowsInfo.ini");
- AdjustMapToPlayerPosition( true );
- class'AudioAPI'.static.PlaySound( "interfacesound.Interface.map_open_01" );
- if(isNoShowMissionWindow > 0) m_MinimapMissionWnd.HideWindow();
- else m_MinimapMissionWnd.ShowWindow();
- SetCurrentLocation();
- HandleZoneTitle();
- ContinentLoc();
- mapRefresh();
- setDirIconDest();
- }
- function mapRefresh()
- {
- local UserInfo pUserInfo;
- showMapIconElement();
- MinimapMissionWndScript.refresh();
- RequestAllCastleInfo();
- RequestAllFortressInfo();
- if(!getInstanceUIData().getIsClassicServer())
- {
- Class'MiniMapAPI'.static.RequestSeedPhase();
- Class'MiniMapAPI'.static.RequestShowAgitSiegeInfo();
- GetPlayerInfo(pUserInfo);
- RequestUserFactionInfo(EFactionRequsetType.FIRT_NONE, pUserInfo.nID);
- Class'MiniMapAPI'.static.RequestRaidServerinfo();
- class'MiniMapAPI'.static.RequestCursedWeaponLocation();
- class'MiniMapAPI'.static.RequestItemAuctionStatus();
- RequestInzoneWaitingTime(false);
- }
- }
- function addMapIcon(MinimapRegionInfo regionInfo, optional bool bUpdate)
- {
- if(!isVectorZeroXYZ(regionInfo.IconData.nWorldLocX, regionInfo.IconData.nWorldLocX, regionInfo.IconData.nWorldLocZ))
- {
- if (bUpdate)
- {
- m_MiniMap.UpdateRegionInfoCtrl(regionInfo);
- switch(regionInfo.eType)
- {
- case EMinimapRegionType.MRT_HuntingZone_Base :
- case EMinimapRegionType.MRT_Castle :
- case EMinimapRegionType.MRT_Fortress :
- case EMinimapRegionType.MRT_Agit :
- TeleportBookMarkWnd_MiniMap.UpdateRegionInfoCtrl(regionInfo);
- break;
- }
- }
- else
- {
- m_MiniMap.AddRegionInfoCtrl(regionInfo);
- switch(regionInfo.eType)
- {
- case EMinimapRegionType.MRT_HuntingZone_Base :
- case EMinimapRegionType.MRT_Castle :
- case EMinimapRegionType.MRT_Fortress :
- case EMinimapRegionType.MRT_Agit :
- TeleportBookMarkWnd_MiniMap.AddRegionInfoCtrl(regionInfo);
- break;
- }
- }
- }
- }
- function showMapIconElement()
- {
- local HuntingZoneUIData huntingZoneData;
- local MinimapRegionIconData iconData;
- local MinimapRegionInfo regionInfo;
- local int i;
- local string toolTipParam;
- local RaidUIData raidData;
- local array<int> raidDataKeyList;
- class'UIDATA_RAID'.static.GetRaidDataKeyList(raidDataKeyList);
- if(bCompleteBaseElementShow)
- {
- m_MiniMap.EraseRegionInfoByType(EMinimapRegionType.MRT_InstantZone);
- m_MiniMap.EraseRegionInfoByType(EMinimapRegionType.MRT_HuntingZone_Mission);
- m_MiniMap.EraseRegionInfoByType(EMinimapRegionType.MRT_Raid);
- for (i = 0; i < 500; i++)
- {
- if(class'UIDATA_HUNTINGZONE'.static.IsValidData(i) == false) continue;
- class'UIDATA_HUNTINGZONE'.static.GetHuntingZoneData(i, huntingZoneData);
- if(huntingZoneData.nType == HuntingZoneType.FIELD_HUNTING_ZONE_SOLO ||
- huntingZoneData.nType == HuntingZoneType.FIELD_HUNTING_ZONE_PARTY ||
- huntingZoneData.nType == HuntingZoneType.FIELD_HUNTING_ZONE_PARTYWITH_SOLO)
- {
- drawMinimapRegionInfo(EMinimapRegionType.MRT_HuntingZone_Mission, i, true);
- }
- if(huntingZoneData.nType == HuntingZoneType.INSTANCE_ZONE_SOLO ||
- huntingZoneData.nType == HuntingZoneType.INSTANCE_ZONE_PARTY)
- {
- drawMinimapRegionInfo(EMinimapRegionType.MRT_InstantZone, i, true);
- }
- }
- for(i = 0; i < raidDataKeyList.Length; i++)
- {
- raidData = getRaidDataByIndex(raidDataKeyList[i]);
- if(raidData.nWorldLoc.x == 0 && raidData.nWorldLoc.y == 0 && raidData.nWorldLoc.z == 0) continue;
- drawMinimapRegionInfo(EMinimapRegionType.MRT_Raid,raidDataKeyList[i],false);
- }
- }
- else
- {
- for (i = 0; i < 500; i++)
- {
- if(class'UIDATA_HUNTINGZONE'.static.IsValidData(i) == false) continue;
- class'UIDATA_HUNTINGZONE'.static.GetHuntingZoneData(i, huntingZoneData);
- if(huntingZoneData.nType == HuntingZoneType.FIELD_HUNTING_ZONE_SOLO ||
- huntingZoneData.nType == HuntingZoneType.FIELD_HUNTING_ZONE_PARTY ||
- huntingZoneData.nType == HuntingZoneType.FIELD_HUNTING_ZONE_PARTYWITH_SOLO)
- {
- drawMinimapRegionInfo(EMinimapRegionType.MRT_HuntingZone_Mission, i);
- }
- else if(huntingZoneData.nType == HuntingZoneType.INSTANCE_ZONE_SOLO ||
- huntingZoneData.nType == HuntingZoneType.INSTANCE_ZONE_PARTY)
- {
- drawMinimapRegionInfo(EMinimapRegionType.MRT_InstantZone, i, true);
- }
- if (huntingZoneData.nRegionID > 0)
- {
- if (huntingZoneData.nType == HuntingZoneType.CASTLE)
- {
- regionInfo.eType = EMinimapRegionType.MRT_Castle;
- }
- else if (huntingZoneData.nType == HuntingZoneType.AGIT)
- {
- regionInfo.eType = EMinimapRegionType.MRT_Agit;
- }
- else if (huntingZoneData.nType == HuntingZoneType.FORTRESS)
- {
- regionInfo.eType = EMinimapRegionType.MRT_Fortress;
- }
- else
- {
- if (huntingZoneData.nType == HuntingZoneType.FIELD_HUNTING_ZONE_SOLO ||
- huntingZoneData.nType == HuntingZoneType.FIELD_HUNTING_ZONE_PARTY ||
- huntingZoneData.nType == HuntingZoneType.FIELD_HUNTING_ZONE_PARTYWITH_SOLO)
- {
- if (huntingZoneData.nRegionID <= 0) continue;
- }
- regionInfo.eType = EMinimapRegionType.MRT_HuntingZone_Base;
- }
- toolTipParam = "";
- ParamAdd(toolTipParam, "Type", String(regionInfo.eType));
- ParamAdd(toolTipParam, "Index", String(i));
- regionInfo.nIndex = huntingZoneData.nRegionID;
- regionInfo.DescColor = getInstanceL2Util().ColorMinimapFont;
- regionInfo.strDesc = huntingZoneData.strName;
- regionInfo.strTooltip = toolTipParam;
- GetMinimapRegionIconData(huntingZoneData.nRegionID, iconData);
- regionInfo.IconData = iconData;
- addMapIcon(regionInfo);
- }
- }
- for(i = 0; i < raidDataKeyList.Length; i++)
- {
- raidData = getRaidDataByIndex(raidDataKeyList[i]);
- if(raidData.nWorldLoc.x == 0 && raidData.nWorldLoc.y == 0 && raidData.nWorldLoc.z == 0) continue;
- drawMinimapRegionInfo(EMinimapRegionType.MRT_Raid,raidDataKeyList[i],false);
- }
- drawFactionMapIcon();
- }
- bCompleteBaseElementShow = true;
- }
- function setDirIconDest()
- {
- local vector playerPos, questLoc;
- local string questTooltipStr;
- playerPos = GetPlayerPosition();
- m_MiniMap.SetDirIconDest( EMinimapTargetIcon.TARGET_ME, playerPos, GetSystemString(887) );
- questLoc = QuestTreeWnd(GetScript("QuestTreeWnd")).getCurrentQuestDirectTargetPos();
- questTooltipStr = QuestTreeWnd(GetScript("QuestTreeWnd")).getCurrentQuestDirectTargetString();
- if (questTooltipStr != "")
- {
- m_MiniMap.SetDirIconDest( EMinimapTargetIcon.TARGET_QUEST, questLoc, questTooltipStr);
- }
- }
- function ContinentLoc()
- {
- local Vector MyPosition;
- MyPosition = GetPlayerPosition();
- if (m_MiniMap.GetContinent(MyPosition) == 1)
- {
- SetContinent(1);
- m_MapSelectTab.SetTopOrder(0, true);
- }
- else if (m_MiniMap.GetContinent(MyPosition) == 0)
- {
- SetContinent(0);
- m_MapSelectTab.SetTopOrder(1, true);
- }
- }
- function SetCurrentLocation()
- {
- local string ZoneName;
- ZoneName=GetCurrentZoneName();
- class'UIAPI_TEXTBOX'.static.SetText("Minimapwnd.txtVarCurLoc", ZoneName);
- }
- function OnHide()
- {
- if( m_MinimapMissionWnd.IsShowWindow() )
- {
- m_MinimapMissionWnd.HideWindow();
- }
- class'AudioAPI'.static.PlaySound( "interfacesound.Interface.map_close_01" );
- initServerInfoArray();
- initServerButton();
- Me.KillTimer( TIMER_ID );
- m_MiniMap.EraseRegionInfoCtrl(EMinimapRegionType.MRT_Etc, OTHER_HIGHLIGHT_ICON_INDEX) ;
- }
- function HandlePartyMemberChanged( String a_Param )
- {
- ParseInt( a_Param, "PartyMemberCount", m_PartyMemberCount );
- }
- function bool IsExpandState()
- {
- local int w, h;
- GetWindowHandle(m_WindowName).GetWindowSize(w, h);
- if (w >= 800) return true;
- return false;
- }
- function HandleShowMinimap( String a_Param )
- {
- if(IsShowWindow("MinimapWnd"))
- {
- HideWindow("MinimapWnd");
- }
- else
- {
- ShowWindowWithFocus("MinimapWnd");
- }
- }
- function HandleMinimapAddTarget( String a_Param )
- {
- local Vector Loc;
- if( ParseFloat( a_Param, "X", Loc.x )
- && ParseFloat( a_Param, "Y", Loc.y )
- && ParseFloat( a_Param, "Z", Loc.z ) )
- {
- class'UIAPI_MINIMAPCTRL'.static.AddTarget( "MinimapWnd.Minimap", Loc );
- class'UIAPI_MINIMAPCTRL'.static.AdjustMapView( "MinimapWnd.Minimap", Loc, false, false);
- }
- }
- function HandleMinimapDeleteTarget( String a_Param )
- {
- local Vector Loc;
- local int LocX;
- local int LocY;
- local int LocZ;
- if( ParseInt( a_Param, "X", LocX )
- && ParseInt( a_Param, "Y", LocY )
- && ParseInt( a_Param, "Z", LocZ ) )
- {
- Loc.x = float(LocX);
- Loc.y = float(LocY);
- Loc.z = float(LocZ);
- class'UIAPI_MINIMAPCTRL'.static.DeleteTarget( "MinimapWnd.Minimap", Loc );
- }
- }
- function HandleMinimapDeleteAllTarget()
- {
- class'UIAPI_MINIMAPCTRL'.static.DeleteAllTarget( "MinimapWnd.Minimap" );
- }
- function HandleMinimapShowQuest()
- {
- class'UIAPI_MINIMAPCTRL'.static.SetShowQuest( "MinimapWnd.Minimap", true );
- }
- function HandleMinimapHideQuest()
- {
- class'UIAPI_MINIMAPCTRL'.static.SetShowQuest( "MinimapWnd.Minimap", false );
- }
- function OnComboBoxItemSelected( string sName, int index )
- {
- switch (sName)
- {
- case "FloorComboBox":
- select_floor(index);
- break;
- }
- }
- function select_floor(int index)
- {
- local int tmpNum;
- local string WndName;
- local string ComboBoxName;
- WndName = currentWndName();
- ComboBoxName = WndName$".FloorComboBox";
- tmpNum=index+1;
- class'UIAPI_MINIMAPCTRL'.static.ShowCertainLayer(WndName$".Minimap",tmpNum);
- class'UIAPI_COMBOBOX'.static.SetSelectedNum( ComboBoxName, index);
- }
- function OnClickButton( String a_ButtonID )
- {
- switch( a_ButtonID )
- {
- case "MyLocButton":
- OnClickMyLocButton();
- break;
- case "PartyLocButton":
- OnClickPartyLocButton();
- break;
- case "OpenGuideWnd":
- if( m_MinimapMissionWnd.IsShowWindow() )
- {
- isNoShowMissionWindow = 1;
- SetInIBool ( "MinimapWnd", "l", numToBool(isNoShowMissionWindow), "windowsInfo.ini");
- m_MinimapMissionWnd.HideWindow();
- }
- else
- {
- isNoShowMissionWindow = 0;
- SetInIBool ( "MinimapWnd", "l", numToBool(isNoShowMissionWindow), "windowsInfo.ini");
- m_MinimapMissionWnd.ShowWindow();
- m_MinimapMissionWnd.SetFocus();
- }
- break;
- case "btnReduce" :
- OnClickReduceButton();
- break;
- case "MapSelectTab1":
- if (IsExpandState()) setMapSize(true);
- SetContinent(0);
- InitializeLocation();
- class'UIAPI_MINIMAPCTRL'.static.DeleteAllCursedWeaponIcon("MinimapWnd.Minimap");
- if(isActiveCursedWeapon()) class'MiniMapAPI'.static.RequestCursedWeaponLocation();
- setDirIconDest();
- break;
- case "MapSelectTab0":
- if ( getInstanceUIData().getisClassicServer() ) return;
- if (IsExpandState()) setMapSize(true);
- SetContinent(1);
- class'UIAPI_MINIMAPCTRL'.static.DeleteAllCursedWeaponIcon("MinimapWnd.Minimap");
- if(isActiveCursedWeapon()) class'MiniMapAPI'.static.RequestCursedWeaponLocation();
- InitializeLocation();
- setDirIconDest();
- break;
- case "ExpandButton" :
- expandMapSize();
- break;
- case "ServerInfo01_Button" :
- case "ServerInfo02_Button" :
- case "ServerInfo03_Button" :
- case "ServerInfo04_Button" :
- clickServerInfoButton(a_ButtonID);
- break;
- }
- }
- function bool isSameContinent()
- {
- return (m_MiniMap.GetContinent( GetPlayerPosition() ) == m_CurContinent);
- }
- function expandMapSize(optional bool bForceExpandSize)
- {
- local int gWidth, gHeight;
- me.GetWindowSize(gWidth, gHeight);
- Debug("bIsTownMap" @ bIsTownMap);
- Debug("nTownMapZoneID" @ nTownMapZoneID);
- Debug("GetCurrentZoneID()" @ GetCurrentZoneID());
- if(800 <= gWidth)
- {
- setMapSize(false);
- GetButtonHandle(m_WindowName $ ".ExpandButton").SetButtonName(1474);
- if(m_MiniMap.GetContinent( GetPlayerPosition() ) == m_CurContinent)
- {
- if (!bIsTownMap)
- {
- AdjustMapToPlayerPosition( bIsTownMap );
- }
- else
- {
- if(nTownMapZoneID == GetCurrentZoneID() || nTownMapZoneID == 0) AdjustMapToPlayerPosition( bIsTownMap );
- }
- }
- }
- else
- {
- smallMapRect = Me.GetRect();
- setMapSize(true);
- GetButtonHandle(m_WindowName $ ".ExpandButton").SetButtonName(2734);
- if(m_MiniMap.GetContinent( GetPlayerPosition() ) == m_CurContinent)
- {
- if (!bIsTownMap)
- {
- AdjustMapToPlayerPosition( bIsTownMap );
- }
- else
- {
- if(nTownMapZoneID == GetCurrentZoneID() || nTownMapZoneID == 0) AdjustMapToPlayerPosition( bIsTownMap );
- }
- }
- }
- }
- function setMapSize(bool bBigSize)
- {
- local int wSum, hSum, moveX, moveY;
- local Rect rect;
- if(bBigSize)
- {
- rect = me.GetRect();
- wSum = 377 + getExtendMapSize() - 800;
- if (getInstanceUIData().getScreenHeight() >= 1024)
- hSum = 1024;
- else
- hSum = getInstanceUIData().getScreenHeight();
- me.SetWindowSize(getExtendMapSize(), hSum);
- m_MiniMap.SetWindowSize(411 + wSum, hSum - 95);
- GetTextureHandle(m_WindowName $ ".texShadowBottom").SetWindowSize(411 + wSum, 43);
- GetTextureHandle(m_WindowName $ ".TexMapStroke").SetWindowSize(413 + wSum, hSum - 93);
- GetTextureHandle(m_WindowName $ ".TexMapStrokeGrow").SetWindowSize(413 + wSum, hSum - 93);
- GetTextureHandle(m_WindowName $ ".texShadowTop").SetWindowSize(411 + wSum, 43);
- GetTextureHandle(m_WindowName $ ".TabBg").SetWindowSize(424 + wSum, hSum - 59);
- if ( getInstanceUIData().getisClassicServer() )
- {
- TabBg_Line.SetWindowSize( 318 + wSum + 86 , 23);
- TabBg_Line.SetAnchor( m_WindowName, "TopLeft", "TopLeft", 101 , 31);
- }
- else
- {
- TabBg_Line.SetWindowSize( 140 + wSum + 86, 23);
- TabBg_Line.SetAnchor( m_WindowName, "TopLeft", "TopLeft", 193 , 31);
- }
- moveX = rect.nX;
- moveY = 1;
- if(rect.nX + getExtendMapSize() > getInstanceUIData().getScreenWidth())
- moveX = getInstanceUIData().getScreenWidth() - getExtendMapSize();
- me.MoveTo(moveX, moveY);
- }
- else
- {
- me.MoveTo(smallMapRect.nX, smallMapRect.nY);
- me.SetWindowSize(423, 508);
- m_MiniMap.SetWindowSize(411, 413);
- GetTextureHandle(m_WindowName $ ".texShadowBottom").SetWindowSize(411, 43);
- GetTextureHandle(m_WindowName $ ".TexMapStroke").SetWindowSize(413, 415);
- GetTextureHandle(m_WindowName $ ".TexMapStrokeGrow").SetWindowSize(413, 415);
- GetTextureHandle(m_WindowName $ ".TabBg").SetWindowSize(424, 447);
- if ( getInstanceUIData().getisClassicServer() )
- {
- TabBg_Line.SetWindowSize( 318 + 86 , 23);
- TabBg_Line.SetAnchor( m_WindowName, "TopLeft", "TopLeft", 101 , 31);
- }
- else
- {
- TabBg_Line.SetWindowSize( 140 + 86, 23);
- TabBg_Line.SetAnchor( m_WindowName, "TopLeft", "TopLeft", 193 , 31);
- }
- }
- if (m_MinimapMissionWnd.IsShowWindow()) m_MinimapMissionWnd.SetFocus();
- }
- function int getExtendMapSize()
- {
- local int nSize;
- if ( getInstanceUIData().getisClassicServer() )
- {
- nSize = 1024;
- }
- else
- {
- if(m_MapSelectTab.GetTopIndex() == 0)
- {
- nSize = 834;
- }
- else
- {
- nSize = 1024;
- }
- }
- return nSize;
- }
- function OnClickReduceButton()
- {
- Debug("OnClickReduceButton");
- class'UIAPI_MINIMAPCTRL'.static.RequestReduceBtn("MinimapWnd.Minimap");
- HideWindow("MinimapWnd.btnReduce");
- HandleZoneTitle();
- }
- function OnClickTargetButton()
- {
- if( GetQuestLocation(QuestLocation ) )
- {
- SetLocContinent(QuestLocation);
- class'UIAPI_MINIMAPCTRL'.static.AdjustMapView( "MinimapWnd.Minimap", QuestLocation, false );
- if( QuestLocation.x ==19714 && QuestLocation.y == 243420 && QuestLocation.z == -205)
- {
- OnClickReduceButton();
- }
- else if (QuestLocation.x ==8800 && QuestLocation.y == 251652 && QuestLocation.z == -2032 )
- {
- OnClickReduceButton();
- }
- else if (QuestLocation.x ==27491 && QuestLocation.y == 247340 && QuestLocation.z == -3256 )
- {
- OnClickReduceButton();
- }
- }
- }
- function OnClickMyLocButton()
- {
- AdjustMapToPlayerPosition( true );
- }
- function AdjustMapToPlayerPosition( bool a_ZoomToTownMap )
- {
- local Vector PlayerPosition;
- PlayerPosition = GetPlayerPosition();
- SetLocContinent(PlayerPosition);
- class'UIAPI_MINIMAPCTRL'.static.AdjustMapView( "MinimapWnd.Minimap", PlayerPosition, a_ZoomToTownMap );
- }
- function OnClickPartyLocButton()
- {
- local Vector PartyMemberLocation;
- m_PartyMemberCount = GetPartyMemberCount();
- if( 0 == m_PartyMemberCount )
- return;
- m_PartyLocIndex = ( m_PartyLocIndex + 1 ) % m_PartyMemberCount;
- if( GetPartyMemberLocation( m_PartyLocIndex, PartyMemberLocation ) )
- {
- SetLocContinent(PartyMemberLocation);
- class'UIAPI_MINIMAPCTRL'.static.AdjustMapView( "MinimapWnd.Minimap", PartyMemberLocation, false );
- }
- }
- function HandleCursedWeaponLoctaion( string param )
- {
- local int num;
- local int itemID;
- local int itemID1;
- local int itemID2;
- local int isowndedo;
- local int isownded1;
- local int isownded2;
- local int x;
- local int y;
- local int z;
- local int i;
- local Vector CursedWeaponLoc1;
- local Vector CursedWeaponLoc2;
- local string cursedName;
- local string cursedName1;
- local string cursedName2;
- local Vector cursedWeaponLocation;
- local bool combined;
- ParseInt( param, "NUM", num );
- if(num == 0)
- {
- class'UIAPI_MINIMAPCTRL'.static.DeleteAllCursedWeaponIcon( "MinimapWnd.Minimap");
- return;
- }
- else
- {
- for(i=0; i < num; i++)
- {
- ParseInt( param, "ID" $ i, itemID );
- ParseString( param, "NAME" $ i, cursedName );
- ParseInt( param, "ISOWNED" $ i, isowndedo );
- ParseInt( param, "X" $ i, x );
- ParseInt( param, "Y" $ i, y );
- ParseInt( param, "Z" $ i, z );
- cursedWeaponLocation.x = x;
- cursedWeaponLocation.y = y;
- cursedWeaponLocation.z = z;
- Normal(cursedWeaponLocation);
- if( itemID == 8190 )
- {
- itemID1 = itemID;
- cursedName1 = cursedName;
- isownded1 = isowndedo;
- CursedWeaponLoc1.x = cursedWeaponLocation.x;
- CursedWeaponLoc1.y = cursedWeaponLocation.y;
- CursedWeaponLoc1.z = cursedWeaponLocation.z;
- Normal(CursedWeaponLoc1);
- }
- else
- {
- itemID2 = itemID;
- cursedName2 = cursedName;
- isownded2 = isowndedo;
- CursedWeaponLoc2.x = cursedWeaponLocation.x;
- CursedWeaponLoc2.y = cursedWeaponLocation.y;
- CursedWeaponLoc2.z = cursedWeaponLocation.z;
- Normal(CursedWeaponLoc2);
- }
- }
- }
- if(num == 1)
- {
- if( itemID == 8190 )
- {
- DrawCursedWeapon("MinimapWnd.Minimap", itemID1, cursedName1, CursedWeaponLoc1, isownded1==0 , true);
- setServerParse(MapServerInfoType.CURSEDWEAPON_MAGICAL, "", true, CursedWeaponLoc1);
- }
- else
- {
- DrawCursedWeapon("MinimapWnd.Minimap", itemID2, cursedName2, CursedWeaponLoc2, isownded2==0 , true);
- setServerParse(MapServerInfoType.CURSEDWEAPON_BLOOD, "", true, CursedWeaponLoc2);
- }
- }
- else if(num == 2)
- {
- combined = class'UIAPI_MINIMAPCTRL'.static.IsOverlapped("MinimapWnd.Minimap", CursedWeaponLoc1.x, CursedWeaponLoc1.y, CursedWeaponLoc2.x, CursedWeaponLoc2.y);
- if(combined)
- {
- class'UIAPI_MINIMAPCTRL'.static.DrawGridIcon( "MinimapWnd.Minimap","L2UI_CH3.MiniMap.cursedmapicon00","L2UI_CH3.MiniMap.cursedmapicon00", cursedWeaponLoc1,true, 0, -12, cursedName1$"\\n"$cursedName2);
- }
- else
- {
- DrawCursedWeapon("MinimapWnd.Minimap", itemID1, cursedName1, CursedWeaponLoc1, isownded1==0 , true);
- DrawCursedWeapon("MinimapWnd.Minimap", itemID2, cursedName2, CursedWeaponLoc2, isownded2==0 , false);
- }
- setServerParse(MapServerInfoType.CURSEDWEAPON_MAGICAL, "", true, CursedWeaponLoc1);
- setServerParse(MapServerInfoType.CURSEDWEAPON_BLOOD, "", true, CursedWeaponLoc2);
- }
- }
- function DrawCursedWeapon(string WindowName, int itemID, string cursedName, Vector vecLoc, bool bDropped, bool bRefresh)
- {
- local string itemIconName;
- if(itemID == 8190)
- {
- ItemIconName = "L2UI_CH3.MiniMap.cursedmapicon01";
- }
- else if(itemID == 8689)
- {
- ItemIconName ="L2UI_CH3.MiniMap.cursedmapicon02";
- }
- if(bDropped) ItemIconName = ItemIconName$"_drop";
- class'UIAPI_MINIMAPCTRL'.static.DrawGridIcon(WindowName, ItemIconName, "L2UI_CH3.MiniMap.cursedmapicon00", vecLoc, bRefresh, 0, -12, cursedName);
- }
- function HandleUpdateGameTime(string a_Param)
- {
- local int GameHour;
- local int GameMinute;
- local string GameTimeString;
- ParseInt(a_Param, "GameHour", GameHour);
- ParseInt(a_Param, "GameMinute", GameMinute);
- GameTimeString = "";
- if ( me.IsShowWindow() )
- {
- DelayRequestSeedInfo ++;
- if ( DelayRequestSeedInfo == 60 )
- {
- Class'MiniMapAPI'.static.RequestSeedPhase();
- }
- }
- SelectSunOrMoon(GameHour);
- if ( GameHour == 0 ) GameHour = 12;
- GameTimeString = GameTimeString $ string(GameHour) $ " : ";
- if(GameMinute<10)
- GameTimeString = GameTimeString $ "0" $ string(GameMinute);
- else
- GameTimeString = GameTimeString $ string(GameMinute);
- class'UIAPI_TEXTBOX'.static.SetText("MinimapWnd.txtGameTime", GameTimeString);
- }
- function HandleMinimapTravel( String a_Param )
- {
- local int TravelX;
- local int TravelY;
- if( !ParseInt( a_Param, "TravelX", TravelX ) )
- return;
- if( !ParseInt( a_Param, "TravelY", TravelY ) )
- return;
- ExecuteCommand( "
- }
- function SelectSunOrMoon(int GameHour)
- {
- if ( GameHour >= 6 && GameHour <= 24 )
- {
- ShowWindow("MinimapWnd.texSun");
- HideWindow("MinimapWnd.texMoon");
- }
- else
- {
- ShowWindow("MinimapWnd.texMoon");
- HideWindow("MinimapWnd.texSun");
- }
- }
- function InitializeLocationByContinent()
- {
- local Vector Location;
- if (m_CurContinent == 0)
- {
- Location.x = -86916;
- Location.y = 222183;
- Location.z = -4656;
- }
- else if (m_CurContinent == 1)
- {
- Location.x = -181823;
- Location.y = 224580;
- Location.z = -4104;
- }
- m_MiniMap.adjustMapView(Location, false);
- }
- function InitializeLocation()
- {
- local Vector MyPosition;
- MyPosition = GetPlayerPosition();
- if ( m_MiniMap.GetContinent( MyPosition ) == m_CurContinent )
- {
- m_MiniMap.adjustMapView(MyPosition, true);
- }
- else InitializeLocationByContinent();
- }
- function checkClassicForm()
- {
- if ( getInstanceUIData().getisClassicServer() )
- {
- m_MapSelectTab.SetTopOrder(0, false);
- m_MapSelectTab.SetButtonDisableTexture(1, "L2UI_ct1.Misc_DF_Blank");
- m_MapSelectTab.SetButtonName(0, GetSystemString(1769));
- m_MapSelectTab.SetDisable(1, true);
- m_MapSelectTab.SetButtonName(1, "");
- TabBg_Line.SetWindowSize( 318 + 86, 23);
- TabBg_Line.SetAnchor( m_WindowName, "TopLeft", "TopLeft", 101 , 31);
- }
- else
- {
- m_MapSelectTab.SetButtonName(0, GetSystemString(1768));
- m_MapSelectTab.SetButtonName(1, getSystemString (1769));
- m_MapSelectTab.SetDisable(1, false);
- TabBg_Line.SetWindowSize( 140 + 86 , 23);
- TabBg_Line.SetAnchor( m_WindowName, "TopLeft", "TopLeft", 193 , 31);
- }
- }
- function SetContinent(int continent)
- {
- m_CurContinent = continent;
- m_MiniMap.SetContinent(m_CurContinent);
- if (m_CurContinent == 1)
- m_MapSelectTab.SetTopOrder(0, true);
- else if(m_CurContinent == 0)
- m_MapSelectTab.SetTopOrder(1, true);
- if (IsExpandState()) setMapSize(true);
- }
- function SetLocContinent(vector loc)
- {
- m_CurContinent = m_MiniMap.GetContinent(loc);
- SetContinent(m_CurContinent);
- }
- function showAllRegionIcon(bool bShow)
- {
- m_MiniMap.SetShowRegionInfoByType(EMinimapRegionType.MRT_Castle, bShow);
- m_MiniMap.SetShowRegionInfoByType(EMinimapRegionType.MRT_Fortress, bShow);
- m_MiniMap.SetShowRegionInfoByType(EMinimapRegionType.MRT_Agit, bShow);
- m_MiniMap.SetShowRegionInfoByType(EMinimapRegionType.MRT_HuntingZone_Base, bShow);
- m_MiniMap.SetShowRegionInfoByType(EMinimapRegionType.MRT_Etc, bShow);
- if(bShow && MinimapMissionWndScript.isShowHuntingZone())
- m_MiniMap.SetShowRegionInfoByType(EMinimapRegionType.MRT_HuntingZone_Mission, true);
- else
- m_MiniMap.SetShowRegionInfoByType(EMinimapRegionType.MRT_HuntingZone_Mission, false);
- if(MinimapMissionWndScript.isShowInzone())
- m_MiniMap.SetShowRegionInfoByType(EMinimapRegionType.MRT_InstantZone, true);
- else
- m_MiniMap.SetShowRegionInfoByType(EMinimapRegionType.MRT_InstantZone, false);
- if(bShow && MinimapMissionWndScript.isShowRaid())
- m_MiniMap.SetShowRegionInfoByType(EMinimapRegionType.MRT_Raid, true);
- else
- m_MiniMap.SetShowRegionInfoByType(EMinimapRegionType.MRT_Raid, false);
- }
- function showRegionIcon(int nRegionType, bool bShow)
- {
- if (nRegionType == EMinimapRegionType.MRT_Castle)
- m_MiniMap.SetShowRegionInfoByType(EMinimapRegionType.MRT_Castle, bShow);
- else if (nRegionType == EMinimapRegionType.MRT_Fortress)
- m_MiniMap.SetShowRegionInfoByType(EMinimapRegionType.MRT_Fortress, bShow);
- else if (nRegionType == EMinimapRegionType.MRT_Agit)
- m_MiniMap.SetShowRegionInfoByType(EMinimapRegionType.MRT_Agit, bShow);
- else if (nRegionType == EMinimapRegionType.MRT_HuntingZone_Base)
- m_MiniMap.SetShowRegionInfoByType(EMinimapRegionType.MRT_HuntingZone_Base, bShow);
- else if (nRegionType == EMinimapRegionType.MRT_Etc)
- m_MiniMap.SetShowRegionInfoByType(EMinimapRegionType.MRT_Etc, bShow);
- else if (nRegionType == EMinimapRegionType.MRT_HuntingZone_Mission)
- {
- m_MiniMap.SetShowRegionInfoByType(EMinimapRegionType.MRT_HuntingZone_Mission, bShow);
- Debug("SetShowRegionInfoByType.MRT_HuntingZone_Mission ->" @ bShow);
- }
- else if (nRegionType == EMinimapRegionType.MRT_InstantZone)
- {
- m_MiniMap.SetShowRegionInfoByType(EMinimapRegionType.MRT_InstantZone, bShow);
- Debug("SetShowRegionInfoByType.MRT_InstantZone ->" @ bShow);
- }
- else if (nRegionType == EMinimapRegionType.MRT_Raid)
- {
- m_MiniMap.SetShowRegionInfoByType(EMinimapRegionType.MRT_Raid, bShow);
- Debug("SetShowRegionInfoByType.MRT_Raid ->" @ bShow);
- }
- }
- function initServerButton()
- {
- ServerInfo01_Button.HideWindow();
- ServerInfo02_Button.HideWindow();
- ServerInfo03_Button.HideWindow();
- ServerInfo04_Button.HideWindow();
- GetTextureHandle(m_WindowName $ ".texShadowTop").HideWindow();
- }
- function initServerInfoArray()
- {
- local Vector loc;
- serverInfoArray.Remove(0, serverInfoArray.Length);
- serverInfoArray[serverInfoArray.Length] = setServerInfoButton(false, "L2UI_CT1.Minimap.map_siege_i00", "L2UI_CT1.Minimap.map_siege_i00_Down", "L2UI_CT1.Minimap.map_siege_i00_Over",
- MapServerInfoType.SIEGEWARFARE, GetSystemString(3534), "", loc);
- serverInfoArray[serverInfoArray.Length] = setServerInfoButton(false, "L2UI_CT1.Minimap.map_siege_demension_i00", "L2UI_CT1.Minimap.map_siege_demension_i00_Down", "L2UI_CT1.Minimap.map_siege_demension_i00_Over",
- MapServerInfoType.SIEGEWARFARE_DIMENSION, GetSystemString(3535), GetSystemMessage(4), loc);
- serverInfoArray[serverInfoArray.Length] = setServerInfoButton(false, "L2UI_CT1.Minimap.map_raid_demension_i00", "L2UI_CT1.Minimap.map_raid_demension_i00_Down", "L2UI_CT1.Minimap.map_raid_demension_i00_Over",
- MapServerInfoType.RAID_DIMENSION, GetSystemString(3536), GetSystemMessage(6), loc);
- serverInfoArray[serverInfoArray.Length] = setServerInfoButton(false, "L2UI_CT1.Minimap.map_cursed_weapon_i01", "L2UI_CT1.Minimap.map_cursed_weapon_i01_Down", "L2UI_CT1.Minimap.map_cursed_weapon_i01_Over",
- MapServerInfoType.CURSEDWEAPON_MAGICAL, MakeFullSystemMsg(GetSystemMessage(4437), GetSystemString(1464)), "", loc);
- serverInfoArray[serverInfoArray.Length] = setServerInfoButton(false, "L2UI_CT1.Minimap.map_cursed_weapon_i00", "L2UI_CT1.Minimap.map_cursed_weapon_i00_Down", "L2UI_CT1.Minimap.map_cursed_weapon_i00_Over",
- MapServerInfoType.CURSEDWEAPON_BLOOD, MakeFullSystemMsg(GetSystemMessage(4437), GetSystemString(1499)), "", loc);
- serverInfoArray[serverInfoArray.Length] = setServerInfoButton(false, "L2UI_CT1.Minimap.map_auction_i00", "L2UI_CT1.Minimap.map_auction_i00_Down", "L2UI_CT1.Minimap.map_auction_i00_Over",
- MapServerInfoType.AUCTION, GetSystemString(3538), "", loc);
- serverInfoArray[serverInfoArray.Length] = setServerInfoButton(false, "L2UI_CT1.Minimap.map_siege_kserth_i00", "L2UI_CT1.Minimap.map_siege_kserth_i00_Down", "L2UI_CT1.Minimap.map_siege_kserth_i00_Over",
- MapServerInfoType.DEFENSEWARFARE, GetSystemString(3540), "", loc);
- }
- function MapServerInfo setServerInfoButton(bool bUse, string normalTex, string pushedTex, string highlightTex, int nServerInfoType,
- string toolTipString, string buttonName, Vector clickedLoc)
- {
- local MapServerInfo severInfo;
- severInfo.bUse = bUse;
- severInfo.normalTex = normalTex;
- severInfo.pushedTex = pushedTex;
- severInfo.highlightTex = highlightTex;
- severInfo.nServerInfoType = nServerInfoType;
- severInfo.toolTipString = toolTipString;
- severInfo.buttonName = buttonName;
- severInfo.clickedLocClickCount = 0;
- return severInfo;
- }
- function setServerButton(ButtonHandle serverButton, int nServerInfoType, MapServerInfo mServerInfo)
- {
- if(mServerInfo.bUse)
- {
- serverButton.ShowWindow();
- serverButton.SetTexture(mServerInfo.normalTex, mServerInfo.pushedTex, mServerInfo.highlightTex);
- serverButton.SetTooltipCustomType(MakeTooltipSimpleText(mServerInfo.toolTipString));
- serverInfoArray[nServerInfoType].buttonName = serverButton.GetWindowName();
- }
- }
- function bool isActiveCursedWeapon()
- {
- local int i;
- for (i = 0; i < serverInfoArray.Length; i++)
- {
- if (serverInfoArray[i].nServerInfoType == MapServerInfoType.CURSEDWEAPON_MAGICAL ||
- serverInfoArray[i].nServerInfoType == MapServerInfoType.CURSEDWEAPON_BLOOD)
- {
- if(serverInfoArray[i].bUse)
- {
- Debug("-> ¸¶°Ë Ç÷°ËÀÌ È°¼ºÈ µÇ¾î ÀÖÀ½");
- return true;
- }
- }
- }
- return false;
- }
- function int getServerNData(int serverInfoType)
- {
- local int i;
- for (i = 0; i < serverInfoArray.Length; i++)
- {
- if (serverInfoArray[i].nServerInfoType == serverInfoType)
- {
- return serverInfoArray[i].nData;
- }
- }
- return 0;
- }
- function clickServerInfoButton(string clickButtonName)
- {
- local int i, n, clickCount, addIconX, addIconY;
- local MinimapRegionIconData iconData, emptyIconData;
- for (i = 0; i < serverInfoArray.Length; i++)
- {
- if(serverInfoArray[i].buttonName == clickButtonName)
- {
- Debug("¹öư ´©¸§ (¼¹ö ¹öư) , ¼¹öŸÀÔÀº?:" @ serverInfoArray[i].nServerInfoType @ ", click Array :" @ serverInfoArray[i].clickedLocArray.Length );
- Debug("nRegionID" @ serverInfoArray[i].nRegionID);
- if(serverInfoArray[i].clickedLocArray.Length > 0)
- {
- clickCount = serverInfoArray[i].clickedLocClickCount;
- iconData = emptyIconData;
- addIconX = 0;
- addIconY = 0;
- Debug("serverInfoArray[i].clickedLoc.x " @ serverInfoArray[i].clickedLocArray[clickCount].x);
- Debug("serverInfoArray[i].clickedLoc.y " @ serverInfoArray[i].clickedLocArray[clickCount].y);
- Debug("serverInfoArray[i].clickedLoc.z " @ serverInfoArray[i].clickedLocArray[clickCount].z);
- if (serverInfoArray[i].clickedLocArray[clickCount].x != 0 ||
- serverInfoArray[i].clickedLocArray[clickCount].y != 0 ||
- serverInfoArray[i].clickedLocArray[clickCount].z != 0)
- {
- if (serverInfoArray[i].nRegionID > 0)
- {
- GetMinimapRegionIconData(serverInfoArray[i].nRegionID, iconData);
- }
- if (serverInfoArray[i].nServerInfoType == MapServerInfoType.CURSEDWEAPON_MAGICAL ||
- serverInfoArray[i].nServerInfoType == MapServerInfoType.CURSEDWEAPON_BLOOD)
- {
- Debug("--> ¸¶°Ë Ç÷°Ë ¼¹ö ¹öưÀ¸·Î °»½Å");
- class'UIAPI_MINIMAPCTRL'.static.DeleteAllCursedWeaponIcon("MinimapWnd.Minimap");
- class'MiniMapAPI'.static.RequestCursedWeaponLocation();
- SetLocContinent(serverInfoArray[i].clickedLocArray[clickCount]);
- }
- else
- {
- SetLocContinent(serverInfoArray[i].clickedLocArray[clickCount]);
- mapIconHighlight(serverInfoArray[i].clickedLocArray[clickCount], iconData, addIconX, addIconY);
- }
- OnClickReduceButton();
- class'UIAPI_MINIMAPCTRL'.static.AdjustMapView( "MinimapWnd.Minimap", serverInfoArray[i].clickedLocArray[clickCount], false);
- }
- else
- {
- AddSystemMessage(4431);
- }
- if (serverInfoArray[i].clickedLocArray.Length > serverInfoArray[i].clickedLocClickCount + 1)
- serverInfoArray[i].clickedLocClickCount++;
- else
- serverInfoArray[i].clickedLocClickCount = 0;
- }
- break;
- }
- }
- }
- function refreshServerInfoButton()
- {
- local int i;
- local bool bUse;
- initServerButton();
- for (i = 0; i < serverInfoArray.Length; i++)
- {
- setServerButton(getServerInfoButton(), i, serverInfoArray[i]);
- if (serverInfoArray[i].bUse) bUse = true;
- }
- if (bUse) GetTextureHandle(m_WindowName $ ".texShadowTop").ShowWindow();
- else GetTextureHandle(m_WindowName $ ".texShadowTop").HideWindow();
- }
- function ButtonHandle getServerInfoButton()
- {
- if (!ServerInfo01_Button.IsShowWindow()) return ServerInfo01_Button;
- if (!ServerInfo02_Button.IsShowWindow()) return ServerInfo02_Button;
- if (!ServerInfo03_Button.IsShowWindow()) return ServerInfo03_Button;
- if (!ServerInfo04_Button.IsShowWindow()) return ServerInfo04_Button;
- Debug("MAP ¼¹ö ¹öưÀÌ °¡µæ á½À´Ï´Ù. 4¹ø ¹öư¿¡ ´þ¾î ¾¹´Ï´Ù.");
- return ServerInfo04_Button;
- }
- function setServerParse(int serverInfoType, string param, bool bUse, optional Vector clickedLoc, optional int nRegionID, optional int nData)
- {
- if (serverInfoType == MapServerInfoType.SIEGEWARFARE)
- {
- if (bUse)
- {
- serverInfoArray[serverInfoType].bUse = true;
- if(serverInfoArray[serverInfoType].szReserved == "")
- serverInfoArray[serverInfoType].szReserved = param;
- else
- serverInfoArray[serverInfoType].szReserved = serverInfoArray[serverInfoType].szReserved $ "," $ param;
- serverInfoArray[serverInfoType].toolTipString = GetSystemString(3534) $ " : " $ serverInfoArray[serverInfoType].szReserved;
- if (nRegionID > 0) serverInfoArray[serverInfoType].nRegionID = nRegionID;
- serverInfoArray[serverInfoType].clickedLocArray[serverInfoArray[serverInfoType].clickedLocArray.Length] = clickedLoc;
- }
- }
- else if (serverInfoType == MapServerInfoType.SIEGEWARFARE_DIMENSION)
- {
- serverInfoArray[serverInfoType].bUse = bUse;
- if (bUse)
- {
- serverInfoArray[serverInfoType].clickedLocArray[0] = setVector(147461, 8000, -592);
- serverInfoArray[serverInfoType].clickedLocArray[1] = setVector(14659, -49230, -160);
- }
- }
- else if (serverInfoType == MapServerInfoType.RAID_DIMENSION)
- {
- serverInfoArray[serverInfoType].bUse = bUse;
- serverInfoArray[serverInfoType].clickedLocArray[0] = setVector(116503, 75392, -2712);
- }
- else if (serverInfoType == MapServerInfoType.CURSEDWEAPON_MAGICAL)
- {
- serverInfoArray[serverInfoType].bUse = bUse;
- serverInfoArray[serverInfoType].clickedLocArray[0] = clickedLoc;
- }
- else if (serverInfoType == MapServerInfoType.CURSEDWEAPON_BLOOD)
- {
- serverInfoArray[serverInfoType].bUse = bUse;
- serverInfoArray[serverInfoType].clickedLocArray[0] = clickedLoc;
- }
- else if (serverInfoType == MapServerInfoType.AUCTION)
- {
- serverInfoArray[serverInfoType].bUse = bUse;
- serverInfoArray[serverInfoType].clickedLocArray[0] = clickedLoc;
- }
- else if (serverInfoType == MapServerInfoType.DEFENSEWARFARE)
- {
- serverInfoArray[serverInfoType].bUse = bUse;
- serverInfoArray[serverInfoType].clickedLocArray[0] = setVector(-184750, 240723, 1568);
- serverInfoArray[serverInfoType].nData = nData;
- }
- refreshServerInfoButton();
- }
- function drawMinimapRegionInfo(EMinimapRegionType nMinimapRegionType, int i, optional bool bActive, optional bool bUseUpdate)
- {
- local HuntingZoneUIData huntingZoneData;
- local MinimapRegionInfo regionInfoForMapIcon;
- local string toolTipParam;
- local bool bEnableLevel;
- local UserInfo pUserInfo;
- local MinimapRegionIconData iconData;
- local RaidUIData raidData;
- class'UIDATA_HUNTINGZONE'.static.GetHuntingZoneData(i, huntingZoneData);
- GetPlayerInfo ( pUserInfo );
- regionInfoForMapIcon.eType = nMinimapRegionType;
- regionInfoForMapIcon.nIndex = i;
- regionInfoForMapIcon.strDesc = "";
- toolTipParam = "";
- if(nMinimapRegionType == EMinimapRegionType.MRT_HuntingZone_Mission)
- {
- bEnableLevel = tryLevelCheck(pUserInfo.nLevel, huntingZoneData.nMinLevel, huntingZoneData.nMaxLevel);
- if (bEnableLevel)
- {
- ParamAdd(toolTipParam, "Type", String(nMinimapRegionType));
- ParamAdd(toolTipParam, "Index", String(i));
- iconData = makeMapIcon(nMinimapRegionType, bEnableLevel, huntingZoneData.nWorldLoc);
- regionInfoForMapIcon.IconData = iconData;
- regionInfoForMapIcon.strTooltip = toolTipParam;
- addMapIcon(regionInfoForMapIcon, bUseUpdate);
- }
- }
- else if(nMinimapRegionType == EMinimapRegionType.MRT_InstantZone)
- {
- bEnableLevel = tryLevelCheck(pUserInfo.nLevel, huntingZoneData.nMinLevel, huntingZoneData.nMaxLevel);
- if (bEnableLevel)
- {
- ParamAdd(toolTipParam, "Type", String(nMinimapRegionType));
- ParamAdd(toolTipParam, "Index", String(i));
- ParamAdd(toolTipParam, "Active", String(boolToNum(bActive)));
- iconData = makeMapIcon(nMinimapRegionType, bActive, huntingZoneData.nWorldLoc);
- regionInfoForMapIcon.IconData = iconData;
- regionInfoForMapIcon.strTooltip = toolTipParam;
- addMapIcon(regionInfoForMapIcon, bUseUpdate);
- }
- }
- else if(nMinimapRegionType == EMinimapRegionType.MRT_Raid)
- {
- raidData = getRaidDataByIndex(i);
- bEnableLevel = tryLevelCheck(pUserInfo.nLevel, raidData.nMinLevel, raidData.nMaxLevel);
- if (bEnableLevel)
- {
- ParamAdd(toolTipParam, "Type", String(nMinimapRegionType));
- ParamAdd(toolTipParam, "Index", String(i));
- ParamAdd(toolTipParam, "active", String(boolToNum(bActive)));
- iconData = makeMapIcon(nMinimapRegionType, bActive, raidData.nWorldLoc);
- regionInfoForMapIcon.IconData = iconData;
- regionInfoForMapIcon.strTooltip = toolTipParam;
- addMapIcon(regionInfoForMapIcon, bUseUpdate);
- }
- }
- }
- function MinimapRegionIconData makeMapIcon(int iconType, bool bActive, Vector pLoc)
- {
- local MinimapRegionIconData iconData;
- local HuntingZoneUIData huntingZoneData;
- iconData.nWidth = 32;
- iconData.nHeight = 32;
- iconData.nWorldLocX = pLoc.x;
- iconData.nWorldLocY = pLoc.y;
- iconData.nWorldLocZ = pLoc.z;
- iconData.nIconOffsetX = -16;
- iconData.nIconOffsetY = -16;
- if (iconType == EMinimapRegionType.MRT_HuntingZone_Mission)
- {
- if (bActive)
- {
- iconData.strIconNormal = "L2UI_CT1.Minimap.map_huntingzone_i00";
- iconData.strIconOver = "L2UI_CT1.Minimap.map_huntingzone_i00_Over";
- iconData.strIconPushed = "L2UI_CT1.Minimap.map_huntingzone_i00";
- }
- else
- {
- iconData.strIconNormal = "L2UI_CT1.Minimap.map_huntingzoneInactive_i00";
- iconData.strIconOver = "L2UI_CT1.Minimap.map_huntingzoneInactive_i00_Over";
- iconData.strIconPushed = "L2UI_CT1.Minimap.map_huntingzoneInactive_i00";
- }
- }
- else if (iconType == EMinimapRegionType.MRT_InstantZone)
- {
- if (bActive)
- {
- iconData.strIconNormal = "L2UI_CT1.Minimap.map_inzone_gate_i00";
- iconData.strIconOver = "L2UI_CT1.Minimap.map_inzone_gate_i00_Over";
- iconData.strIconPushed = "L2UI_CT1.Minimap.map_inzone_gate_i00";
- }
- else
- {
- iconData.strIconNormal = "L2UI_CT1.Minimap.map_inzone_gateInactive_i00";
- iconData.strIconOver = "L2UI_CT1.Minimap.map_inzone_gateInactive_i00_Over";
- iconData.strIconPushed = "L2UI_CT1.Minimap.map_inzone_gateInactive_i00";
- }
- }
- else if (iconType == EMinimapRegionType.MRT_Raid)
- {
- if (bActive)
- {
- iconData.strIconNormal = "L2UI_CT1.Minimap.map_raid_spawning_i00";
- iconData.strIconOver = "L2UI_CT1.Minimap.map_raid_spawning_i00_Over";
- iconData.strIconPushed = "L2UI_CT1.Minimap.map_raid_spawning_i00";
- }
- else
- {
- iconData.strIconNormal = "L2UI_CT1.Minimap.map_raid_respawn_i00";
- iconData.strIconOver = "L2UI_CT1.Minimap.map_raid_respawn_i00_Over";
- iconData.strIconPushed = "L2UI_CT1.Minimap.map_raid_respawn_i00";
- }
- }
- return iconData;
- }
- function MinimapRegionInfo makeFocusMapIcon( Vector pLoc, optional bool bEmpty )
- {
- local MinimapRegionInfo regionInfoForMapIcon;
- local MinimapRegionIconData iconData;
- regionInfoForMapIcon.eType = EMinimapRegionType.MRT_Etc;
- regionInfoForMapIcon.nIndex = OTHER_HIGHLIGHT_ICON_INDEX;
- iconData.nWidth = 64;
- iconData.nHeight = 64;
- iconData.nWorldLocX = pLoc.x;
- iconData.nWorldLocY = pLoc.y;
- iconData.nWorldLocZ = pLoc.z;
- iconData.bIgnoreMouseInput = true;
- if(bEmpty)
- {
- iconData.strIconNormal = "L2UI_CT1.EmptyBtn";
- iconData.strIconOver = "L2UI_CT1.EmptyBtn";
- iconData.strIconPushed = "L2UI_CT1.EmptyBtn";
- }
- else
- {
- iconData.strIconNormal = "L2UI_CT1.Minimap.map_SelectAni01";
- iconData.strIconOver = "L2UI_CT1.Minimap.map_SelectAni01";
- iconData.strIconPushed = "L2UI_CT1.Minimap.map_SelectAni01";
- }
- regionInfoForMapIcon.iconData = IconData ;
- return regionInfoForMapIcon ;
- }
- function mapIconHighlight(Vector loc, optional MinimapRegionIconData iconData, optional int addIconPosX, optional int addIconPosY)
- {
- local MinimapRegionInfo regionInfoForMapIcon;
- m_MiniMap.EraseRegionInfoCtrl(EMinimapRegionType.MRT_Etc, OTHER_HIGHLIGHT_ICON_INDEX) ;
- regionInfoForMapIcon = makeFocusMapIcon (loc);
- regionInfoForMapIcon.IconData.nIconOffsetX = -32 + (iconData.nWidth / 2) + addIconPosX;
- regionInfoForMapIcon.IconData.nIconOffsetY = -32 + (iconData.nHeight / 2) + addIconPosY;
- m_MiniMap.AddRegionInfoCtrl(regionInfoForMapIcon);
- Me.KillTimer( TIMER_ID );
- Me.SetTimer(TIMER_ID, TIMER_DELAY);
- }
- function OnTimer(int TimerID)
- {
- if(TimerID == TIMER_ID)
- {
- m_MiniMap.EraseRegionInfoCtrl(EMinimapRegionType.MRT_Etc, OTHER_HIGHLIGHT_ICON_INDEX) ;
- Me.KillTimer( TIMER_ID );
- }
- }
- function bool IsHideMinimapZone(int nZoneID)
- {
- switch(nZoneID)
- {
- case 453:
- case 454:
- case 455:
- case 456:
- case 457:
- case 458:
- return true;
- default:
- return false;
- }
- }
- function bool IsHideMinimapZone_new(int nZoneID)
- {
- switch(nZoneID)
- {
- case 453:
- case 454:
- case 455:
- case 456:
- case 457:
- case 458:
- return true;
- default:
- return false;
- }
- }
- /**
- * À©µµ¿ì ESC Ű·Î ´Ý±â ó¸®
- * "Esc" Key
- ***/
- function OnReceivedCloseUI()
- {
- PlayConsoleSound(IFST_WINDOW_CLOSE);
- GetWindowHandle( m_WindowName ).HideWindow();
- }
- defaultproperties
- {
- m_WindowName="MinimapWnd"
- }
Advertisement
Add Comment
Please, Sign In to add comment