254 lines
13 KiB
C#
254 lines
13 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BrewMonster.Assets.PerfectWorld.Scripts.UI
|
|
{
|
|
public class CECUIConfig : Singleton<CECUIConfig>
|
|
{
|
|
GameUI m_gameUI;
|
|
public GameUI GetGameUI()
|
|
{
|
|
return m_gameUI;
|
|
}
|
|
}
|
|
|
|
public struct RandomMapItem
|
|
{
|
|
public int itemID;
|
|
public int count;
|
|
|
|
public RandomMapItem(int itemId, int itemCount)
|
|
{
|
|
itemID = itemId;
|
|
count = itemCount;
|
|
}
|
|
}
|
|
|
|
// Wallow hint info type
|
|
public enum WallowHintType
|
|
{
|
|
WHT_DEFAULT = 0, // Default mode
|
|
WHT_KOREA = 1, // Korean mode
|
|
}
|
|
|
|
// Recommend shop item type
|
|
public enum RecommendShopItemType
|
|
{
|
|
RECOMMEND_REFINE_1, // Equipment refinement level 1
|
|
RECOMMEND_REFINE_2, // Equipment refinement level 2
|
|
RECOMMEND_REFINE_3, // Equipment refinement level 3
|
|
RECOMMEND_REFINE_4, // Equipment refinement level 4
|
|
RECOMMEND_REFINE_5, // Equipment refinement level 5
|
|
RECOMMEND_SAVE_LIFE, // Save life
|
|
RECOMMEND_ACTIVITY, // Activity reminder
|
|
}
|
|
|
|
// Game logic and UI related configuration
|
|
public struct GameUI
|
|
{
|
|
public bool bMailToFriendsSwitch; // Mail to friends
|
|
public int nMailToFriendsDaysNoLogin; // Days not logged in to trigger mail to friends
|
|
public int nMailToFriendsLevel; // Level required to use mail to friends
|
|
public int nMailToFriendsDaysSendMail; // Days interval to send mail again
|
|
|
|
public bool bActivityReminder; // Activity reminder
|
|
public int nActivityReminderLevel; // Level requirement
|
|
public int nActivityReminderMaxLevelSoFar; // Historical maximum level requirement
|
|
public int nActivityReminderLevel2; // Second level requirement
|
|
public int nActivityReminderReincarnationTimes;// Reincarnation times requirement
|
|
public int nActivityReminderRealmLevel; // Realm level requirement
|
|
public int nActivityReminderReputation; // Reputation requirement
|
|
public DateTime tActivityReminderStartTime; // Start time (local time)
|
|
public DateTime tActivityReminderEndTime; // End time (local time)
|
|
|
|
public bool bEnableTalkToGM; // Enable sending non-standard messages to GM
|
|
public bool bEnableTrashPwdRemind; // Enable trash password reminder for users
|
|
|
|
public WallowHintType nWallowHintType; // Wallow hint display type
|
|
|
|
public bool bEnableIE; // Enable IE to display web pages
|
|
public bool bEnableShowIP; // Whether to show last login information
|
|
public bool bEnableCompleteAccount; // Whether to show account completion information
|
|
public bool bEnableFortressBuildDestroy; // Whether to enable fortress build/destroy facilities
|
|
public List<int> nCountryWarBonus; // Country war bonus levels
|
|
public bool bShowNameInCountryWar; // Whether to show player names in country war
|
|
public int nCountryWarEnterLevel; // Country war entry level requirement
|
|
public int nCountryWarEnterItem; // Country war entry item id
|
|
public int nCountryWarEnterItemCount; // Country war entry item count
|
|
public bool bEnableQuickPay; // Enable quick payment
|
|
public int nEquipMarkMinInkNum; // Minimum ink number required for equipment mark modification
|
|
public bool bEnableReportPlayerSpeakToGM; // Enable reporting player speech to GM
|
|
public bool bEnableReportPluginWithFeedback; // Enable plugin reporting with feedback
|
|
public uint nGTLoginCoolDown; // Game GT account login cooldown time (in seconds)
|
|
public bool bEnableGTOnSpecialServer; // Whether to enable GT on special servers
|
|
public int nCrossServerEnterLevel; // Cross server entry level requirement
|
|
public int nCrossServerEnterLevel2; // Cross server entry level requirement 2
|
|
public bool bEnableWebTradeSort; // Enable sorting when searching for items in web trade
|
|
public bool bEnablePlayerRename; // Enable player rename
|
|
public bool bEnableCheckNewbieGift; // Enable newbie gift display
|
|
public bool bEnableQShopFilter; // Enable QShop filter display function (filtered by player level)
|
|
public bool bEnableGivingFor; // Enable QShop gift and receive function
|
|
public bool bEnableGivingForTaskLimitedItem; // Enable QShop certain task-limited items gift and receive function
|
|
public List<int> nCountryWarPlayerLimit; // Country war battle player count limit
|
|
public int nCountryWarKingMaxDomainLimit; // Country war king maximum domain limit
|
|
public int nFashionSplitCost; // Fashion split cost
|
|
public bool bEnableTouch; // Touch shop enable
|
|
public bool bEnableOptimize; // Whether to enable client optimization
|
|
public int nMemoryUsageLow; // Low memory value, system will automatically restore normal model
|
|
public int nMemoryUsageHigh; // High memory value, system will automatically reduce level model
|
|
public int nAutoSimplifySpeed; // Auto simplify speed after long time
|
|
public List<int> nTouchEnabledMap; // TOUCH shop enabled maps
|
|
public bool bEnableTWRecharge; // Shop recharge button (for Taiwan region recharge platform)
|
|
public string strTWRechargeAppID; // Taiwan recharge platform parameter AppID (developer code)
|
|
public string strTWRechargeGame; // Taiwan recharge platform parameter Game (game code)
|
|
public string strTWRechargeKey; // Taiwan recharge platform parameter Key (additional verification key)
|
|
public bool bEnableTitle; // Enable Title UI
|
|
public List<int> nAutoTeamTransmitEnabledMap; // Auto team transmit enabled map IDs
|
|
public int nChariotApplyLevel; // Chariot application level requirement
|
|
public int nChariotApplyLevel2; // Chariot application level requirement 2
|
|
public int nChariotApplyReincarnation; // Chariot application reincarnation requirement
|
|
public int nChariotReviveTimeout; // Chariot revive timeout
|
|
public int nChariotAmount; // Chariot battle chariot count
|
|
public int nHistoryQueryTimeInterval; // History query time interval
|
|
public bool bEnableAutoWiki; // Auto wiki enable
|
|
public int nExitAutoExtractWikiStateTime; // Auto wiki: exit auto extract time
|
|
public int nCloseWikiPopDlgTime; // Auto wiki: close time
|
|
public int nCloseWikiMsgInfoTime; // Auto wiki: message disappear time
|
|
public int nOpenWikiPopDlgTime; // Auto wiki: open time
|
|
public List<int> nTaskDisabledInMiniClient; // Tasks disabled in mini client
|
|
public List<int> nItemDisabledInMiniClient; // Items disabled in mini client
|
|
public List<int> nMeridianFreeItem; // Meridian free item ID list
|
|
public List<int> nMeridianNotFreeItem; // Meridian not free item ID list
|
|
public int nMonsterSpiritGatherTimesPerWeekMax;// Maximum monster spirit gather times per week
|
|
public bool bEnableAutoPolicy; // Auto policy system enable
|
|
public bool bEnablePWService; // Enable PW service page
|
|
public bool bEnableActionSwitch; // Action switch enable (attack->defense, defense->attack, auto return before using skill)
|
|
public int nCountryWarLiveShowUpdateInterval; // Country war live show data update interval
|
|
public List<int> nDefaultSystemModuleIndex; // System module default function index
|
|
public bool bEnableRecommendQShopItem; // Recommend QShop items when appropriate
|
|
public List<int> nRecommendShopItems; // Recommended shop items list
|
|
public bool bEnableRandShop; // Whether to enable random shop (in new version, old version follows original agreement, this function is disabled)
|
|
public int nPokerShopConfig; // Poker shop config table ID
|
|
public int nPokerShopLevelLimit; // Poker shop usage level requirement
|
|
public int nContributionTaskLevelLimit; // Contribution task system usage level requirement
|
|
public List<string> strFashionShopAdImage; // Fashion shop advertisement images
|
|
public bool bEnableQShopFashionShop; // QShop fashion shop enable
|
|
public bool bEnableBackShopFashionShop; // Back shop fashion shop enable
|
|
public bool bEnableCeilPriceBeforeDiscountToGold; // Shop discount item original price only shows gold, if original price can be converted to gold, show original price (except market)
|
|
public List<string> strFullScreenGfxForeground; // Full screen effect foreground effect
|
|
public List<string> strFullScreenGfxBackground; // Full screen effect background effect
|
|
public List<int> nRandomMaps; // Random maps
|
|
public List<int> nTaskIDForDisableWayPointUITips; // Task IDs that need to disable waypoint tip display when doing these tasks
|
|
public RandomMapItem DefaultRandomMapItem; // Default random map item distribution item
|
|
public Dictionary<int, RandomMapItem> SpecialRandomMapItems; // Specific random map special random map item distribution item
|
|
public int nMaxFriendRemarksNameLength; // Friend remarks name maximum length
|
|
public bool bEnableQShopFashionShopFlashSale; // QShop fashion shop flash sale enable
|
|
public bool bEnableBackShopFashionShopFlashSale; // Back shop fashion shop flash sale enable
|
|
public string strQShopFashionShopFlashSaleTitle; // QShop fashion shop flash sale button title
|
|
public string strBackShopFashionShopFlashSaleTitle; // Back shop fashion shop flash sale button title
|
|
public bool bEnablePlayerChangeGender;
|
|
|
|
public int GetCountryWarBonusLevel(int currentBonus)
|
|
{
|
|
// Get country war current bonus level, starting from level 0, return -1 if invalid
|
|
int level = -1;
|
|
while (level + 1 < nCountryWarBonus.Count && currentBonus > nCountryWarBonus[level + 1])
|
|
{
|
|
level++;
|
|
}
|
|
return level;
|
|
}
|
|
|
|
public int GetCountryWarPlayerLimit(int warType)
|
|
{
|
|
if (warType >= 0 && warType < nCountryWarPlayerLimit.Count)
|
|
{
|
|
return nCountryWarPlayerLimit[warType];
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
public bool GetCanShowTouchShop(int idInst)
|
|
{
|
|
return nTouchEnabledMap.Contains(idInst);
|
|
}
|
|
|
|
public bool IsTaskDisabledInMiniClient(int task_id)
|
|
{
|
|
return nTaskDisabledInMiniClient.Contains(task_id);
|
|
}
|
|
|
|
public bool IsItemDisabledInMiniClient(int item_id)
|
|
{
|
|
return nItemDisabledInMiniClient.Contains(item_id);
|
|
}
|
|
|
|
public bool IsMeridianFreeItem(int item_id)
|
|
{
|
|
return nMeridianFreeItem.Contains(item_id);
|
|
}
|
|
|
|
public bool IsMeridianNotFreeItem(int item_id)
|
|
{
|
|
return nMeridianNotFreeItem.Contains(item_id);
|
|
}
|
|
|
|
public bool IsRandomMap(int mapid)
|
|
{
|
|
return nRandomMaps.Contains(mapid);
|
|
}
|
|
|
|
public int GetRandomMapCount()
|
|
{
|
|
return nRandomMaps.Count;
|
|
}
|
|
|
|
public int GetRandomMapID(int idx)
|
|
{
|
|
if (idx >= 0 && idx < nRandomMaps.Count)
|
|
{
|
|
return nRandomMaps[idx];
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
public bool GetRandomMapItemInfo(int mapID, out RandomMapItem info)
|
|
{
|
|
if (SpecialRandomMapItems.TryGetValue(mapID, out info))
|
|
{
|
|
return true;
|
|
}
|
|
// If not found in special items, return false (not using default)
|
|
info = default(RandomMapItem);
|
|
return false;
|
|
}
|
|
|
|
public int GetTaskIDDisableWayPointsUITipsCount()
|
|
{
|
|
return nTaskIDForDisableWayPointUITips.Count;
|
|
}
|
|
|
|
public int GetTaskIDDisableWayPointsUITips(int idx)
|
|
{
|
|
if (idx >= 0 && idx < nTaskIDForDisableWayPointUITips.Count)
|
|
{
|
|
return nTaskIDForDisableWayPointUITips[idx];
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
public int GetRecommendShopItem(RecommendShopItemType type)
|
|
{
|
|
int index = (int)type;
|
|
if (index >= 0 && index < nRecommendShopItems.Count)
|
|
{
|
|
return nRecommendShopItems[index];
|
|
}
|
|
return 0;
|
|
}
|
|
}
|
|
}
|