Package npc.model.residences.clanhall

Examples of npc.model.residences.clanhall.RainbowYetiInstance$GenerateTask


   * @param character Creature
   */
  @Override
  public void onEvtSeeSpell(Skill skill, Creature character)
  {
    final RainbowYetiInstance actor = (RainbowYetiInstance) getActor();
    final ClanHallMiniGameEvent miniGameEvent = actor.getEvent(ClanHallMiniGameEvent.class);
    if (miniGameEvent == null)
    {
      return;
    }
    if (!character.isPlayer())
    {
      return;
    }
   
    final Player player = character.getPlayer();
   
    CMGSiegeClanObject siegeClan = null;
    final List<CMGSiegeClanObject> attackers = miniGameEvent.getObjects(SiegeEvent.ATTACKERS);
    for (CMGSiegeClanObject $ : attackers)
    {
      if ($.isParticle(player))
      {
        siegeClan = $;
      }
    }
   
    if (siegeClan == null)
    {
      return;
    }
   
    final int index = attackers.indexOf(siegeClan);
    int warIndex = Integer.MIN_VALUE;
   
    RainbowGourdInstance gourdInstance = null;
    RainbowGourdInstance gourdInstance2 = null;
    switch (skill.getId())
    {
      case 2240: // nectar
        if (Rnd.chance(90))
        {
          gourdInstance = getGourd(index);
          if (gourdInstance == null)
          {
            return;
          }
         
          gourdInstance.doDecrease(player);
        }
        else
        {
          actor.addMob(NpcUtils.spawnSingle(35592, actor.getX() + 10, actor.getY() + 10, actor.getZ(), 0));
        }
        break;
      case 2241: // mineral water
        warIndex = rndEx(attackers.size(), index);
        if (warIndex == Integer.MIN_VALUE)
View Full Code Here

TOP

Related Classes of npc.model.residences.clanhall.RainbowYetiInstance$GenerateTask

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.