源战役客户端
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.

1212 lines
34 KiB

  1. GameResPath = GameResPath or {}
  2. --返回ab包以及资源名字
  3. function GameResPath.GetModelShadowRes(obj_type, obj_id)
  4. if tonumber(obj_id) == 0 then
  5. return
  6. end
  7. local abName = ModelPartName[5] .. obj_id
  8. return abName, abName --模型资源单独打包
  9. end
  10. --返回ab包以及资源名字
  11. function GameResPath.GetModelClotheRes(obj_type, obj_id, load_dynamic_bone, is_right)
  12. if not obj_id or tonumber(obj_id) == 0 then
  13. print("==========GameResPath.GetModelClotheRes=>obj_id:",obj_id)
  14. return
  15. end
  16. local abName, abResId = "", obj_id
  17. if obj_type == SceneBaseType.Pet or obj_type == SceneBaseType.Horse or
  18. obj_type == SceneBaseType.FGun or obj_type == SceneBaseType.FCloud or
  19. obj_type == SceneBaseType.FArmour or obj_type == SceneBaseType.FWing or
  20. obj_type == SceneBaseType.FPearl or obj_type == SceneBaseType.FWeapon or
  21. obj_type == SceneBaseType.Baby_Horse then
  22. --进阶系统部分
  23. if obj_type == SceneBaseType.FWeapon then
  24. --武器要区分职业,左右手
  25. abResId = GameResPath:GetFWeaponResName( nil,obj_id )
  26. abName = ModelPartName[obj_type]..abResId
  27. local resName = ModelPartName[obj_type] .. (is_right and "r" or "l") .. "_" ..abResId
  28. return abName, resName
  29. else
  30. abName = ModelPartName[obj_type]
  31. end
  32. elseif obj_type == SceneBaseType.Pokemon--宠物
  33. or obj_type == SceneBaseType.Evil--守护
  34. or obj_type == SceneBaseType.Equip--装备
  35. or obj_type == SceneBaseType.Baby --宝宝子女
  36. or obj_type == SceneBaseType.Galaxy--星辰
  37. or obj_type == SceneBaseType.God----神座
  38. or obj_type == SceneBaseType.WarSoul--战魂
  39. or obj_type == SceneBaseType.MapModel--世界地图
  40. then
  41. abName = ModelPartName[obj_type]
  42. elseif obj_type == SceneBaseType.OtherGoods then--其他模型
  43. abName = ""
  44. else
  45. abName = ModelPartName[1]
  46. end
  47. --动态骨骼模型,主角、AI娘
  48. if load_dynamic_bone then
  49. if (obj_type == SceneBaseType.MainRole and IsDynamicModel[obj_id])
  50. or (obj_type == SceneBaseType.Role and IsDynamicModel[obj_id])
  51. or (obj_type == SceneBaseType.Pet and IsDynamicServantModel[obj_id]) then
  52. abName = abName.."dynamic_"
  53. end
  54. end
  55. abName = abName..abResId
  56. return abName, abName --模型资源单独打包
  57. end
  58. --进阶武器的资源名
  59. function GameResPath:GetFWeaponResName( career,obj_id )
  60. if (RoleManager.Instance and RoleManager.Instance.mainRoleInfo) and (not career) then
  61. career = RoleManager.Instance.mainRoleInfo.career
  62. end
  63. career = career or 1
  64. return obj_id + career*1000
  65. end
  66. --返回家具ab包以及资源名字
  67. function GameResPath.GetModelFurnitureRes(obj_id, is_god_wing)
  68. if not obj_id or tonumber(obj_id) == 0 then
  69. print("==========GameResPath.GetModelClotheRes=>obj_id:",obj_id)
  70. return
  71. end
  72. local abName = ModelPartName[8] .. obj_id
  73. return abName, abName --模型资源单独打包
  74. end
  75. --返回ab包和头饰资源名字
  76. function GameResPath.GetHeadRes(obj_type, obj_id)
  77. if tonumber(obj_id) == 0 then
  78. return
  79. end
  80. local abName = ModelPartName[6] .. obj_id
  81. return abName, abName --模型资源单独打包
  82. end
  83. --返回ab包和发饰资源名字
  84. function GameResPath.GetHatRes(obj_id)
  85. if tonumber(obj_id) == 0 then
  86. return
  87. end
  88. local abName = ModelPartName[27] .. obj_id
  89. return abName, abName --模型资源单独打包
  90. end
  91. function GameResPath.GetGodWeaponRes(obj_type,weapon_id)
  92. if tonumber(obj_id) == 0 then
  93. return
  94. end
  95. local abName = ModelPartName[1] .. obj_id
  96. return abName, abName --模型资源单独打包
  97. end
  98. --返回ab包以及武器挂接点名字列表和武器资源名字列表
  99. function GameResPath.GetWeaponRes(obj_type,weapon_id,career)
  100. local abName = "model_weapon_" .. weapon_id--ModelABName[obj_type]
  101. local weapon_type = WeaponProvideType.SingleRightHand
  102. if career then
  103. weapon_type = WeaponCountInfo.role[career]
  104. end
  105. if weapon_type then
  106. local weapon_attach_list = {}
  107. local weapon_res_list = {}
  108. if weapon_type == WeaponProvideType.SingleLeftHand then
  109. table.insert(weapon_attach_list,AttachNode.LHand)
  110. table.insert(weapon_res_list, ModelPartName[2] .. weapon_id)
  111. elseif weapon_type == WeaponProvideType.SingleRightHand then
  112. table.insert(weapon_attach_list,AttachNode.RHand)
  113. table.insert(weapon_res_list, ModelPartName[3] .. weapon_id)
  114. elseif weapon_type == WeaponProvideType.BehindHand then
  115. table.insert(weapon_attach_list,AttachNode.BHand)
  116. table.insert(weapon_res_list, ModelPartName[4] .. weapon_id)
  117. elseif weapon_type == WeaponProvideType.BothHand then
  118. table.insert(weapon_attach_list,AttachNode.LHand)
  119. table.insert(weapon_attach_list,AttachNode.RHand)
  120. table.insert(weapon_res_list, ModelPartName[2] .. weapon_id)
  121. table.insert(weapon_res_list, ModelPartName[3] .. weapon_id)
  122. elseif weapon_type == WeaponProvideType.ThirdHand then
  123. table.insert(weapon_attach_list,AttachNode.LHand)
  124. table.insert(weapon_attach_list,AttachNode.RHand)
  125. table.insert(weapon_attach_list,AttachNode.BHand)
  126. table.insert(weapon_res_list, ModelPartName[2] .. weapon_id)
  127. table.insert(weapon_res_list, ModelPartName[3] .. weapon_id)
  128. table.insert(weapon_res_list, ModelPartName[4] .. weapon_id)
  129. end
  130. return abName, weapon_attach_list,weapon_res_list
  131. end
  132. end
  133. function GameResPath.GetGoodsIcon(icon)
  134. return "client/assets/icon/goodsIcon/" .. icon .. ".png"
  135. end
  136. function GameResPath.GetModelMask(icon)
  137. return "client/assets/icon/modelMask/" .. icon .. ".png"
  138. end
  139. function GameResPath.GetCircleHeadIcon(icon)
  140. return "client/assets/icon/roleHead/head/head_circle_" .. icon .. ".png"
  141. end
  142. function GameResPath.GetRhombusRoleHeadIcon(icon)
  143. return "client/assets/icon/roleHead/head_rhombus/head_icon_" .. icon .. ".png"
  144. end
  145. function GameResPath.GetHeadIcon(photo_id)
  146. return "client/assets/icon/roleHead/head_icon/head_icon_" .. photo_id .. ".png"
  147. end
  148. function GameResPath.GetMonsterHeadIcon(icon)
  149. --texture = texture or 0
  150. return "client/assets/icon/MonsterIcon/icon_" .. icon .. ".png"
  151. end
  152. function GameResPath.GetMountIcon(icon)
  153. return "client/assets/icon/mount/" .. icon .. ".png"
  154. end
  155. function GameResPath.GetPetIcon(icon)
  156. return "client/assets/icon/pet/" .. icon .. ".png"
  157. end
  158. function GameResPath.GetPetHeadIcon(icon)
  159. return "client/assets/icon/pet/roleHead/" .. icon .. ".png"
  160. end
  161. function GameResPath.GetBeastHeadIcon(icon)
  162. return "client/assets/icon/MonsterIcon/beast_" .. icon .. ".png"
  163. end
  164. function GameResPath.GetSevenDaysLoginIcon(icon)
  165. return "client/assets/icon/SevenLoginICON/" .. icon .. ".png"
  166. end
  167. function GameResPath.GetChatDressIcon(icon)
  168. return "client/assets/icon/dress/" .. icon .. ".png"
  169. end
  170. function GameResPath.GetSceneLoadBg(res)
  171. return "client/assets/icon/sceneLoadBg/".. res ..".png"
  172. end
  173. function GameResPath.GetSkillViewBg(res)
  174. return "client/assets/icon/skillui/"..res..".png"
  175. end
  176. function GameResPath.GetSkillIcon(id)
  177. return "client/assets/icon/skillIcon/".. id ..".png"
  178. end
  179. function GameResPath.GetPartnerNormalSkillIcon(id)
  180. return Language.substitute("client/assets/icon/PartnerIcon/NormalSkill/{0}.png",id)
  181. end
  182. function GameResPath.GetPartnerTalentSkillIcon(id)
  183. return Language.substitute("client/assets/icon/PartnerIcon/TalentSkill/{0}.png",id)
  184. end
  185. function GameResPath.GetPartnerProtectSkillIcon(id)
  186. return Language.substitute("client/assets/icon/PartnerIcon/ProtectSkill/{0}.png",id)
  187. end
  188. function GameResPath.GetPartnerHeadIcon(id)
  189. return Language.substitute("client/assets/icon/PartnerIcon/PartnerHead/{0}.png",id)
  190. end
  191. function GameResPath.GetPartnerModuleIcon(id, file_type)
  192. file_type = file_type or ".png"
  193. return Language.substitute("client/assets/icon/PartnerModule/{0}" .. file_type,id)
  194. end
  195. function GameResPath.GetIntrusionIcon(index)
  196. return "client/assets/icon/intrusion/"..index
  197. end
  198. function GameResPath.GetWelfareBg(icon)
  199. return "client/assets/icon/welfare/"..icon..".png"
  200. end
  201. function GameResPath.GetGuildModuleIcon(id)
  202. return Language.substitute("client/assets/icon/GuildModule/{0}.png",id)
  203. end
  204. function GameResPath.GetSoundScenePath(res_name)
  205. return "client/assets/sound/scene/" .. res_name
  206. end
  207. function GameResPath.GetHorseIcon(icon)
  208. return "client/assets/icon/horse/" .. icon .. ".png"
  209. end
  210. function GameResPath.GetCaptureFlagIcon(icon)
  211. return "client/assets/icon/captureFlag/" .. icon .. ".png"
  212. end
  213. function GameResPath.GetBuffIcon(buff_id)
  214. return "client/assets/icon/buffIcon/" .. buff_id .. ".png"
  215. end
  216. function GameResPath.GetSevenDaysImage(img_name)
  217. return Language.substitute("client/assets/icon/SevenDay/{0}.png",img_name)
  218. end
  219. function GameResPath.GetLookModuleIcon(id)
  220. return Language.substitute("client/assets/icon/LookModul/{0}.png",id)
  221. end
  222. function GameResPath.GetCommerceTaskImage(img_name)
  223. return Language.substitute("client/assets/icon/CommerceTask/{0}.png",img_name)
  224. end
  225. function GameResPath.GetBuffBigIcon(id)
  226. return "client/assets/icon/buffIconBig/" .. id .. ".png"
  227. end
  228. function GameResPath.GetCareerIcon(id)
  229. return "client/assets/icon/careerIcon/"..id..".png"
  230. end
  231. function GameResPath.GetVipBg(id)
  232. return "client/assets/icon/vipBg/"..id..".png"
  233. end
  234. --天空战场图片
  235. function GameResPath.GetSkyWarBg(id)
  236. return "client/assets/icon/skyWar/".. id ..".png"
  237. end
  238. function GameResPath.GetJpgImage(resName)
  239. return "client/assets/iconjpg/" .. resName .. ".jpg"
  240. end
  241. function GameResPath.GetPartnerHeadImage(id)
  242. return "client/assets/icon/PartnerIcon/PartnerHead/"..id..".png"
  243. end
  244. --首充大背景图片
  245. function GameResPath.GetFirstChargeBg(resName)
  246. return "client/assets/icon/firstCharge/".. resName ..".png"
  247. end
  248. function GameResPath.GetHelperModuleIcon(resName)
  249. return Language.substitute("client/assets/icon/helper/{0}.png",resName)
  250. end
  251. --获取冒险副本入口图路径
  252. function GameResPath.GetAdvImage(type,id,extName)
  253. return "client/assets/icon/AdventureModule/adv_"..type.."_"..id..extName
  254. end
  255. --冒险之旅
  256. function GameResPath.GetAdventureTripIcon(resName)
  257. return "client/assets/icon/adventureTripIcon/".. resName ..".png"
  258. end
  259. --英灵殿背景大图
  260. function GameResPath.GetValhallaBg(resName)
  261. return "client/assets/icon/Valhalla/".. resName ..".png"
  262. end
  263. --新功能开发背景图
  264. function GameResPath.GetFuncOpenModuleIcon(resName)
  265. return "client/assets/icon/Func/".. resName ..".png"
  266. end
  267. --红包背景大图
  268. function GameResPath.GetRedPacketBg(resName)
  269. return "client/assets/icon/redPacket/".. resName ..".png"
  270. end
  271. function GameResPath.GetArenaImage(resName)
  272. return "client/assets/icon/arena/".. resName ..".png"
  273. end
  274. --副本
  275. function GameResPath.GetButterflyImage(resName)
  276. return "client/assets/icon/butterfly/".. resName ..".png"
  277. end
  278. --彩钻大战
  279. function GameResPath.GetDiamondFightImage(resName)
  280. return "client/assets/icon/diamondFight/".. resName ..".png"
  281. end
  282. --星灵争霸
  283. function GameResPath.GetSpiritWarImage(resName)
  284. return "client/assets/icon/spiritWar/".. resName ..".png"
  285. end
  286. --星界试炼
  287. function GameResPath.GetStarFightImage(resName)
  288. return "client/assets/icon/starFight/".. resName ..".png"
  289. end
  290. --活动预告
  291. function GameResPath.GetTaskAnnounce(resName)
  292. return "client/assets/icon/taskAnnounce/".. resName ..".png"
  293. end
  294. --聊天背景
  295. function GameResPath.GetChatBg(resName)
  296. return "client/assets/icon/chatModule/".. resName ..".png"
  297. end
  298. --花语大图
  299. function GameResPath.GetFlowerImage(resName)
  300. return "client/assets/icon/flower/".. resName ..".png"
  301. end
  302. function GameResPath.GetNewShapeIcon(resName)
  303. return "client/assets/icon/tailsman/".. resName ..".png"
  304. end
  305. --翅膀图标
  306. function GameResPath.GetWingIcon(resName)
  307. return "client/assets/icon/wing/".. resName ..".png"
  308. end
  309. --法宝图标
  310. function GameResPath.GetTailsmanIcon(resName)
  311. return "client/assets/icon/tailsman/".. resName ..".png"
  312. end
  313. --神兵图标
  314. function GameResPath.GetGodweaponIcon(resName)
  315. return "client/assets/icon/godweapon/".. resName ..".png"
  316. end
  317. --时装预览大图
  318. function GameResPath.GetFashionPreviewBg(resName)
  319. return "client/assets/icon/FashionPreview/".. resName ..".png"
  320. end
  321. function GameResPath.GetActivityModuleIcon(resName)
  322. return "client/assets/icon/ActivityModule/".. resName ..".png"
  323. end
  324. --平台logo
  325. function GameResPath.GetPlatformLogo( platName )
  326. return "client/assets/icon/plat/".. platName .. ".png"
  327. end
  328. function GameResPath.GetAdvertising( resName)
  329. return "client/assets/icon/advertisingIcon/".. resName .. ".png"
  330. end
  331. function GameResPath.GetTotalChargeImage( resName)
  332. return "client/assets/icon/totalCharge/".. resName .. ".png"
  333. end
  334. function GameResPath.GetMarriageImage(resName)
  335. return "client/assets/icon/marriage/"..resName..".png"
  336. end
  337. function GameResPath.GetEscortImage(resName)
  338. return "client/assets/icon/escort/".. resName .. ".png"
  339. end
  340. function GameResPath.GetBossImage(resName)
  341. return "client/assets/icon/boss/".. resName .. ".png"
  342. end
  343. function GameResPath.GetBossBgImage(resName)
  344. return "client/assets/icon/boss/big_bg/".. resName .. ".png"
  345. end
  346. function GameResPath.GetBossBigImage(resName)
  347. return "client/assets/icon/boss/big/".. resName .. ".png"
  348. end
  349. function GameResPath.GetBossIcon(icon_id)
  350. return "client/assets/icon/boss/head_icon/head_icon_".. icon_id .. ".png"
  351. end
  352. function GameResPath.GetBossTabIcon(icon_id)
  353. --icon_id = 10010102
  354. return "client/assets/icon/boss/head_icon/head_tab_".. icon_id .. ".png"
  355. end
  356. function GameResPath.GetGuideImage(resName)
  357. return "client/assets/icon/guide/".. resName .. ".png"
  358. end
  359. function GameResPath.GetGuildImage(resName)
  360. return "client/assets/icon/guild/".. resName .. ".png"
  361. end
  362. function GameResPath.GetGuildWarImage(resName)
  363. return "client/assets/icon/guildWar/".. resName .. ".png"
  364. end
  365. function GameResPath.GetKfGuildWarImage(resName)
  366. return "client/assets/icon/kfGuildWar/".. resName .. ".png"
  367. end
  368. function GameResPath.GetHappyTurnTableImage(resName)
  369. return "client/assets/icon/happyTurnTable/".. resName .. ".png"
  370. end
  371. function GameResPath.GetDesignImage(resName)
  372. return "client/assets/icon/designIcon/".. resName .. ".png"
  373. end
  374. function GameResPath.GetSocialityImage(resName)
  375. return "client/assets/icon/sociality/".. resName .. ".png"
  376. end
  377. function GameResPath.GetCommonImage(resName)
  378. return "client/assets/icon/common/".. resName .. ".png"
  379. end
  380. function GameResPath.GetComposeImage(resName)
  381. return "client/assets/icon/compose/".. resName .. ".png"
  382. end
  383. function GameResPath.GetBagImage(resName)
  384. return "client/assets/icon/bag/".. resName .. ".png"
  385. end
  386. function GameResPath.GetBeastImage(resName)
  387. return "client/assets/icon/beast/" .. resName .. ".png"
  388. end
  389. function GameResPath.GetMainRoleImage(resName)
  390. return "client/assets/icon/mainRole/".. resName .. ".png"
  391. end
  392. --获取符文|聚魂相关的大图片
  393. function GameResPath.GetRuneImage(resName)
  394. return "client/assets/icon/rune/".. resName .. ".png"
  395. end
  396. --获取宝石相关的大图片
  397. function GameResPath.GetJewelImage(resName)
  398. return "client/assets/icon/jewel/".. resName .. ".png"
  399. end
  400. function GameResPath.GetHorsePetImage(resName)
  401. return "client/assets/icon/horsePet/".. resName .. ".png"
  402. end
  403. function GameResPath.GetChatDressImage(resName)
  404. return "client/assets/icon/chatDress/".. resName .. ".png"
  405. end
  406. -- 转生
  407. function GameResPath.GetReinImage(resName)
  408. return "client/assets/icon/reincarnation/".. resName .. ".png"
  409. end
  410. --VIP资源
  411. function GameResPath.GetVipImage(vip_lv)
  412. return "common_asset", "vip_" .. (vip_lv or 0)
  413. end
  414. --答题
  415. function GameResPath.GetQuizImage(resName)
  416. return "client/assets/icon/quiz/".. resName .. ".png"
  417. end
  418. --日常外部资源
  419. function GameResPath.GetDailyImage(resName)
  420. return "client/assets/icon/daily/".. resName .. ".png"
  421. end
  422. --日常外部资源
  423. function GameResPath.GetDailyBGImage(resName)
  424. return "client/assets/icon/daily/bg/".. resName .. ".png"
  425. end
  426. --设置
  427. function GameResPath.GetSettingImage(resName)
  428. return "client/assets/icon/setting/".. resName .. ".png"
  429. end
  430. --祈愿
  431. function GameResPath.GetPrayImage(resName)
  432. return "client/assets/icon/pray/".. resName .. ".png"
  433. end
  434. --福利
  435. function GameResPath.GetWelfareImage(resName)
  436. return "client/assets/icon/welfare/".. resName .. ".png"
  437. end
  438. --开服活动
  439. function GameResPath.GetKFActivityImage(resName)
  440. return "client/assets/icon/kfActivity/".. resName .. ".png"
  441. end
  442. --星图
  443. function GameResPath.GetStarMapImage(resName)
  444. return "client/assets/icon/starMap/".. resName .. ".png"
  445. end
  446. --星图
  447. function GameResPath.GetCharmRankImage(resName)
  448. return "client/assets/icon/charmRank/".. resName .. ".png"
  449. end
  450. --冒险之书
  451. function GameResPath.GetAdventureBookImage(resName)
  452. return "client/assets/icon/adventureBook/".. resName .. ".png"
  453. end
  454. --开服狂欢
  455. function GameResPath.GetKFRevelActImage(resName)
  456. return "client/assets/icon/kfRevel/".. resName .. ".png"
  457. end
  458. --定制活动
  459. function GameResPath.GetCustomActivityImage(resName)
  460. return "client/assets/icon/customActivity/"..resName..".png"
  461. end
  462. --物品大图标
  463. function GameResPath.GetGoodsBigImage(resName)
  464. return "client/assets/icon/goodsBig/"..resName..".png"
  465. end
  466. --神格大图
  467. function GameResPath.GetDeityImage(resName)
  468. return "client/assets/icon/deity/".. resName .. ".png"
  469. end
  470. function GameResPath.GetImage(module, resName)
  471. return "client/assets/icon/"..module.."/"..resName..".png"
  472. end
  473. function GameResPath.GetArtifactImage(resName)
  474. return "client/assets/icon/artifact/"..resName..".png"
  475. end
  476. function GameResPath.GetCspImage(resName)
  477. return "client/assets/icon/csp/"..resName..".png"
  478. end
  479. --宝藏
  480. function GameResPath.GetTreasureImage(resName)
  481. return "client/assets/icon/treasureHunt/"..resName..".png"
  482. end
  483. --商城
  484. function GameResPath.GetShopImage(resName)
  485. return "client/assets/icon/shop/"..resName..".png"
  486. end
  487. --变强
  488. function GameResPath.GetStrengthImage(resName)
  489. return "client/assets/icon/strength/"..resName..".png"
  490. end
  491. --幸运鉴宝
  492. function GameResPath.GetLcukyAccImage(resName)
  493. return "client/assets/icon/luckyAcc/"..resName..".png"
  494. end
  495. --精品特卖
  496. function GameResPath.GetBoutiqueImage(resName)
  497. return "client/assets/icon/boutiqueSale/"..resName..".png"
  498. end
  499. --星灵
  500. function GameResPath.GetStarSpiritImage(resName)
  501. return "client/assets/icon/starSpirit/"..resName..".png"
  502. end
  503. --小地图
  504. function GameResPath.GetMiniMapImage( mapid )
  505. return "client/assets/icon/smallmap/" .. mapid .. ".jpg"
  506. end
  507. --小地图(透明)
  508. function GameResPath.GetMiniMapImageAlpha( mapid )
  509. return "client/assets/icon/smallmap/" .. mapid .. ".png"
  510. end
  511. --区域小地图
  512. function GameResPath.GetAreaMiniMapImage( mapid )
  513. return "client/assets/icon/smallAreamap/" .. mapid .. ".jpg"
  514. end
  515. --时间地图小地图icon
  516. function GameResPath.GetWorldMapIcon( res )
  517. return "client/assets/icon/map/" .. res .. ".png"
  518. end
  519. --神秘限购
  520. function GameResPath.GetMysticalPurchaseIcon( resName )
  521. return "client/assets/icon/mysticalPurchase/"..resName..".png"
  522. end
  523. --贵族
  524. function GameResPath.GetSupremeVipIcon( resName )
  525. return "client/assets/icon/supremeVip/"..resName..".png"
  526. end
  527. --根据外部资源路径获取ab包名
  528. function GameResPath.GetOutSideResAbName( res_path )
  529. local dir_list = LuaMemManager.Split(res_path,'/')
  530. local file_name = dir_list[#dir_list]
  531. local file_str = LuaMemManager.Split(file_name,".")
  532. local file_name_no_ext = file_str[1]
  533. local file_parent = dir_list[#dir_list - 1]
  534. local ab_name = "icon_" ..file_parent .. "_" .. file_name_no_ext
  535. if #dir_list < 5 then
  536. ab_name = "icon_" .. file_name_no_ext
  537. end
  538. if file_parent == "goodsIcon" then
  539. ab_name = GameResPath.GetGoodsAssetBundleName(file_name_no_ext)
  540. elseif file_parent == "skillIcon" then
  541. ab_name = GameResPath.GetSkillIconAssetBundleName(file_name_no_ext)
  542. end
  543. return ab_name,file_name
  544. end
  545. --技能图标ID分类打包物品图片分类一致
  546. function GameResPath.GetSkillIconAssetBundleName( id )
  547. local step = ""
  548. local goods_id = tonumber(id)
  549. if (goods_id < 101000) then
  550. step = "0"
  551. elseif (goods_id >= 101000 and goods_id < 105000) then
  552. step = math.floor(goods_id / 1000) * 1000
  553. elseif (goods_id >= 105000 and goods_id < 121000) then
  554. step = "105000"
  555. elseif (goods_id >= 121000 and goods_id < 200000) then
  556. step = "121000"
  557. elseif (goods_id >= 200000 and goods_id < 210000) then
  558. step = "200000"
  559. elseif (goods_id >= 210000 and goods_id < 300000) then
  560. step = "210000"
  561. elseif (goods_id >= 300000 and goods_id < 1110000000) then
  562. step = math.floor(goods_id / 100000) * 100000
  563. else
  564. step = "1110000000"
  565. end
  566. return "icon_skillIcon_" .. step
  567. end
  568. --物品ID分类,和打包物品图片分类一致
  569. function GameResPath.GetGoodsAssetBundleName( id )
  570. local step = ""
  571. local goods_id = tonumber(id)
  572. if (goods_id < 100000) then
  573. step = "0"
  574. elseif (goods_id >= 100000 and goods_id < 102000) then
  575. --货币道具
  576. step = "100000"
  577. elseif (goods_id >= 102000 and goods_id < 105000) then
  578. --杂物道具
  579. step = "102000"
  580. elseif (goods_id >= 105000 and goods_id < 210000) then
  581. --运营道具(后续可能调整)
  582. step = "105000"
  583. elseif (goods_id >= 210000 and goods_id < 230000) then
  584. --人物技能书、幻光
  585. step = "210000"
  586. elseif (goods_id >= 230000 and goods_id < 240000) then
  587. --进阶系统
  588. if (goods_id < 235000) then
  589. step = "230000"
  590. elseif (goods_id < 240000) then
  591. step = "235000"
  592. end
  593. elseif (goods_id >= 240000 and goods_id < 250000) then
  594. --印记
  595. if (goods_id < 245000) then
  596. step = "240000"
  597. elseif (goods_id < 250000) then
  598. step = "245000"
  599. end
  600. elseif (goods_id >= 250000 and goods_id < 290000) then
  601. --25-29*10000
  602. step = math.floor(goods_id / 10000) * 10000
  603. elseif (goods_id >= 290000 and goods_id < 300000) then
  604. --神魂
  605. step = "290000"
  606. elseif (goods_id >= 300000 and goods_id < 310000) then
  607. --座印
  608. if (goods_id < 300200) then
  609. step = "300100"
  610. elseif (goods_id < 300300) then
  611. step = "300200"
  612. elseif (goods_id < 300400) then
  613. step = "300300"
  614. elseif (goods_id < 300500) then
  615. step = "300400"
  616. elseif (goods_id < 300600) then
  617. step = "300500"
  618. elseif (goods_id < 300700) then
  619. step = "300600"
  620. elseif (goods_id < 300800) then
  621. step = "300700"
  622. elseif (goods_id < 300900) then
  623. step = "300800"
  624. else
  625. step = "300900"
  626. end
  627. elseif (goods_id >= 310000 and goods_id < 400000) then
  628. --神魂装备礼包
  629. step = "310000"
  630. elseif (goods_id >= 400000 and goods_id < 710000) then
  631. --40-71*10000
  632. step = math.floor(goods_id / 10000) * 10000
  633. elseif (goods_id >= 710000 and goods_id < 750000) then
  634. --星辰
  635. step = "710000"
  636. elseif (goods_id >= 750000 and goods_id < 1000000) then
  637. --待定
  638. --75-99*10000
  639. step = math.floor(goods_id / 10000) * 10000
  640. elseif (goods_id >= 10000000 and goods_id >= 24000000) then
  641. --装备
  642. step = math.floor(goods_id / 100000) * 100000
  643. end
  644. return "icon_goodsIcon_" .. step
  645. end
  646. --图鉴
  647. function GameResPath.GetHandbookImage(resName)
  648. return "client/assets/icon/handbook/"..resName..".png"
  649. end
  650. --圣器契约
  651. function GameResPath.GetRelicsTargetImage(resName)
  652. return "client/assets/icon/relicsTarget/"..resName..".png"
  653. end
  654. --充值活动
  655. function GameResPath.GetRechargeActivityImage(resName)
  656. return "client/assets/icon/rechargeActivity/"..resName..".png"
  657. end
  658. --宝宝
  659. function GameResPath.GetBabyImage(resName)
  660. return "client/assets/icon/baby/"..resName..".png"
  661. end
  662. --排行榜
  663. function GameResPath.GetRankImage(resName)
  664. return "client/assets/icon/rank/"..resName..".png"
  665. end
  666. --唤神装备图
  667. function GameResPath.GetGodEquipImage(suit_id,pos)
  668. return "/client/assets/icon/god/soul_icon/god_soul_"..suit_id.."_"..pos..".png"
  669. end
  670. -- 神座系统资源
  671. function GameResPath.GetGodBg( resName )
  672. return "/client/assets/icon/god/bg/".. resName .. ".png"
  673. end
  674. -- 超值投资
  675. function GameResPath.GetInvestValueImage(resName)
  676. return "client/assets/icon/investValue/"..resName..".png"
  677. end
  678. --魂珠大图
  679. function GameResPath.GetSoulBeadImage(resName)
  680. return "client/assets/icon/soulBead/".. resName .. ".png"
  681. end
  682. --钓鱼图鉴
  683. function GameResPath.GetFishbookImage(resName)
  684. return "client/assets/icon/fish/"..resName..".png"
  685. end
  686. --vip广告
  687. function GameResPath.GetVipAdsImage(resName)
  688. return "client/assets/icon/vip4/"..resName..".png"
  689. end
  690. --至尊VIP
  691. function GameResPath.GetBestVipImage(resName)
  692. return "client/assets/icon/bestVip/"..resName..".png"
  693. end
  694. --装备icon
  695. function GameResPath.GetEquipIcon(resName)
  696. return "client/assets/icon/equip/"..resName..".png"
  697. end
  698. --装备刻印icon
  699. function GameResPath.GetEquipDraconicIcon(resName)
  700. return "client/assets/icon/equipDraconic/"..resName..".png"
  701. end
  702. --宝宝icon
  703. function GameResPath.GetChildIcon(resName)
  704. return "client/assets/icon/child/"..resName..".png"
  705. end
  706. --宝宝图鉴icon
  707. function GameResPath.GetChildHandbookIcon(resName)
  708. return "client/assets/icon/child/toys/"..resName..".png"
  709. end
  710. -- 宝宝时装原画
  711. function GameResPath.GetChildDressIcon(resName)
  712. return "client/assets/icon/child/fashion/"..resName..".png"
  713. end
  714. -- 宝宝玩具系列原画
  715. function GameResPath.GetChildToyImgIcon(resName)
  716. return "client/assets/icon/child/toyImg/"..resName..".png"
  717. end
  718. --升品寻宝icon
  719. function GameResPath.GetEmpowerIcon(resName)
  720. return "client/assets/icon/empower/"..resName..".png"
  721. end
  722. --跨服世界icon
  723. function GameResPath.GetKfWorldIcon(resName)
  724. return "client/assets/icon/kfworld/"..resName..".png"
  725. end
  726. --跑马的闪灯图
  727. function GameResPath.GetGuildTVLightIcon(resName)
  728. return "client/assets/icon/guildTV/"..resName..".png"
  729. end
  730. function GameResPath.GetLimitTimeRankImage(resName)
  731. return "client/assets/icon/limitTimeRank/"..resName..".png"
  732. end
  733. function GameResPath.GetJoyWishImage(resName)
  734. return "client/assets/icon/joyWish/"..resName..".png"
  735. end
  736. function GameResPath.GetDiscountImage(resName)
  737. return "client/assets/icon/discount/"..resName..".png"
  738. end
  739. function GameResPath.GetVipSaleImage(resName)
  740. return "client/assets/icon/vipSale/"..resName..".png"
  741. end
  742. --返回功能模块大界面背景
  743. function GameResPath.GetViewBigBg(name)
  744. return "client/assets/icon/allBg/"..name..".png"
  745. end
  746. --返回角色图片资源
  747. function GameResPath.GetRoleBg(name)
  748. return "client/assets/icon/roleBg/"..name..".png"
  749. end
  750. --副本通用ui资源
  751. function GameResPath.GetDungeonImage(resName)
  752. return "client/assets/icon/dungeon/".. resName ..".png"
  753. end
  754. --副本主界面资源
  755. function GameResPath.GetDungeonMainViewImage(resName)
  756. return "client/assets/icon/dungeonView/".. resName ..".png"
  757. end
  758. --主线材料副本bg
  759. function GameResPath.GetDungeonMainPlotImage(resName)
  760. return "client/assets/icon/dungeonMainPlot/".. resName ..".png"
  761. end
  762. function GameResPath.GetFosterHead( type_id,grade )
  763. type_id = type_id or 1
  764. grade = grade or 1
  765. return "client/assets/icon/foster/head/foster_head_".. type_id .. "_" .. grade ..".png"
  766. end
  767. -- 获取进阶装备界面左侧tab头像图片
  768. function GameResPath.GetFosterTabHead(type_id, grade)
  769. type_id = type_id or 1
  770. grade = grade or 1
  771. return "client/assets/icon/foster/tab/foster_tab_head_".. type_id .. "_" .. grade ..".png"
  772. end
  773. --获取进阶武器图片(区分职业)
  774. function GameResPath.GetFosterWeaponTabHead(type_id, grade,career)
  775. local type_id = type_id or 1
  776. local grade = grade or 1
  777. local career = career or 1
  778. local career_num = 1
  779. if career == 1 or career == 2 then
  780. career_num = 1
  781. else
  782. career_num = 2
  783. end
  784. return "client/assets/icon/foster/tab/foster_tab_head_".. type_id .. "_" .. grade .. "_"..career_num ..".png"
  785. end
  786. function GameResPath.GetAttrIcon( attr_id, force, res_type )
  787. --res_type 默认nil,取暗色图标,为1 取亮色图
  788. local name_str1 = res_type == 1 and "common_sign2_" or "common_sign_"
  789. -------------------------
  790. if force then
  791. return "common_asset", name_str1 .. attr_id ..".png"
  792. else
  793. local have = {
  794. [1] = true, [2] = true, [3] = true, [4] = true, [5] = true,}
  795. return "common_asset", name_str1 .. (have[attr_id] and attr_id or 1) ..".png"
  796. end
  797. end
  798. --学位资源
  799. function GameResPath.GetDegreeImage(resName)
  800. return "client/assets/icon/degree/".. resName ..".png"
  801. end
  802. --宠物资源
  803. function GameResPath.GetPetImage(resName)
  804. return "client/assets/icon/pet/".. resName ..".png"
  805. end
  806. --系统设置资源
  807. function GameResPath.GetSettingImage(resName)
  808. return "client/assets/icon/setting/".. resName ..".png"
  809. end
  810. -- 社团图标资源
  811. function GameResPath.GetGuildIcon(icon_flag)
  812. return "client/assets/icon/guild/guild_icon".. icon_flag ..".png"
  813. end
  814. --性别图标资源
  815. function GameResPath.GetSexImage(sex)
  816. return "common_asset", sex == 1 and "com_boy" or "com_girl"
  817. end
  818. -- 功能开放
  819. function GameResPath.GetFuncIcon(resName)
  820. return "client/assets/icon/func/".. resName ..".png"
  821. end
  822. -- vip
  823. function GameResPath.GetVipIconImage(resName)
  824. return "client/assets/icon/vip/".. resName ..".png"
  825. end
  826. -- 成就系统获取角色立绘
  827. function GameResPath.GetAchieveRoleSP(resName)
  828. return "client/assets/icon/achievement/achieve_sp_".. resName ..".png"
  829. end
  830. -- 成就系统资源大图
  831. function GameResPath.GetAchieveBigPic(resName)
  832. return "client/assets/icon/achievement/".. resName ..".png"
  833. end
  834. --返回竞技联赛
  835. function GameResPath.GetPkRankBg(name)
  836. return "client/assets/icon/pkrank/"..name..".png"
  837. end
  838. --返回竞技联赛
  839. function GameResPath.GetRankBg(name)
  840. return "client/assets/icon/rank/"..name..".png"
  841. end
  842. --返回功能模块大界面背景
  843. function GameResPath.GetCommomBg(name)
  844. return "client/assets/icon/common/"..name..".png"
  845. end
  846. -- 返回七日登录相关资源路径
  847. function GameResPath.GetSevenLoginsDayRes(res_name)
  848. return "client/assets/icon/sevenDaysLogin/"..res_name..".png"
  849. end
  850. --返回龙神宝库相关资源路径
  851. function GameResPath.GetCapsuleEggRes(res_name)
  852. return "client/assets/icon/capsuleEgg/"..res_name..".png"
  853. end
  854. --护送资源
  855. function GameResPath.GetEscortImage(resName)
  856. return "client/assets/icon/escort/".. resName ..".png"
  857. end
  858. --限购礼包资源
  859. function GameResPath.GetLimitGiftImage(resName)
  860. return "client/assets/icon/limitGift/"..resName..".png"
  861. end
  862. --0元礼包资源
  863. function GameResPath.GetZeroGiftImage(resName)
  864. return "client/assets/icon/zeroGift/"..resName..".png"
  865. end
  866. --唤神头像
  867. function GameResPath.GetGodHeadIcon( god_id,res_id )
  868. return "god_icon_asset", "god_icon_" .. (res_id or god_id)
  869. end
  870. --唤神头像
  871. function GameResPath.GetGodSuitIcon( suit_id )
  872. if suit_id then
  873. return "god_icon_asset", "god_suit_" .. suit_id
  874. end
  875. return "god_icon_asset", "god_suit_1"
  876. end
  877. --唤神变身头像
  878. function GameResPath.GetGodSkillIcon( god_id )
  879. if god_id then
  880. return "god_skill_icon_asset", "god_skill_icon_" .. god_id
  881. end
  882. return "god_skill_icon_asset", "god_skill_icon_1001"
  883. end
  884. --精英考核外部资源
  885. function GameResPath.GetEliteAssessImage(resName)
  886. return "client/assets/icon/eliteAssess/".. resName .. ".png"
  887. end
  888. --竞榜外部资源
  889. function GameResPath.GetCompetingListImage(resName)
  890. return "client/assets/icon/competingList/".. resName .. ".png"
  891. end
  892. --社团竞榜外部资源
  893. function GameResPath.GetGuildSpeedActImage(resName)
  894. return "client/assets/icon/guildSpeedAct/".. resName .. ".png"
  895. end
  896. --臻享礼包外部资源
  897. function GameResPath.GetHopeGiftImage(resName)
  898. return "client/assets/icon/hopeGift/".. resName .. ".png"
  899. end
  900. --福利部资源
  901. function GameResPath.GetFuliImage(resName)
  902. return "client/assets/icon/fuli/".. resName .. ".png"
  903. end
  904. function GameResPath.GetCSGWarImage( resName )
  905. return "client/assets/icon/CSGWar/".. resName .. ".png"
  906. end
  907. --全民动员
  908. function GameResPath.GetMobilizationImage( resName )
  909. return "client/assets/icon/mobilization/".. resName .. ".png"
  910. end
  911. --活动宣传图
  912. function GameResPath.GetAdBigBg( resName )
  913. return "client/assets/icon/allBg/adBg/"..resName..".png"
  914. end
  915. --星辰系统背景
  916. function GameResPath.GetGalaxyBg( resName )
  917. return "client/assets/icon/galaxy/"..resName..".png"
  918. end
  919. --星辰副本资源图
  920. function GameResPath.GetGalaxyDunBg( resName )
  921. return "client/assets/icon/galaxy/dungeon/"..resName..".png"
  922. end
  923. --无尽领域
  924. function GameResPath.GetEndLessnBg( resName )
  925. return "client/assets/icon/endless/"..resName..".png"
  926. end
  927. --主题活动
  928. function GameResPath.GetOperateActImage(resName)
  929. return "client/assets/icon/operateAct/".. resName .. ".png"
  930. end
  931. --可以写图片路径
  932. function GameResPath.GetReadWriteImage(resName)
  933. return "client/assets/icon/rwicon/".. resName .. ".png"
  934. end
  935. --战魂
  936. function GameResPath.GetWarSoulImage( resName )
  937. return "client/assets/icon/warSoul/".. resName .. ".png"
  938. end
  939. --风采系统资源
  940. function GameResPath.GetWardrobeImage( resName )
  941. return "client/assets/icon/wardrobe/".. resName .. ".png"
  942. end
  943. -- -- 性格系统 获取节点图标
  944. -- function GameResPath.GetNatureIcon( resName )
  945. -- return "client/assets/icon/nature/spotIcon/".. resName .. ".png"
  946. -- end
  947. -- -- 性格系统 获取小窗口背景图
  948. -- function GameResPath.GetNatureBg( resName )
  949. -- return "client/assets/icon/nature/".. resName .. ".png"
  950. -- end
  951. -- 眼疾手快
  952. function GameResPath.GetAmasingJipSawBg( resName )
  953. return "client/assets/icon/amasingjigsawpuzzle/".. resName .. ".png"
  954. end
  955. --获取羁绊外部图片
  956. function GameResPath.GetMateImage(resName)
  957. return "client/assets/icon/mate/".. resName .. ".png"
  958. end
  959. --合成机资源
  960. function GameResPath.GetComposeRobotImage(resName)
  961. return "client/assets/icon/composeRobot/"..resName..".png"
  962. end
  963. -- 大陆征途 图腾
  964. function GameResPath.GetTotemImage(resName)
  965. return "client/assets/icon/mainlandJourney/totem/"..resName..".png"
  966. end
  967. -- 大陆征途 npc头像
  968. function GameResPath.GetMainJourneyHeadIconImage(resName)
  969. return "client/assets/icon/mainlandJourney/headIcon/"..resName..".png"
  970. end
  971. -- 大陆征途
  972. function GameResPath.GetMainJourneyImage(resName)
  973. return "client/assets/icon/mainlandJourney/"..resName..".png"
  974. end
  975. -- 跨服主功能
  976. function GameResPath.GetCSMainImage(resName)
  977. return "client/assets/icon/csMain/"..resName..".png"
  978. end
  979. -- 军衔标志
  980. function GameResPath.GetMilitaryImage(resName)
  981. return "client/assets/icon/csMain/military/"..resName..".png"
  982. end
  983. -- 星域世界预告小图
  984. function GameResPath.GetCSMainAdvanceNoticeImage(resName)
  985. return "client/assets/icon/csMain/advanceNoticeBg/"..resName..".png"
  986. end
  987. -- 大陆征途 地图大背景
  988. function GameResPath.GetMainJourneyBigImage(resName)
  989. return "client/assets/icon/mainlandJourney/bg/"..resName..".png"
  990. end
  991. -- 获取藏宝图外部图片
  992. function GameResPath.GetTreasureMapImage(resName)
  993. return "client/assets/icon/treasureMap/"..resName..".png"
  994. end