コード例 #1
0
 void onDamaged(ServerPlayer *target, const DamageStruct &damage) const
 {
     Room *room = target->getRoom();
     for (int i = 1; i <= damage.damage; i++) {
         ServerPlayer *current = room->getCurrent();
         if (!current || current->isDead() || current->getPhase() == Player::NotActive)
             break;
         if (room->askForSkillInvoke(target, objectName(), QVariant::fromValue(current))) {
             room->broadcastSkillInvoke(objectName());
             room->addPlayerMark(current, "@hengjiang");
         }
     }
 }
コード例 #2
0
ファイル: maneuvering.cpp プロジェクト: ubun/SakuraSlash
void Mazinka::onUninstall(ServerPlayer *player) const{
    if(player->isAlive()){
        Room *room = player->getRoom();
        room->killPlayer(room->getCurrent());
    }
}