Example #1
0
 private static function checkKillProtection(SR_Player $player, SR_Party $ep)
 {
     $p = $player->getParty();
     // 		$ep = $p->getEnemyParty();
     if (SR_KillProtect::isKillProtectedRealNPCParty($ep)) {
         return false;
     }
     if (SR_KillProtect::isKillProtectedPartyLevel($p, $ep, $player, true)) {
         return false;
     }
     if (false !== ($time = SR_KillProtect::isKillProtectedParty($p, $ep))) {
         $wait = GWF_Time::humanDuration($time - Shadowrun4::getTime());
         self::rply($player, '1060', array($wait));
         // 			$player->message(sprintf('You cannot attack this party again. Please wait %s.', $wait));
         return false;
     }
     SR_BadKarma::onFight($player, $ep);
     return true;
 }
Example #2
0
 private static function refreshCache()
 {
     self::$CACHE = self::table(__CLASS__)->selectColumn('CONCAT(sr4kp_killer,":",sr4kp_victim,":",sr4kp_srtime)');
 }
Example #3
0
 public function gotKilledByHuman(SR_Player $killer)
 {
     SR_Bounty::onKilledByHuman($killer, $this);
     if (false === SR_KillProtect::isKillProtected($killer, $this)) {
         SR_KillProtect::onKilled($killer, $this);
     }
     if (false === SR_KillProtect::isKillProtectedLevel($killer, $this)) {
         $this->looseItem($killer);
     }
     // 		return $this->gotKilledByNPC($killer);
 }