PR

【2/4】レイドランキングの報酬テーブル対応 #1523

wada opened this at 2022-01-31T18:37:49; closed

Description

opened by wada at 2022-01-31T18:37:49; updated 2022-02-07T09:46:40

概要

レイドイベントのランキング報酬をテーブル参照に切り替え
configクラスのランキング設定を削除
Main.tpl のコメントアウト箇所は使用していないので削除

報酬系の定数は専用クラス(RewardConst)を作成して管理
ランキング報酬の処理はイベントで共通なので、traitに実装しmodelクラスからuseして使用

管理画面レイド仕様のランキング報酬、限定カードをテーブル参照に対応

影響箇所

  • 報酬配布スクリプト
  • 討伐後のランキング報酬表示

<img src="https://git.dev.d-es.co.jp/gitbucket/jolly/jr-web/_attached/1643621418747kkhjV3OOc3" width="300">

ブランチ

web: raid_ranking_reward
db: raid_ranking_reward

追加テーブル

  • master_event_ranking_reward
  • master_event_ranking_reward_item

テスト方法、確認した内容

tool_event_raid_present.inc をテーブル参照とconfig参照でそれぞれ実行し比較
各ランク帯のデータに偽装して、討伐後表示を確認

wada add_label at 2022-01-31T19:29:02: レビュー待ち
wada change_title at 2022-01-31T19:29:54: [WIP]レイドランキングの報酬テーブル対応 【2/4】レイドランキングの報酬テーブル対応

Comment

#17006 by wada at 2022-01-31T19:30:05; updated 2022-01-31T19:30:05

@iwamoto @kouho
レビューお願いします。

Comment

#17024 by kouho at 2022-02-01T15:58:32; updated 2022-02-02T09:59:33

@wada
確認に時間がかかりそうです。
ひとまず以下確認をお願いいたします。

test_raid_event.php
test_ranking_reward関数にも以下を追加していただけないでしょうか?

$str .= "管理画面から確認してください。\n\n";
return $str;

m_raid_event_spec.inc
~~限定カードの性別が表示されていませんでしたので確認をお願いいたします。~~
cpanelブランチでは$_df['SEX_NAME']が存在しましたのでこちらは大丈夫でした。
$ret[$key]['card_sex_text'] = $_df['SEX_NAME'][$card['card_sex']];

$ret[$key]['card_sex_text'] = S_GetCardSex($card['card_sex'], "", 0);

ランキング報酬の数の表示が消えていました。
変数名のitem_が抜けているようですので確認お願いいたします。
こちら修正すると、とくぱんの×が2重になりますがそちらも修正していただければ幸いです。

if (item.type == 14 || item.type == 1) {
   clone.querySelector('.ranking_reward' + cnt).textContent += '×' + item.count;
}

if (item.item_type == 14 || item.item_type == 1) {
   clone.querySelector('.ranking_reward' + cnt).textContent += '×' + item.item_count;
}

Comment

#17025 by wada at 2022-02-02T11:28:29; updated 2022-02-02T11:28:29

@kouho
> test_ranking_reward関数にも以下を追加していただけないでしょうか?

確認箇所が重複するため、ファイルを削除しました。

> 限定カードの性別が表示されていませんでしたので確認をお願いいたします。
> ランキング報酬の数の表示が消えていました。

それぞれ対応しました。
設定ミスを防ぐため、テーブルのitem_nameには個数は含めず、プログラム側で個数を追記します。

Comment

#17029 by kouho at 2022-02-02T15:08:53; updated 2022-02-02T15:09:15

@wada
対応ありがとうございます。修正確認しました。以下の確認もお願いいたします。

  • レイドのランキング報酬画面

以下の表示が消えていました。
!スクリーンショット 2022-02-02 14

  • レイド討伐後の画面

ここの表示はどうしましょう。確かに元々の限定カード6枚!!の表示もベストではなかったのですが、
現在の12枚の表示も間違っていないけどという状態です。

修正前
!スクリーンショット 2022-02-02 14

修正後
!スクリーンショット 2022-02-02 14

  • Ranking_reward_trait.inc

get_ranking_by_rank関数について確認をお願いいたします。
イベントに全く参加していない状態のアカウントでレイドモンスター出現の画面に行くとエラーになるように見えます。
以下修正案です。

$rewards = $this->get_ranking_all($event_type, $event_no, $reward_type);

$rewards = $this->get_ranking_all($event_type, $event_no, $reward_type);
$reward_keys = array_keys($rewards);
$ret['reward_rank'] = $next_rank ? max($reward_keys) : 0 ;

$ret['reward_rank'] = $next_rank ? $next_rank : max($reward_keys);

Comment

#17034 by wada at 2022-02-02T16:10:26; updated 2022-02-02T16:10:26

ランキングページのデバッグ対応が残ったままだったので修正しました。

ランキング報酬の短縮名を調整しました。(ベストの表示はないので、目玉の内容だけ表示します)
<img src="https://git.dev.d-es.co.jp/gitbucket/jolly/jr-web/_attached/1643785747656XlgUOjs0Z5" width="300">

Comment

#17035 by wada at 2022-02-02T16:18:26; updated 2022-02-02T16:19:25

@kouho
参加賞のテーブル設定が抜けていたので、dbブランチ更新お願いします。

Comment

#17044 by kouho at 2022-02-02T17:23:16; updated 2022-02-02T17:23:16

@wada
ありがとうございます。確認しました。こちらで大丈夫だと思います。

kouho add_label at 2022-02-02T17:23:21: 皇甫 LGTM

Comment

#17056 by iwamoto at 2022-02-03T11:14:34; updated 2022-02-03T11:14:34

@wada
確認しました。こちらで問題ないと思います。

iwamoto add_label at 2022-02-03T11:14:39: 岩本 LGTM
wada merge at 2022-02-07T09:46:40: 【2/4】レイドランキングの報酬テーブル対応
wada close at 2022-02-07T09:46:40: Close

Commit range

base4cce3ebf685d48114decb08c25cfabeb255e5e30
head50e65ada07d799db1206ba547332354d1dc1256c
base branchjolly/jr-web:develop
head branchjolly/jr-web:raid_ranking_reward

View commits

Commit details are loaded from Git when a dynamic archive server is running, or can be embedded with --include-commits.
Files changed21 filesView patch
statusfile
modifiedcpanel_html/template/m_raid_event_spec.tpl
addedlib/class/const/RewardConst.class.php
modifiedlib/conf/class/RaidMonsterConfig.class.php
modifiedlib/conf/define.inc
modifiedlib/conf/define_y.inc
modifiedlib/cpanel/m_raid_event_spec.inc
modifiedlib/exec/tool_event_raid_present.inc
modifiedlib/models/Raid_reward.php
addedlib/models/Ranking_reward_trait.php
addedlib/models/dao/master_event_ranking_reward.php
modifiedlib/models/dao/master_event_reward.php
modifiedlib/public/Raid-Default.inc
modifiedlib/public/Raid-Ranking.inc
modifiedlib/public/Raid-Vs.inc
modifiedpublic_html/template/Main.tpl
modifiedpublic_html/template/Mission.tpl
modifiedpublic_html/template/Raid-DefaultMedal.tpl
modifiedpublic_html/template/Raid-GetMedal.tpl
modifiedpublic_html/template/Raid-Ranking.tpl
modifiedpublic_html/template/parts_raid_default.tpl
deletedtool/event/test_raid_event.php
Patch body is stored as a separate file to keep this page lightweight.