Freya World
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Freya World

Open Source Java Project
 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

 

 Patch skill to transform GuardsoftheDawn ( for quest 7 signes )

Go down 
3 posters
AuthorMessage
killkool




Posts : 7
Join date : 2011-06-14

Patch skill to transform GuardsoftheDawn ( for quest 7 signes ) Empty
PostSubject: Patch skill to transform GuardsoftheDawn ( for quest 7 signes )   Patch skill to transform GuardsoftheDawn ( for quest 7 signes ) Icon_minitimeFri Jun 17, 2011 5:18 am

My First Contribution.

GuardsoftheDawn have a problem, I have add skill "Guard's Ambush"

Modifie GuardsoftheDawn.java

Code:
/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */

package transformations;

import freya.world.gameserver.datatables.SkillTable;
import freya.world.gameserver.instancemanager.TransformationManager;
import freya.world.gameserver.model.L2Transformation;

public class GuardsoftheDawn extends L2Transformation
{
   private static final int[] SKILLS = { 5491, 963, 619, };
   
   public GuardsoftheDawn()
   {
      // id, colRadius, colHeight
      super(113, 8, 23.5);
   }
   
   @Override
   public void onTransform()
   {
      if (getPlayer().getTransformationId() != 113 || getPlayer().isCursedWeaponEquipped())
         return;
      
      transformedSkills();
   }
   
   public void transformedSkills()
   {
      // Decrease Bow/Crossbow Attack Speed
      getPlayer().addSkill(SkillTable.getInstance().getInfo(5491, 1), false);
      // Hide
      getPlayer().addSkill(SkillTable.getInstance().getInfo(963, 1), false);
      // Transform Dispel
      getPlayer().addSkill(SkillTable.getInstance().getInfo(619, 1), false);
      
      getPlayer().setTransformAllowedSkills(SKILLS);
   }
   
   @Override
   public void onUntransform()
   {
      removeSkills();
   }
   
   public void removeSkills()
   {
      // Decrease Bow/Crossbow Attack Speed
      getPlayer().removeSkill(SkillTable.getInstance().getInfo(5491, 1), false);
      // Hide
      getPlayer().removeSkill(SkillTable.getInstance().getInfo(963, 1), false);
      // Transform Dispel
      getPlayer().removeSkill(SkillTable.getInstance().getInfo(619, 1), false);
      
      getPlayer().setTransformAllowedSkills(EMPTY_ARRAY);
   }
   
   public static void main(String[] args)
   {
      TransformationManager.getInstance().registerTransformation(new GuardsoftheDawn());
   }
}
Back to top Go down
Willow
Admin
Willow


Posts : 113
Join date : 2011-05-24

Patch skill to transform GuardsoftheDawn ( for quest 7 signes ) Empty
PostSubject: Re: Patch skill to transform GuardsoftheDawn ( for quest 7 signes )   Patch skill to transform GuardsoftheDawn ( for quest 7 signes ) Icon_minitimeFri Jun 17, 2011 5:39 pm

Can you make a diff patch please?
Forum text tag dosnt keep <tab> formating.

Someone test please.
Back to top Go down
panua




Posts : 3
Join date : 2011-05-29

Patch skill to transform GuardsoftheDawn ( for quest 7 signes ) Empty
PostSubject: Re: Patch skill to transform GuardsoftheDawn ( for quest 7 signes )   Patch skill to transform GuardsoftheDawn ( for quest 7 signes ) Icon_minitimeSat Jun 18, 2011 4:26 am

I tested it and the transformation skill is working!
Back to top Go down
Willow
Admin
Willow


Posts : 113
Join date : 2011-05-24

Patch skill to transform GuardsoftheDawn ( for quest 7 signes ) Empty
PostSubject: Re: Patch skill to transform GuardsoftheDawn ( for quest 7 signes )   Patch skill to transform GuardsoftheDawn ( for quest 7 signes ) Icon_minitimeSat Jun 18, 2011 4:28 am

Commited at http://trac.assembla.com/FreyaWorld/changeset/141
Back to top Go down
Sponsored content





Patch skill to transform GuardsoftheDawn ( for quest 7 signes ) Empty
PostSubject: Re: Patch skill to transform GuardsoftheDawn ( for quest 7 signes )   Patch skill to transform GuardsoftheDawn ( for quest 7 signes ) Icon_minitime

Back to top Go down
 
Patch skill to transform GuardsoftheDawn ( for quest 7 signes )
Back to top 
Page 1 of 1
 Similar topics
-
» Quest: _10287_StoryOfThoseLeft
» Enter Hellbound Without Quest
» Cencel Skill Chance doesn"t work
» Can i request 4 fix skill?
» Restrict skill in safe zone

Permissions in this forum:You cannot reply to topics in this forum
Freya World :: Development :: User Contributions-
Jump to: