• R/O
  • SSH
  • HTTPS

jinrousiki: Commit


Commit MetaInfo

Revision2566 (tree)
Time2019-12-31 21:45:14
Authorumethyl

Log Message

Role::LotteryLovers()

Change Summary

Incremental Difference

--- trunk/include/role/altair_cupid.php (revision 2565)
+++ trunk/include/role/altair_cupid.php (revision 2566)
@@ -19,7 +19,10 @@
1919 public function LotteryLovers() {
2020 $target_id = Lottery::Get(DB::$USER->GetRoleID($this->role)); //対象彦星を抽選
2121 foreach ($this->GetLoversList() as $id) { //恋人一覧から検索
22- if ($id == $target_id) continue;
22+ if ($id == $target_id) {
23+ continue;
24+ }
25+
2326 $user = DB::$USER->ByID($id);
2427 foreach ($user->GetPartner('lovers') as $cupid_id) {
2528 if ($cupid_id == $target_id) {
--- trunk/include/role/exchange_angel.php (revision 2565)
+++ trunk/include/role/exchange_angel.php (revision 2566)
@@ -20,7 +20,10 @@
2020
2121 //魂移使が打った恋人の情報を収集 (Reparse() 対策で GetRoleUser() は使わない)
2222 foreach (DB::$USER->Get() as $user) {
23- if ($user->IsDummyBoy() || ! $user->IsRole('lovers')) continue;
23+ if ($user->IsDummyBoy() || false === $user->IsRole('lovers')) {
24+ continue;
25+ }
26+
2427 foreach ($user->GetPartner('lovers') as $cupid_id) {
2528 if (DB::$USER->ByID($cupid_id)->IsRole($this->role)) {
2629 $angel_list[$cupid_id][] = $user->id;
@@ -35,7 +38,10 @@
3538 //Text::p($lovers_list, '◆lovers: 1st');
3639
3740 foreach ($angel_list as $id => $lovers_stack) { //抽選処理
38- if (isset($fix_list[$id])) continue;
41+ if (isset($fix_list[$id])) {
42+ continue;
43+ }
44+
3945 $duplicate_stack = [];
4046 //Text::p($fix_list, '◆fix_angel:'. $id);
4147 foreach ($lovers_stack as $lovers_id) {
@@ -46,6 +52,7 @@
4652 }
4753 }
4854 //Text::p($duplicate_stack, '◆duplicate:' . $id);
55+
4956 $duplicate_list = array_keys($duplicate_stack);
5057 if (count($duplicate_list) > 1) {
5158 $exchange_list[] = Lottery::Get($duplicate_list);
--- trunk/include/role/letter_cupid.php (revision 2565)
+++ trunk/include/role/letter_cupid.php (revision 2566)
@@ -13,7 +13,9 @@
1313 $stack = [];
1414 foreach ($this->GetLoversList() as $id) { //恋人一覧から検索
1515 $cupid_stack = DB::$USER->ByID($id)->GetPartner('lovers');
16- if (count($cupid_stack) > 1) continue; //単独カップルのみ
16+ if (count($cupid_stack) > 1) { //単独カップルのみ
17+ continue;
18+ }
1719
1820 $cupid_id = array_shift($cupid_stack);
1921 if (in_array($cupid_id, $cupid_list)) {
@@ -23,7 +25,9 @@
2325 //Text::p($stack, "◆{$this->role} / Lovers");
2426
2527 foreach ($stack as $list) {
26- if (count($list) != $this->GetVoteNightNeedCount()) continue; //完全単独カップルのみ
28+ if (count($list) != $this->GetVoteNightNeedCount()) { //完全単独カップルのみ
29+ continue;
30+ }
2731
2832 foreach (Lottery::GetList($list) as $key => $id) {
2933 $user = DB::$USER->ByID($id);
Show on old repository browser