源战役客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

438 lines
14 KiB

require("game.common.GoodsTooltips")
require("game.common.NiceGoodsTips")
require("game.common.EquipToolTips")
require("game.common.EquipToolTipsAttr")--属性item
require("game.common.EquipToolTipsBaseAttr")--基础属性item
require("game.common.EquipToolTipsZhuoYueAttr")--高级属性item
require("game.common.EquipToolTipsSuitAttr")--套装属性item
require("game.common.EquipToolTipsGemstoneAttr")--宝石属性item
require("game.common.EquipToolTipsDraconicAttr")--刻印属性item
require("game.common.EquipToolTipsSkillAttr")--技能属性item
require("game.common.EquipIdentifyTips")
require("game.common.EquipStoneItem")
require("game.common.EquipCompareTips")
require("game.common.CommonTips")
require("game.common.GoodsTreasureTips")
require("game.common.EquipShowTips")
require("game.common.SkillToolTips")
require("game.common.GoodsUseToolTips")
require("game.common.BeastToolTips")
require("game.common.BeastShowTips")
require("game.common.BeastCompareTips")
require("game.common.DesignToolTips")
require("game.common.SealToolTips")
require("game.common.SealToolDecomItem")
require("game.common.SealCompareTips")
require("game.common.SealShowTips")
require("game.common.SealProTips")
require("game.common.MarriageToolTips")
require("game.common.RewardLookView")
require("game.common.GetGoodsTips")
require("game.common.GetGoodsItem")
require("game.common.DsgtToolTip")
require("game.common.LuckyProbToolTips")
require("game.common.LuckyProbItem")
require("game.common.UISimpleToolTips")
require("game.common.WingInfoTips")
require("game.common.HorseEquipInfoTips")
require("game.common.DeityEquipTips")
require("game.common.HorseEquipCompareTips")
require("game.common.GetGoodsJumpTips")
require("game.common.GetPicTips")
require("game.common.GetPicItem")
require("game.common.ComposeShowTips")
require("game.common.CommonInstructionView")
require("game.common.CommonInstructionItem")
require("game.common.GiftPreviewView")
require("game.common.GiftPreviewItem")
require("game.common.goodsTooltipsAttrItem")
require("game.common.GoodsTooltipsTextItem")
require("game.common.PsionicToolTips")--圣物装备展示tips
require("game.common.PsionicToolTipsItem")--圣物装备展示tips描述节点
require("game.common.PsionicToolTipsCompare")--圣物装备展示对比tips界面
UIToolTipMgr = UIToolTipMgr or BaseClass(BaseController)
function UIToolTipMgr:__init()
UIToolTipMgr.Instance = self
self.GoodsTooltips = nil
end
function UIToolTipMgr:getInstance()
if UIToolTipMgr.Instance == nil then
UIToolTipMgr.New()
end
return UIToolTipMgr.Instance
end
--物品tips
--[[
not_show_getway 获得途径的按钮以及内容是否显示
open_show_get_way 有些需求需要开界面就显示获得途径
hide_base_con 展示获取途径的时候不显示基础信息(进阶装备使用,其他的暂未添加)
--]]
function UIToolTipMgr:AppendGoodsTips(type_id, x, y, goods_vo, show_btn_list, parm_list, not_show_getway,open_show_get_way,force_open_show_get_way,hide_base_con)
local goods_basic = GoodsModel:getInstance():GetGoodsBasicByTypeId(type_id)
print("HWR:UIToolTipMgr [58]type_id: ",type_id)
if goods_vo then
local kind = GiftModel:getInstance():checkGiftKind(goods_vo.type_id)
if kind == 1 or kind == 2 or kind == 3 or kind == 4 then --普通礼包
GiftModel:getInstance():requestGetGiftUseTimes(goods_vo.type_id)
end
end
-------------------------
-- 进阶装备
if FosterModel:GetInstance():GetEquipConf( type_id ) then
FosterModel:GetInstance():ShowEquipComTip( type_id, open_show_get_way,hide_base_con )
return
end
-------------------------
-- local need_show_nice = true
-- if parm_list and parm_list.not_nice_tip then
-- need_show_nice = false
-- end
-- if (goods_basic.type == GoodsModel.TYPE.FASHION or goods_basic.type == GoodsModel.TYPE.DESIGNATION or (goods_basic.type == GoodsModel.TYPE.CHILDTOY and goods_basic.subtype == 4)) and need_show_nice then
-- if self.NiceGoodsTips == nil then
-- self.NiceGoodsTips = NiceGoodsTips.New()
-- end
-- self.NiceGoodsTips:Open(type_id, x, y, goods_vo, show_btn_list, parm_list)
-- else
if self.GoodsTooltips == nil then
self.GoodsTooltips = GoodsTooltips.New()
end
self.GoodsTooltips:Open(type_id, x, y, goods_vo, show_btn_list, parm_list, not_show_getway,open_show_get_way,force_open_show_get_way)
--end
end
-- 关闭当前打开的goodstips 有需要的后续补充
function UIToolTipMgr:CloseGoodsTips()
if self.NiceGoodsTips then
self.NiceGoodsTips:Close()
end
if self.GoodsTooltips then
self.GoodsTooltips:Close()
end
end
--装备tips
--show_btn_list:自定义需要显示的按钮 使用方法: show_btn_list = {"Button1","Button2",...}
function UIToolTipMgr:AppendEquipTips(type_id, x, y, goods_vo,role_id,hide_btn,show_btn_list,key_value, extra_data, open_show_get_way,color_power_lv)
if not type_id then
print("没有传物品ID哦!!!!!!")
return
end
local equip_cfg = EquipModel:GetEquipmentCfg(type_id)
if not equip_cfg or not equip_cfg.equip_type then
print("没有装备配置哦"..type_id)
return
end
if self.EquipToolTips == nil then
self.EquipToolTips = EquipToolTips.New(equip_cfg.equip_type)
end
local equip_data = {--重新构造一份
type_id = type_id,
x = x,
y = y,
goods_vo = goods_vo,
role_id = role_id,
hide_btn = hide_btn,
show_btn_list = show_btn_list,
key_value = key_value,
open_show_get_way = open_show_get_way,
color_power_lv = color_power_lv,
}
if key_value == "shop_buy" then
equip_data.shop_data = extra_data
elseif key_value == "market_bag" then
equip_data.market_data = extra_data
elseif key_value == "rank_equip" then
equip_data.have_career = extra_data
end
if self.EquipToolTips and self.EquipToolTips:HasOpen() then
else
self.EquipToolTips:Open(equip_data)
end
end
function UIToolTipMgr:AppendSkillTips(skill_id,skill_lv,x,y,conditionStr,is_rasto,is_mount,activeStr)
if self.SkillToolTips == nil then
self.SkillToolTips = SkillToolTips.New()
end
self.SkillToolTips:Open(skill_id, skill_lv, x, y,conditionStr,is_rasto,is_mount,activeStr)
end
--称号tips
function UIToolTipMgr:AppendDesignTips(design_id,x,y,conditionStr)
if self.DesignToolTips == nil then
self.DesignToolTips = DesignToolTips.New()
end
self.DesignToolTips:Open(design_id, x, y,conditionStr)
end
-- 显示物品使用情况的tips
function UIToolTipMgr:AppendGoodsUseInfoTips(goods_id,max_times,attr,use_times,x,y,module_id, combat)
if self.GoodsUseToolTips == nil then
self.GoodsUseToolTips = GoodsUseToolTips.New()
end
self.GoodsUseToolTips:Open(goods_id,max_times,attr,use_times,x,y,module_id, combat)
end
--装备鉴定tips
function UIToolTipMgr:AppendEquipIdentifyTips(type_id, x, y, goods_vo)
if self.EquipIdentifyTips == nil then
self.EquipIdentifyTips = EquipIdentifyTips.New()
end
self.EquipIdentifyTips:Open(type_id, x, y, goods_vo)
end
--通用Tips
function UIToolTipMgr:AppendCommonTips(goods_id , x , y , main_type)
if self.CommonTips == nil then
self.CommonTips = CommonTips.New()
end
self.CommonTips:Open(goods_id , x , y , main_type)
end
--显示装备信息tips
function UIToolTipMgr:AppendEquipShowTips(goods_vo, x, y, type, callback)
if self.EquipShowTips == nil then
self.EquipShowTips = EquipShowTips.New()
end
self.EquipShowTips:Open(goods_vo, x, y, type, callback)
end
--翅膀装备tips
function UIToolTipMgr:AppendWingTips(type_id, x, y, type, off_callback, replace_callback)
if self.WingInfoTips == nil then
self.WingInfoTips = WingInfoTips.New()
end
self.WingInfoTips:Open(type_id, x, y, type, off_callback, replace_callback)
end
--幻兽装备tips
function UIToolTipMgr:AppendBeastTips(type_id, x, y, goods_vo, hide_btn)
if self.BeastToolTips == nil then
self.BeastToolTips = BeastToolTips.New()
end
self.BeastToolTips:Open(type_id, x, y, goods_vo, hide_btn)
end
--显示幻兽装备信息tips
function UIToolTipMgr:AppendBeastShowTips(goods_vo, x, y, type)
if self.BeastShowTips == nil then
self.BeastShowTips = BeastShowTips.New()
end
self.BeastShowTips:Open(goods_vo, x, y, type)
end
--圣印装备tips
--show_btn_list:自定义需要显示的按钮 使用方法: show_btn_list = {"Button1","Button2",...}
function UIToolTipMgr:AppendSealTips(type_id, x, y, goods_vo,role_id,hide_btn,show_btn_list)
if self.SealToolTips == nil then
self.SealToolTips = SealToolTips.New()
end
self.SealToolTips:Open(type_id, x, y, goods_vo,role_id,hide_btn,show_btn_list)
end
--显示圣印装备信息tips
function UIToolTipMgr:AppendSealShowTips(goods_vo, x, y, type)
if self.SealShowTips == nil then
self.SealShowTips = SealShowTips.New()
end
self.SealShowTips:Open(goods_vo, x, y, type)
end
--圣印属性加成tips
function UIToolTipMgr:AppendSealProTips(x, y)
if self.SealProTips == nil then
self.SealProTips = SealProTips.New()
end
self.SealProTips:Open(x, y)
end
--显示婚姻装备tips
function UIToolTipMgr:AppendMarriageTips(data, x, y)
if self.MarriageTips == nil then
self.MarriageTips = MarriageToolTips.New()
end
self.MarriageTips:Open(data, x, y)
end
--奖励查看tips
function UIToolTipMgr:AppendRewardLookTips(data, kind, x, y)
if self.RewardLookTips == nil then
self.RewardLookTips = RewardLookView.New()
end
self.RewardLookTips:Open(data, kind, x, y)
end
--奖励查看tips
function UIToolTipMgr:CloseRewardLookTips()
if self.RewardLookTips and self.RewardLookTips:HasOpen() then
self.RewardLookTips:Close()
end
end
--获取途径tips
function UIToolTipMgr:AppendGetGoodsTips(type_id, x, y)
if self.GetGoodsTips == nil then
self.GetGoodsTips = GetGoodsTips.New()
end
self.GetGoodsTips:Open(type_id, x, y)
end
--称号tips
function UIToolTipMgr:AppendDsgtTips(dsgt_id, x, y)
if self.dsgt_tips == nil then
self.dsgt_tips = DsgtToolTip.New()
end
if not self.dsgt_tips:HasOpen() then
self.dsgt_tips:Open(dsgt_id, x, y)
end
end
--抽奖概率展示tips
function UIToolTipMgr:AppendLuckyProbTips(module_id,sub_id,act_sub_type)--*act_sub_type活动子类型
if self.lucky_prob_tips == nil then
self.lucky_prob_tips = LuckyProbToolTips.New()
end
print("huangcong:UIToolTipMgr [start:300] :", module_id,sub_id,act_sub_type)
self.lucky_prob_tips:Open(module_id,sub_id,act_sub_type)
end
--简单文本说明tips
function UIToolTipMgr:AppendSimpleTips(desc, x, y, sx, sy)
if not desc or desc == "" then
return
end
if self.simple_tips == nil then
self.simple_tips = UISimpleToolTips.New()
end
self.simple_tips:Open(desc, x, y, sx, sy)
end
function UIToolTipMgr:AppendOptionalItemTips(x, y, goods_type, goods_list, callback, item_type, grade)
if self.optional_item_tips == nil then
self.optional_item_tips = OptionalItemTips.New()
end
self.optional_item_tips:Open(x, y, goods_type, goods_list, callback, item_type, grade)
end
--显示坐骑装备tips
function UIToolTipMgr:AppendHorseEquipInfoTips(type_id, x, y, goods_vo, type, basic_attr, attr_list, parm)
if self.HorseEquipInfoTips == nil then
self.HorseEquipInfoTips = HorseEquipInfoTips.New()
end
self.HorseEquipInfoTips:Open(type_id, x, y, goods_vo, type, basic_attr, attr_list, parm)
end
--神格装备tips
function UIToolTipMgr:AppendDeityEquipTips(type_id, x, y, goods_id,goods_vo)
if self.deity_equip_tips == nil then
self.deity_equip_tips = DeityEquipTips.New()
end
self.deity_equip_tips:Open(type_id, x, y, goods_id,goods_vo)
end
--星痕装备tips
function UIToolTipMgr:AppendStarShadowTips(type_id, goods_vo, x, y, is_from_bag, not_show_btn)
if self.StarShadowTipView == nil then
self.StarShadowTipView = StarShadowTipView.New()
end
self.StarShadowTipView:Open(type_id, goods_vo, x, y, is_from_bag, not_show_btn)
end
-- 与GetGoodsTips 差不多 但是是可以自己写想要的跳转界面的链接
function UIToolTipMgr:AppendGetGoodsJumpTips(data, x, y, type_id)
if self.GetGoodsJumpTips == nil then
self.GetGoodsJumpTips = GetGoodsJumpTips.New()
end
self.GetGoodsJumpTips:Open(data, x, y, type_id)
end
--获取图鉴途径tips
function UIToolTipMgr:AppendGetPicTips(pic_id, x, y)
if self.GetPicTips == nil then
self.GetPicTips = GetPicTips.New()
end
self.GetPicTips:Open(pic_id, x, y)
end
--合成装备信息tips
function UIToolTipMgr:AppendComposeShowTips(goods_vo, x, y, off_callback, replace_callback)
if self.ComposeShowTips == nil then
self.ComposeShowTips = ComposeShowTips.New()
end
self.ComposeShowTips:Open(goods_vo, x, y, off_callback, replace_callback)
end
function UIToolTipMgr:OpenInstructionView(index)
if self.CommonInstructionView == nil then
self.CommonInstructionView = CommonInstructionView.New()
end
self.CommonInstructionView:Open(index)
end
function UIToolTipMgr:OpenDualGemstoneTips(type_id, x, y, goods_vo)
if self.DualGemstoneTips == nil then
self.DualGemstoneTips = DualGemstoneTips.New()
end
self.DualGemstoneTips:Open(type_id, x, y, goods_vo)
end
function UIToolTipMgr:OpenGiftPreviewView(data)
if self.GiftPreviewView and self.GiftPreviewView:HasOpen() then
self.GiftPreviewView:Close()
self.GiftPreviewView = nil
end
if self.GiftPreviewView == nil then
self.GiftPreviewView = GiftPreviewView.New()
end
self.GiftPreviewView:Open(data)
end
-- 圣物装备属性展示界面
-- flag:展示时对应的目标按钮样式
function UIToolTipMgr:AppendPsionicTips(data, x, y, flag, type_id)
if not data and not type_id then
return
end
flag = flag or PsionicConst.ArmorItemFlag.Bag
if not self.PsionicToolTips then
self.PsionicToolTips = PsionicToolTips.New()
end
-- 通过装备id构造装备数据
if not data and type_id then
data = {type_id = type_id}
data = GoodsModel:getInstance():GetPsionicEquipNecessaryData(data)
end
if not self.PsionicToolTips:HasOpen() then
self.PsionicToolTips:Open(data, flag, type_id and true or nil)
end
end
--战魂tips
function UIToolTipMgr:AppendWarSoulTips(type_id, x, y, goods_vo ,role_id, hide_btn,show_btn_list, key_value, extra_data)
if not type_id then
print("没有传物品ID哦!!!!!!")
return
end
if self.WarSoulWearGoodsTipView == nil then
self.WarSoulWearGoodsTipView = WarSoulWearGoodsTipView.New()
end
local warSoul_data = {--重新构造一份
type_id = type_id,
x = x,
y = y,
goods_vo = goods_vo,
role_id = role_id,
hide_btn = hide_btn,
key_value = key_value,
}
self.WarSoulWearGoodsTipView:Open(warSoul_data)
end