Some cleanup

* Removed LapineUpgradeItem and LapineUpgradeIndex param
* Source and script doc updates
This commit is contained in:
Cydh 2019-10-01 07:39:20 +07:00
parent dc0d74266b
commit 7c7e8885c1
15 changed files with 258 additions and 128 deletions

View File

@ -56,7 +56,7 @@ Body:
Result: |
callfunc("F_Lapine_Ancient_Hero_Bravery", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 100025 # Ancient_Hero_Wisdom, 영웅의 무기
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -94,7 +94,7 @@ Body:
Result: |
callfunc("F_Lapine_Ancient_Hero_Wisdom", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 100003 # ILL_Piece_A, 4레벨 일루전 무기
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -127,7 +127,7 @@ Body:
Result: |
callfunc("F_Lapine_ILL_Piece_A", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 100004 # ILL_Piece_B, 4레벨 일루전 무기
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -160,7 +160,7 @@ Body:
Result: |
callfunc("F_Lapine_ILL_Piece_B", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 9550 # Gemstone_Of_Time, 시간의 갑옷 6종
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -175,7 +175,7 @@ Body:
Result: |
callfunc("F_Lapine_Gemstone_Of_Time", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 9551 # Time_Unseal_Key, 시간의 망토 6종
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -190,7 +190,7 @@ Body:
Result: |
callfunc("F_Lapine_Time_Unseal_Key", .@opts[0], .@vals[0]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23815 # Magma_Essence, 라바 레더 갑옷 장비
NeedRefineMin: 0
NeedOptionNumMin: 2
@ -202,7 +202,7 @@ Body:
Result: |
callfunc("F_Lapine_Magma_Essence", .@opts[0], .@vals[0], .@opts[1], .@vals[1], .@opts[2], .@vals[2], .@opts[3]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23776 # EP17_1_SPC05, OS무기
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -227,7 +227,7 @@ Body:
Result: |
callfunc("F_Lapine_EP17_1_SPC05", .@opts[0], .@vals[0], .@opts[1], .@vals[1], .@opts[2], .@vals[2]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23777 # EP17_1_SPC06, OS무기
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -252,7 +252,7 @@ Body:
Result: |
callfunc("F_Lapine_EP17_1_SPC06", .@opts[0], .@vals[0], .@opts[1], .@vals[1], .@opts[2], .@vals[2]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23778 # EP17_1_SPC07, OS무기
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -277,7 +277,7 @@ Body:
Result: |
callfunc("F_Lapine_EP17_1_SPC07", .@opts[0], .@vals[0], .@opts[1], .@vals[1], .@opts[2], .@vals[2]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23779 # EP17_1_SPC08, OS무기
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -302,7 +302,7 @@ Body:
Result: |
callfunc("F_Lapine_EP17_1_SPC08", .@opts[0], .@vals[0], .@opts[1], .@vals[1], .@opts[2], .@vals[2]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23780 # EP17_1_SPC09, OS무기
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -327,7 +327,7 @@ Body:
Result: |
callfunc("F_Lapine_EP17_1_SPC09", .@opts[0], .@vals[0], .@opts[1], .@vals[1], .@opts[2], .@vals[2]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23781 # EP17_1_SPC10, OS무기
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -352,7 +352,7 @@ Body:
Result: |
callfunc("F_Lapine_EP17_1_SPC10", .@opts[0], .@vals[0], .@opts[1], .@vals[1], .@opts[2], .@vals[2]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23706 # Charleston_Parts_W, 찰스턴 업그레이드 부품(물리)
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -368,7 +368,7 @@ Body:
Result: |
callfunc("F_Lapine_Charleston_Parts_W", .@opts[0], .@vals[0]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23707 # Charleston_Parts_R, 찰스턴 업그레이드 부품(원거리)
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -384,7 +384,7 @@ Body:
Result: |
callfunc("F_Lapine_Charleston_Parts_R", .@opts[0], .@vals[0]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23678 # Gray_Charcoal_Range, 타노스 원거리 무기
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -404,7 +404,7 @@ Body:
Result: |
callfunc("F_Lapine_Gray_Charcoal_Range", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23677 # Gray_Charcoal_Magic, 타노스 마법 무기
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -419,7 +419,7 @@ Body:
Result: |
callfunc("F_Lapine_Gray_Charcoal_Magic", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23676 # Gray_Charcoal_Melee, 타노스 근거리 무기
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -439,7 +439,7 @@ Body:
Result: |
callfunc("F_Lapine_Gray_Charcoal_Melee", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23679 # Geffen_Magic_Scroll2, 게펜 마법 대회 액세서리 (accessory)
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -450,7 +450,7 @@ Body:
Result: |
callfunc("F_Lapine_Geffen_Magic_Scroll2", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23675 # Geffen_Magic_Scroll, 게펜 마법 대회 갑옷 (armor)
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -461,7 +461,7 @@ Body:
Result: |
callfunc("F_Lapine_Geffen_Magic_Scroll", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23546 # Cursed_Blood, 피빛의 기사의 방패
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -471,7 +471,7 @@ Body:
Result: |
callfunc("F_Lapine_Cursed_Blood", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23547 # Gold_Statue, 정화된 기사의 방패
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -481,7 +481,7 @@ Body:
Result: |
callfunc("F_Lapine_Gold_Statue", .@opts[0], .@vals[0], .@opts[1], .@vals[1], .@opts[2], .@vals[2]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23436 # Shadow_Refine_Hammer, 쉐도우 아이템
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -955,7 +955,7 @@ Body:
- Item: 24475 #S_Arms_Earing
Result: |
callfunc("F_Lapine_Shadow_Refine_Hammer", .@refine);
getitem2(LapineUpgradeItem,1,1,.@refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4);
getitem2(@last_lapine_id,1,1,.@refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4);
- Id: 23926 # Shadow_9_Refine_Hammer, 쉐도우 아이템
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -1429,7 +1429,7 @@ Body:
- Item: 24475 #S_Arms_Earing
Result: |
callfunc("F_Lapine_Shadow_9_Refine_Hammer", .@refine);
getitem2(LapineUpgradeItem,1,1,.@refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4);
getitem2(@last_lapine_id,1,1,.@refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4);
- Id: 23311 # 마법고양이손, 새끼 고양이 헤드드레스 (rdata.grf)
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -1439,7 +1439,7 @@ Body:
Result: |
callfunc("F_Lapine_Magic_Cat_Hand", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,0,0,0,0,0,0,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,0,0,0,0,0,0,.@opts,.@vals,.@params);
- Id: 23289 # 사탕축복스크롤_물리, 사탕 주머니 가방(물리) (rdata.grf)
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -1449,7 +1449,7 @@ Body:
Result: |
callfunc("F_Lapine_Candy_Pouch_Blessing_Scroll_W", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23290 # 사탕축복스크롤_원거리, 사탕 주머니 가방(원거리) (rdata.grf)
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -1459,7 +1459,7 @@ Body:
Result: |
callfunc("F_Lapine_Candy_Pouch_Blessing_Scroll_R", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23291 # 사탕축복스크롤_마법, 사탕 주머니 가방(마법) (rdata.grf)
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -1469,7 +1469,7 @@ Body:
Result: |
callfunc("F_Lapine_Candy_Pouch_Blessing_Scroll_M", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23100 # 건슬링거두루마리, 늘어진 건슬링거 (rdata.grf)
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -1479,7 +1479,7 @@ Body:
Result: |
callfunc("F_Lapine_Grown_Gunslinger", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 23229 # 타락천사날개초기화권, 타락천사의 날개 (rdata.grf)
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -1491,7 +1491,7 @@ Body:
if (@last_lapine_card1) {
getitem(@last_lapine_card1,1);
}
getitem2(LapineUpgradeItem,1,1,0,0,0,0,0,0);
getitem2(@last_lapine_id,1,1,0,0,0,0,0,0);
- Id: 23175 # 제복수선키트, 카프라 제복 (rdata.grf)
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -1501,7 +1501,7 @@ Body:
Result: |
callfunc("F_Lapine_Uniform_Repair_Kits", .@opts[0], .@vals[0], .@opts[1], .@vals[1]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,0,0,0,0,0,0,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,0,0,0,0,0,0,.@opts,.@vals,.@params);
- Id: 23720 # Shadow_Random_Mix, "+7 쉐도우 아이템"
NeedRefineMin: 7
NeedOptionNumMin: 0
@ -1886,7 +1886,7 @@ Body:
Result: |
callfunc("F_Lapine_Shadow_Random_Mix", .@opts[0], .@vals[0]);
.@params[0] = 0;
getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
- Id: 100043 # Boost_Up_1, 부스터 방어구
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -1906,7 +1906,7 @@ Body:
- Item: 470002 #Defn_Shoes
Result: |
callfunc("F_Lapine_Boost_Up_1", .@refine);
getitem2(LapineUpgradeItem,1,1,.@refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4);
getitem2(@last_lapine_id,1,1,.@refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4);
- Id: 100044 # Boost_Up_2, 부스팅 무기
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -1932,7 +1932,7 @@ Body:
- Item: 550002 #Boost_Foxtail
Result: |
callfunc("F_Lapine_Boost_Up_2", .@refine);
getitem2(LapineUpgradeItem,1,1,.@refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4);
getitem2(@last_lapine_id,1,1,.@refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4);
- Id: 9523 # Metal_Rifine_Ticket, 메탈 무기
NeedRefineMin: 0
NeedOptionNumMin: 0
@ -1952,7 +1952,7 @@ Body:
- Item: 26111 #메탈강아지풀
Result: |
callfunc("F_Lapine_Metal_Rifine_Ticket", .@refine);
getitem2(LapineUpgradeItem,1,1,.@refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4);
getitem2(@last_lapine_id,1,1,.@refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4);
#- Id: 100128 # Noblesse_Rifine_Ticket, 노블레스 아이템
# NeedRefineMin: 0
# NeedOptionNumMin: 0
@ -2000,7 +2000,7 @@ Body:
# - Item: 480014 # Noblesse_Magic_Manteau
# Result: |
# callfunc("F_Lapine_Noblesse_Refine_Ticket", .@refine);
# getitem2(LapineUpgradeItem,1,1,.@refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4);
# getitem2(@last_lapine_id,1,1,.@refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4);
#- Id: 100129 # Imperial_Rifine_Ticket, 임페리얼 아이템
# NeedRefineMin: 0
# NeedOptionNumMin: 0
@ -2048,7 +2048,7 @@ Body:
# - Item: 480017 # Imperial_Magic_Manteau
# Result: |
# callfunc("F_Lapine_Imperial_Refine_Ticket", .@refine);
# getitem2(LapineUpgradeItem,1,1,.@refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4);
# getitem2(@last_lapine_id,1,1,.@refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4);
#- Id: 100130 # Grace_Rifine_Ticket, 그레이스 아이템
# NeedRefineMin: 0
# NeedOptionNumMin: 0
@ -2096,7 +2096,7 @@ Body:
# - Item: 480019 # Grace_Magic_Manteau
# Result: |
# callfunc("F_Lapine_Grace_Refine_Ticket", .@refine);
# getitem2(LapineUpgradeItem,1,1,.@refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4);
# getitem2(@last_lapine_id,1,1,.@refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4);
#- Id: 100131 # Imperial_Convert1, 임페리얼 망토
# NeedRefineMin: 0
# NeedOptionNumMin: 0
@ -2107,7 +2107,7 @@ Body:
# Result: |
# callfunc("F_Lapine_Imperial_Convert1", .@opts[0], .@vals[0]);
# .@params[0] = 0;
# getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
# getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
#- Id: 100132 # Imperial_Convert2, 임페리얼 망토
# NeedRefineMin: 0
# NeedOptionNumMin: 0
@ -2118,7 +2118,7 @@ Body:
# Result: |
# callfunc("F_Lapine_Imperial_Convert2", .@opts[0], .@vals[0]);
# .@params[0] = 0;
# getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
# getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
#- Id: 100135 # Imperial_Convert3, 임페리얼 갑옷
# NeedRefineMin: 0
# NeedOptionNumMin: 0
@ -2163,7 +2163,7 @@ Body:
# Result: |
# callfunc("F_Lapine_Imperial_Convert3", .@opts[0], .@vals[0]);
# .@params[0] = 0;
# getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
# getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
#- Id: 100136 # Imperial_Convert4, 임페리얼 갑옷
# NeedRefineMin: 0
# NeedOptionNumMin: 0
@ -2208,7 +2208,7 @@ Body:
# Result: |
# callfunc("F_Lapine_Imperial_Convert4", .@opts[0], .@vals[0]);
# .@params[0] = 0;
# getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
# getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
#- Id: 100133 # Grace_Convert1, 그레이스 망토
# NeedRefineMin: 0
# NeedOptionNumMin: 0
@ -2219,7 +2219,7 @@ Body:
# Result: |
# callfunc("F_Lapine_Grace_Convert1", .@opts[0], .@vals[0]);
# .@params[0] = 0;
# getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
# getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
#- Id: 100134 # Grace_Convert2, 그레이스 망토
# NeedRefineMin: 0
# NeedOptionNumMin: 0
@ -2230,7 +2230,7 @@ Body:
# Result: |
# callfunc("F_Lapine_Grace_Convert2", .@opts[0], .@vals[0]);
# .@params[0] = 0;
# getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
# getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
#- Id: 100137 # Grace_Convert3, 그레이스 갑옷
# NeedRefineMin: 0
# NeedOptionNumMin: 0
@ -2275,7 +2275,7 @@ Body:
# Result: |
# callfunc("F_Lapine_Grace_Convert3", .@opts[0], .@vals[0]);
# .@params[0] = 0;
# getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
# getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
#- Id: 100138 # Grace_Convert4, 그레이스 갑옷
# NeedRefineMin: 0
# NeedOptionNumMin: 0
@ -2320,7 +2320,7 @@ Body:
# Result: |
# callfunc("F_Lapine_Grace_Convert4", .@opts[0], .@vals[0]);
# .@params[0] = 0;
# getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
# getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
#- Id: 9514 # Ein_Ddbox, 물리 개조 시스템
# NeedRefineMin: 0
# NeedOptionNumMin: 0
@ -2348,7 +2348,7 @@ Body:
# // TODO
# callfunc("F_Lapine_Ein_Ddbox", .@opts[0], .@vals[0]);
# .@params[0] = 0;
# getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
# getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
#- Id: 9529 # Ein_Ddbox2, 마법 개조 시스템
# NeedRefineMin: 0
# NeedOptionNumMin: 0
@ -2376,7 +2376,7 @@ Body:
# // TODO
# callfunc("F_Lapine_Ein_Ddbox2", .@opts[0], .@vals[0]);
# .@params[0] = 0;
# getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
# getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
#- Id: 23981 # Abyss_Ddbox, 소용돌이 치는 용의 힘
# NeedRefineMin: 0
# NeedOptionNumMin: 0
@ -2392,7 +2392,7 @@ Body:
# // TODO
# callfunc("F_Lapine_Abyss_Ddbox", .@opts[0], .@vals[0]);
# .@params[0] = 0;
# getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
# getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
#- Id: 100142 # Abyss_Ddbox2, 안정된 용의 힘
# NeedRefineMin: 0
# NeedOptionNumMin: 0
@ -2408,7 +2408,7 @@ Body:
# // TODO
# callfunc("F_Lapine_Abyss_Ddbox2", .@opts[0], .@vals[0]);
# .@params[0] = 0;
# getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
# getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
#- Id: 100144 # Abyss_Ddbox3, 불타는 용의 힘
# NeedRefineMin: 0
# NeedOptionNumMin: 0
@ -2419,7 +2419,7 @@ Body:
# // TODO
# callfunc("F_Lapine_Abyss_Ddbox3", .@opts[0], .@vals[0]);
# .@params[0] = 0;
# getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
# getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
#- Id: 100145 # Abyss_Ddbox4, 뜨거운 용의 힘
# NeedRefineMin: 0
# NeedOptionNumMin: 0
@ -2430,4 +2430,4 @@ Body:
# // TODO
# callfunc("F_Lapine_Abyss_Ddbox4", .@opts[0], .@vals[0]);
# .@params[0] = 0;
# getitem3(LapineUpgradeItem,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);
# getitem3(@last_lapine_id,1,1,@last_lapine_refine,0,@last_lapine_card1,@last_lapine_card2,@last_lapine_card3,@last_lapine_card4,.@opts,.@vals,.@params);

View File

@ -10162,6 +10162,21 @@ db/[pre-]re/item_upgrade.yml.
Returns 1 on success and 0 of failure.
If validation process is success, these variables are set:
@last_lapine_id - Item ID of target item
@last_lapine_idx - Inventory index of target item
@last_lapine_refine - Refine level
@last_lapine_attribute - Attribute flag
@last_lapine_card1 - Card value at slot 0
@last_lapine_card2 - Card value at slot 1
@last_lapine_card3 - Card value at slot 2
@last_lapine_card4 - Card value at slot 3
@last_lapine_bound - Bound flag
@last_lapine_uniqueid$ - Unqiue ID
@last_lapine_option_id[] - Array of Random Option IDs
@last_lapine_option_value[] - Array of Random Option Values
@last_lapine_option_param[] - Array of Random Option Params
---------------------------------------
========================

View File

@ -50,6 +50,10 @@
#define OFFICIAL_GUILD_STORAGE
#endif
#if PACKETVER >= 20160525
#define FEATURE_LAPINE_UI
#endif
#ifndef DUMP_UNKNOWN_PACKET
//#define DUMP_UNKNOWN_PACKET
#endif

View File

@ -10067,7 +10067,7 @@ ACMD_FUNC(resurrect) {
ACMD_FUNC(synthesisui) {
nullpo_retr(-1, sd);
#if PACKETVER >= 20160525
#ifdef FEATURE_LAPINE_UI
unsigned int itemid;
if (sscanf(message, "%u", &itemid) < 1) {
clif_displaymessage(fd, "Please input itemid of synthesis id.");
@ -10083,7 +10083,7 @@ ACMD_FUNC(synthesisui) {
ACMD_FUNC(upgradeui) {
nullpo_retr(-1, sd);
#if PACKETVER >= 20160525
#ifdef FEATURE_LAPINE_UI
unsigned int itemid;
if (sscanf(message, "%u", &itemid) < 1) {
clif_displaymessage(fd, "Please input itemid of upgrade id.");

View File

@ -20893,13 +20893,24 @@ void clif_parse_equipswitch_request_single( int fd, struct map_session_data* sd
#endif
}
/*
* Reset Lapine UI variables
* @param sd Player
*/
static void clif_lapine_ui_reset(map_session_data *sd) {
sd->state.lapine_ui = 0;
sd->last_lapine_box = 0;
}
/*
* Open Lapine Synthesis UI
* @param sd Player
* @param itemid ID for synthesis item
* 0A4E <itemid>.W (ZC_LAPINE_SYNTHESIS_OPEN)
* 0A4E <itemid>.L (ZC_LAPINE_SYNTHESIS_OPEN PACKETVER >= 20181121)
*/
bool clif_synthesisui_open(struct map_session_data *sd, unsigned int itemid) {
#if PACKETVER >= 20160525
#ifdef FEATURE_LAPINE_UI
nullpo_retr(false, sd);
unsigned char buf[8] = { '\0' };
@ -20926,8 +20937,14 @@ bool clif_synthesisui_open(struct map_session_data *sd, unsigned int itemid) {
#endif
}
/*
* Send Lapine Synthesis result to player
* @param sd Player
* @param result @see e_item_synthesis_result
* 0A50 <result>.W (ZC_LAPINE_SYNTHESIS_RESULT)
*/
void clif_synthesisui_result(struct map_session_data *sd, e_item_synthesis_result result) {
#if PACKETVER >= 20160525
#ifdef FEATURE_LAPINE_UI
nullpo_retv(sd);
unsigned char buf[4] = { '\0' };
@ -20949,8 +20966,15 @@ void clif_synthesisui_result(struct map_session_data *sd, e_item_synthesis_resul
#endif
}
/*
* Received selected items from Lapine Synthesis UI
* @param fd
* @param sd
* 0A4F <length>.W <itemid>.W { <index>.W <count>.W }.*4B (CZ_LAPINE_SYNTHESIS_ACK)
* 0A4F <length>.W <itemid>.L { <index>.W <count>.W }.*4B (CZ_LAPINE_SYNTHESIS_ACK PACKETVER >= 20181121)
*/
void clif_parse_lapineSynthesis_submit(int fd, struct map_session_data* sd) {
#if PACKETVER >= 20160525
#ifdef FEATURE_LAPINE_UI
nullpo_retv(sd);
if (pc_istrading(sd)) {
@ -21017,15 +21041,28 @@ void clif_parse_lapineSynthesis_submit(int fd, struct map_session_data* sd) {
#endif
}
/*
* Close Lapine Synthesis UI
* @param fd
* @param sd
* 0A70 CZ_LAPINE_SYNTHESIS_CLOSE
*/
void clif_parse_lapineSynthesis_close(int fd, struct map_session_data* sd) {
#if PACKETVER >= 20160525
#ifdef FEATURE_LAPINE_UI
nullpo_retv(sd);
clif_lapine_ui_reset(sd);
#endif
}
/*
* Open Lapine Upgrade UI
* @param sd Player
* @param itemid ID for upgrade item
* 0AB4 <itemid>.W (ZC_LAPINE_UPGRADE_OPEN)
* 0AB4 <itemid>.L (ZC_LAPINE_UPGRADE_OPEN PACKETVER >= 20181121)
*/
bool clif_lapine_upgrade_open(struct map_session_data *sd, unsigned int itemid) {
#if PACKETVER >= 20160525
#ifdef FEATURE_LAPINE_UI
nullpo_retr(false, sd);
unsigned char buf[8] = { '\0' };
@ -21052,8 +21089,14 @@ bool clif_lapine_upgrade_open(struct map_session_data *sd, unsigned int itemid)
#endif
}
/*
* Send Lapine Upgrade result to player
* @param sd Player
* @param result @see e_item_upgrade_result
* 0AB7 <result>.W (ZC_LAPINE_UPGRADE_RESULT)
*/
void clif_lapine_upgrade_result(struct map_session_data *sd, e_item_upgrade_result result) {
#if PACKETVER >= 20160525
#ifdef FEATURE_LAPINE_UI
nullpo_retv(sd);
unsigned char buf[4] = { '\0' };
@ -21075,8 +21118,15 @@ void clif_lapine_upgrade_result(struct map_session_data *sd, e_item_upgrade_resu
#endif
}
/*
* Received selected item from Lapine Upgrade UI
* @param fd
* @param sd
* 0AB6 <itemid>.W <index>.W (CZ_LAPINE_UPGRADE_ACK)
* 0AB6 <itemid>.L <index>.W (CZ_LAPINE_UPGRADE_ACK PACKETVER >= 20181121)
*/
void clif_parse_lapineUpgrade_submit(int fd, struct map_session_data* sd) {
#if PACKETVER >= 20160525
#ifdef FEATURE_LAPINE_UI
nullpo_retv(sd);
if (pc_istrading(sd)) {
@ -21133,8 +21183,14 @@ void clif_parse_lapineUpgrade_submit(int fd, struct map_session_data* sd) {
#endif
}
/*
* Close Lapine Upgrade UI
* @param fd
* @param sd
* 0AB5 CZ_LAPINE_UPGRADE_CLOSE
*/
void clif_parse_lapineUpgrade_close(int fd, struct map_session_data* sd) {
#if PACKETVER >= 20160525
#ifdef FEATURE_LAPINE_UI
nullpo_retv(sd);
clif_lapine_ui_reset(sd);
#endif

View File

@ -2324,14 +2324,14 @@
#if PACKETVER >= 20160525
parseable_packet(0x0A77,15,clif_parse_camerainfo,0);
packet(0x0A78, 15);
ack_packet(ZC_LAPINE_SYNTHESIS_OPEN, 0x0A4E, 4, 2); // ZC_LAPINE_SYNTHESIS_OPEN W.<packet> W.<itemid>
parseable_packet(0x0A4F, -1, clif_parse_lapineSynthesis_submit, 2, 4, 6, 4); // CZ_LAPINE_SYNTHESIS_ACK W.<packet> W.<length> W.<itemid> { W.<index> W.<count> }.?
ack_packet(ZC_LAPINE_SYNTHESIS_RESULT, 0x0A50, 4, 2); // ZC_LAPINE_SYNTHESIS_RESULT W.<packet> W.<result>
ack_packet(ZC_LAPINE_SYNTHESIS_OPEN, 0x0A4E, 4, 2); // ZC_LAPINE_SYNTHESIS_OPEN
parseable_packet(0x0A4F, -1, clif_parse_lapineSynthesis_submit, 2, 4, 6, 4); // CZ_LAPINE_SYNTHESIS_ACK
ack_packet(ZC_LAPINE_SYNTHESIS_RESULT, 0x0A50, 4, 2); // ZC_LAPINE_SYNTHESIS_RESULT
parseable_packet(0x0A70, 2, clif_parse_lapineSynthesis_close, 0); // CZ_LAPINE_SYNTHESIS_CLOSE
ack_packet(ZC_LAPINE_UPGRADE_OPEN, 0x0AB4, 4, 2); // ZC_LAPINE_UPGRADE_OPEN W.<packet> W.<itemid>
ack_packet(ZC_LAPINE_UPGRADE_OPEN, 0x0AB4, 4, 2); // ZC_LAPINE_UPGRADE_OPEN
parseable_packet(0x0AB5, 2, clif_parse_lapineUpgrade_close, 0); // CZ_LAPINE_UPGRADE_CLOSE
parseable_packet(0x0AB6, 6, clif_parse_lapineUpgrade_submit, 2, 4); // CZ_LAPINE_UPGRADE_ACK W.<packet> W.<itemid> W.<index>
ack_packet(ZC_LAPINE_UPGRADE_RESULT, 0x0AB7, 4, 2); // ZC_LAPINE_UPGRADE_RESULT W.<packet> W.<result>
parseable_packet(0x0AB6, 6, clif_parse_lapineUpgrade_submit, 2, 4); // CZ_LAPINE_UPGRADE_ACK
ack_packet(ZC_LAPINE_UPGRADE_RESULT, 0x0AB7, 4, 2); // ZC_LAPINE_UPGRADE_RESULT
#endif
// 2016-06-01aRagexe
@ -2437,10 +2437,10 @@
// 2018-11-21 Ragexe
#if PACKETVER >= 20181121
ack_packet(ZC_LAPINE_SYNTHESIS_OPEN, 0x0A4E, 6, 2); // ZC_LAPINE_SYNTHESIS_OPEN W.<packet> L.<itemid>
parseable_packet(0x0A4F, -1, clif_parse_lapineSynthesis_submit, 2, 4, 8, 4); // CZ_LAPINE_SYNTHESIS_ACK W.<packet> W.<length> L.<itemid> { W.<index> W.<count> }.?
ack_packet(ZC_LAPINE_UPGRADE_OPEN, 0x0AB4, 6, 2); // ZC_LAPINE_UPGRADE_OPEN W.<packet> L.<itemid>
parseable_packet(0x0AB6, 8, clif_parse_lapineUpgrade_submit, 2, 6); // CZ_LAPINE_UPGRADE_ACK W.<packet> L.<itemid> W.<index>
ack_packet(ZC_LAPINE_SYNTHESIS_OPEN, 0x0A4E, 6, 2); // ZC_LAPINE_SYNTHESIS_OPEN
parseable_packet(0x0A4F, -1, clif_parse_lapineSynthesis_submit, 2, 4, 8, 4); // CZ_LAPINE_SYNTHESIS_ACK
ack_packet(ZC_LAPINE_UPGRADE_OPEN, 0x0AB4, 6, 2); // ZC_LAPINE_UPGRADE_OPEN
parseable_packet(0x0AB6, 8, clif_parse_lapineUpgrade_submit, 2, 6); // CZ_LAPINE_UPGRADE_ACK
#endif
#endif /* CLIF_PACKETDB_HPP */

View File

@ -148,7 +148,7 @@ bool item_synthesis_open(map_session_data *sd, unsigned int itemid) {
}
/*
* Proccess synthesis input from player
* Process synthesis input from player
* @param sd Player who request
* @param itemid ID of synthesis UI
* @param items Item list sent by player
@ -167,6 +167,9 @@ e_item_synthesis_result item_synthesis_submit(map_session_data *sd, unsigned int
if (!info || !info->checkRequirement(sd, items))
return SYNTHESIS_INSUFFICIENT_AMOUNT;
if (!info->deleteRequirement(sd, items))
return SYNTHESIS_INSUFFICIENT_AMOUNT;
if (info->reward)
run_script(info->reward, 0, sd->status.account_id, 0);
@ -175,7 +178,7 @@ e_item_synthesis_result item_synthesis_submit(map_session_data *sd, unsigned int
}
/**
* Loads item_synthesis db
* Loads lapine synthesis database
*/
void item_synthesis_read_db(void)
{
@ -183,7 +186,7 @@ void item_synthesis_read_db(void)
}
/**
* Reloads the achievement database
* Reloads the lapine synthesis database
*/
void item_synthesis_db_reload(void)
{
@ -192,7 +195,7 @@ void item_synthesis_db_reload(void)
}
/**
* Initializes the achievement database
* Initializes the lapine synthesis database
*/
void do_init_item_synthesis(void)
{
@ -200,7 +203,7 @@ void do_init_item_synthesis(void)
}
/**
* Finalizes the achievement database
* Finalizes the lapine synthesis database
*/
void do_final_item_synthesis(void) {
item_synthesis_db.clear();
@ -228,6 +231,11 @@ s_item_synthesis_db::~s_item_synthesis_db()
}
}
/*
* Check if the source for synthesis item is exists
* @param source_id Item ID of source item
* @return true if source exists, false if doesn't
*/
bool s_item_synthesis_db::sourceExists(uint32 source_id)
{
if (this->sources.empty())
@ -239,6 +247,12 @@ bool s_item_synthesis_db::sourceExists(uint32 source_id)
return (source != this->sources.end());
}
/*
* Check all submitted items are valid
* @param sd Player
* @param items Submitted items by player
* @return True if all items are valid
*/
bool s_item_synthesis_db::checkRequirement(map_session_data *sd, const std::vector<s_item_synthesis_list> items)
{
if (items.empty() || items.size() != this->source_needed)
@ -254,7 +268,7 @@ bool s_item_synthesis_db::checkRequirement(map_session_data *sd, const std::vect
if (!(item = &sd->inventory.u.items_inventory[it.index]) || !(id = sd->inventory_data[it.index]))
return false;
if (item->equip || item->expire_time || item->amount < it.amount)
if (item->equip || item->expire_time || item->amount < it.amount || item->identify != 1)
return false;
if (!this->sourceExists(item->nameid))
@ -265,6 +279,25 @@ bool s_item_synthesis_db::checkRequirement(map_session_data *sd, const std::vect
if (item->refine > this->source_refine_max)
return false;
}
return true;
}
/*
* Delete all submitted items for synthesis
* @param sd Player
* @param items Submitted items by player
* @return True if all items are deleted
*/
bool s_item_synthesis_db::deleteRequirement(map_session_data *sd, const std::vector<s_item_synthesis_list> items)
{
if (items.empty() || items.size() != this->source_needed)
return false;
for (auto &it : items) {
if (it.index >= MAX_INVENTORY)
return false;
if (pc_delitem(sd, it.index, it.amount, 0, 0, LOG_TYPE_OTHER) != 0)
return false;
@ -273,6 +306,10 @@ bool s_item_synthesis_db::checkRequirement(map_session_data *sd, const std::vect
return true;
}
/*
* Synthesis items constructor.
* Set default amount to 1
*/
s_item_synthesis_source::s_item_synthesis_source()
: amount(1)
{

View File

@ -43,6 +43,7 @@ struct s_item_synthesis_db {
bool sourceExists(uint32 source_id);
bool checkRequirement(map_session_data *sd, const std::vector<s_item_synthesis_list> items);
bool deleteRequirement(map_session_data *sd, const std::vector<s_item_synthesis_list> items);
};
class ItemSynthesisDatabase : public TypesafeYamlDatabase<uint32, s_item_synthesis_db> {

View File

@ -99,9 +99,9 @@ uint64 ItemUpgradeDatabase::parseBodyNode(const YAML::Node &node) {
}
/*
* Attempt to open synthesis UI for a player
* Attempt to open upgrade UI for a player
* @param sd Open UI for this player
* @param itemid ID of synthesis UI
* @param itemid ID of upgrade UI
* @return True on succes, false on failure
*/
bool item_upgrade_open(map_session_data *sd, unsigned int itemid) {
@ -133,6 +133,13 @@ bool item_upgrade_open(map_session_data *sd, unsigned int itemid) {
return true;
}
/*
* Process selected item from player's input
* @param sd Player
* @param source_itemid Item ID of source item to open Upgrade UI
* @param target_index Index of target item in player's inventory
* @return LAPINE_UPRAGDE_SUCCESS on success. @see e_item_upgrade_result
*/
e_item_upgrade_result item_upgrade_submit(map_session_data *sd, unsigned int source_itemid, uint16 target_index) {
nullpo_retr(LAPINE_UPRAGDE_FAILURE, sd);
@ -146,7 +153,7 @@ e_item_upgrade_result item_upgrade_submit(map_session_data *sd, unsigned int sou
if (target_index >= MAX_INVENTORY || !sd->inventory_data[target_index] || !(it = &sd->inventory.u.items_inventory[target_index]))
return LAPINE_UPRAGDE_FAILURE;
if (it->expire_time || it->equip)
if (it->expire_time || it->equip || it->identify != 1)
return LAPINE_UPRAGDE_FAILURE;
auto info = item_upgrade_db.find(source_itemid);
@ -154,35 +161,7 @@ e_item_upgrade_result item_upgrade_submit(map_session_data *sd, unsigned int sou
if (!info || !info->targetExists(it->nameid) || !info->checkRequirement(it, sd->inventory_data[target_index]))
return LAPINE_UPRAGDE_FAILURE;
pc_setparam(sd, SP_LAST_LAPINE_UPGRADE_ITEM, it->nameid);
pc_setparam(sd, SP_LAST_LAPINE_UPGRADE_INDEX, target_index);
pc_setreg(sd, add_str("@last_lapine_id"), it->nameid);
pc_setreg(sd, add_str("@last_lapine_idx"), target_index);
pc_setreg(sd, add_str("@last_lapine_refine"), it->refine);
pc_setreg(sd, add_str("@last_lapine_identify"), it->identify);
pc_setreg(sd, add_str("@last_lapine_attribute"), it->attribute);
pc_setreg(sd, add_str("@last_lapine_card1"), it->card[0]);
pc_setreg(sd, add_str("@last_lapine_card2"), it->card[1]);
pc_setreg(sd, add_str("@last_lapine_card3"), it->card[2]);
pc_setreg(sd, add_str("@last_lapine_card4"), it->card[3]);
pc_setreg(sd, add_str("@last_lapine_expire"), it->expire_time);
pc_setreg(sd, add_str("@last_lapine_bound"), it->bound);
char unique_id[23];
memset(unique_id, '\0', sizeof(unique_id));
snprintf(unique_id, sizeof(unique_id), "%llu", (unsigned long long)it->unique_id);
pc_setregstr(sd, add_str("@last_lapine_uniqueid$"), unique_id);
int key_opt_id = 0, key_opt_value = 0, key_opt_param = 0;
script_cleararray_pc(sd, "@last_lapine_option_id", (void*)0);
script_cleararray_pc(sd, "@last_lapine_option_value", (void*)0);
script_cleararray_pc(sd, "@last_lapine_option_param", (void*)0);
for (int i = 0; i < MAX_ITEM_RDM_OPT; i++) {
script_setarray_pc(sd, "@last_lapine_option_id", i, (void*)(intptr_t)it->option[i].id, &key_opt_id);
script_setarray_pc(sd, "@last_lapine_option_value", i, (void*)(intptr_t)it->option[i].value, &key_opt_value);
script_setarray_pc(sd, "@last_lapine_option_param", i, (void*)(intptr_t)it->option[i].param, &key_opt_param);
}
info->setPlayerInfo(sd, target_index, it);
if (info->delete_target_onsuccess)
pc_delitem(sd, target_index, 1, 0, 0, LOG_TYPE_OTHER);
@ -195,7 +174,7 @@ e_item_upgrade_result item_upgrade_submit(map_session_data *sd, unsigned int sou
}
/**
* Loads item_upgrade db
* Loads lapine upgrade database
*/
void item_upgrade_read_db(void)
{
@ -203,7 +182,7 @@ void item_upgrade_read_db(void)
}
/**
* Reloads the achievement database
* Reloads the lapine upgrade database
*/
void item_upgrade_db_reload(void)
{
@ -212,7 +191,7 @@ void item_upgrade_db_reload(void)
}
/**
* Initializes the achievement database
* Initializes the lapine upgrade database
*/
void do_init_item_upgrade(void)
{
@ -220,7 +199,7 @@ void do_init_item_upgrade(void)
}
/**
* Finalizes the achievement database
* Finalizes the lapine upgrade database
*/
void do_final_item_upgrade(void) {
item_upgrade_db.clear();
@ -249,6 +228,11 @@ s_item_upgrade_db::~s_item_upgrade_db()
}
}
/*
* Check if submitted target item is valid
* @param target_id Item ID of target item
* @return True if exist, false if not
*/
bool s_item_upgrade_db::targetExists(uint32 target_id)
{
if (this->targets.empty())
@ -257,7 +241,13 @@ bool s_item_upgrade_db::targetExists(uint32 target_id)
return (target != this->targets.end());
}
bool s_item_upgrade_db::checkRequirement(item * it, item_data *id)
/*
* Check if the target item is valid
* @param it Target item
* @param id Item data
* @return True if valid, false if invalid
*/
bool s_item_upgrade_db::checkRequirement(item *it, item_data *id)
{
if (this->source_refine_min > it->refine)
return false;
@ -281,3 +271,38 @@ bool s_item_upgrade_db::checkRequirement(item * it, item_data *id)
return true;
}
/*
* Set variables for player on success upgrade process
* @param sd Player
* @param target_index Index of player's inventory items as upgrade target
* @param it Latest item data
*/
void s_item_upgrade_db::setPlayerInfo(map_session_data * sd, uint16 target_index, item *it)
{
pc_setreg(sd, add_str("@last_lapine_id"), it->nameid);
pc_setreg(sd, add_str("@last_lapine_idx"), target_index);
pc_setreg(sd, add_str("@last_lapine_refine"), it->refine);
pc_setreg(sd, add_str("@last_lapine_attribute"), it->attribute);
pc_setreg(sd, add_str("@last_lapine_card1"), it->card[0]);
pc_setreg(sd, add_str("@last_lapine_card2"), it->card[1]);
pc_setreg(sd, add_str("@last_lapine_card3"), it->card[2]);
pc_setreg(sd, add_str("@last_lapine_card4"), it->card[3]);
pc_setreg(sd, add_str("@last_lapine_bound"), it->bound);
char unique_id[23];
memset(unique_id, '\0', sizeof(unique_id));
snprintf(unique_id, sizeof(unique_id), "%llu", (unsigned long long)it->unique_id);
pc_setregstr(sd, add_str("@last_lapine_uniqueid$"), unique_id);
int key_opt_id = 0, key_opt_value = 0, key_opt_param = 0;
script_cleararray_pc(sd, "@last_lapine_option_id", (void*)0);
script_cleararray_pc(sd, "@last_lapine_option_value", (void*)0);
script_cleararray_pc(sd, "@last_lapine_option_param", (void*)0);
for (int i = 0; i < MAX_ITEM_RDM_OPT; i++) {
script_setarray_pc(sd, "@last_lapine_option_id", i, (void*)(intptr_t)it->option[i].id, &key_opt_id);
script_setarray_pc(sd, "@last_lapine_option_value", i, (void*)(intptr_t)it->option[i].value, &key_opt_value);
script_setarray_pc(sd, "@last_lapine_option_param", i, (void*)(intptr_t)it->option[i].param, &key_opt_param);
}
}

View File

@ -30,6 +30,7 @@ struct s_item_upgrade_db {
bool targetExists(uint32 target_id);
bool checkRequirement(item *it, item_data *id);
void setPlayerInfo(map_session_data *sd, uint16 target_index, item *it);
};
class ItemUpgradeDatabase : public TypesafeYamlDatabase<uint32, s_item_upgrade_db> {

View File

@ -436,7 +436,6 @@ enum _sp {
SP_ROULETTE_GOLD = 130,
SP_CASHPOINTS, SP_KAFRAPOINTS,
SP_PCDIECOUNTER, SP_COOKMASTERY,
SP_LAST_LAPINE_UPGRADE_ITEM, SP_LAST_LAPINE_UPGRADE_INDEX,
// Mercenaries
SP_MERCFLEE=165, SP_MERCKILLS=189, SP_MERCFAITH=190,

View File

@ -8519,8 +8519,6 @@ int pc_readparam(struct map_session_data* sd,int type)
#else
val = sd->castrate; break;
#endif
case SP_LAST_LAPINE_UPGRADE_ITEM: val = sd->last_lapine_upgrade_item; break;
case SP_LAST_LAPINE_UPGRADE_INDEX: val = sd->last_lapine_upgrade_index; break;
default:
ShowError("pc_readparam: Attempt to read unknown parameter '%d'.\n", type);
return -1;
@ -8744,12 +8742,6 @@ bool pc_setparam(struct map_session_data *sd,int type,int val)
sd->cook_mastery = val;
pc_setglobalreg(sd, add_str(COOKMASTERY_VAR), sd->cook_mastery);
return true;
case SP_LAST_LAPINE_UPGRADE_ITEM:
sd->last_lapine_upgrade_item = val;
return true;
case SP_LAST_LAPINE_UPGRADE_INDEX:
sd->last_lapine_upgrade_index = val;
return true;
default:
ShowError("pc_setparam: Attempted to set unknown parameter '%d'.\n", type);
return false;

View File

@ -750,8 +750,6 @@ struct map_session_data {
unsigned short instance_id;
short setlook_head_top, setlook_head_mid, setlook_head_bottom, setlook_robe; ///< Stores 'setlook' script command values.
unsigned int last_lapine_box;
unsigned int last_lapine_upgrade_item;
uint8 last_lapine_upgrade_index;
#if PACKETVER >= 20150513
uint32* hatEffectIDs;

View File

@ -24416,12 +24416,14 @@ BUILDIN_FUNC(getvariableofinstance)
* synthesisui(<id>);
*/
BUILDIN_FUNC(synthesisui) {
#ifdef FEATURE_LAPINE_UI
TBL_PC *sd;
if (!script_charid2sd(3, sd)) {
script_pushint(st, 0);
return SCRIPT_CMD_FAILURE;
}
script_pushint(st, item_synthesis_open(sd, script_getnum(st, 2)));
#endif
return SCRIPT_CMD_SUCCESS;
}
@ -24429,12 +24431,14 @@ BUILDIN_FUNC(synthesisui) {
* upgradeui(<id>);
*/
BUILDIN_FUNC(upgradeui) {
#ifdef FEATURE_LAPINE_UI
TBL_PC *sd;
if (!script_charid2sd(3, sd)) {
script_pushint(st, 0);
return SCRIPT_CMD_FAILURE;
}
script_pushint(st, item_upgrade_open(sd, script_getnum(st, 2)));
#endif
return SCRIPT_CMD_SUCCESS;
}

View File

@ -526,8 +526,6 @@
export_parameter(KAFRAPOINT_VAR, SP_KAFRAPOINTS);
export_parameter(PCDIECOUNTER_VAR, SP_PCDIECOUNTER);
export_parameter(COOKMASTERY_VAR, SP_COOKMASTERY);
export_parameter("LapineUpgradeItem", SP_LAST_LAPINE_UPGRADE_ITEM);
export_parameter("LapineUpgradeIndex", SP_LAST_LAPINE_UPGRADE_INDEX);
export_constant2("bMaxHP",SP_MAXHP);
export_constant2("bMaxSP",SP_MAXSP);