99Max综合娱乐网站(旧版)

 找回密码
 立即注册
查看: 804|回复: 0

[共享] AE-go版本的吃书学技能的实装资料

[复制链接]

升级   21.33%

发表于 2010-6-21 16:04:06 | 显示全部楼层 |阅读模式
老资料了。。。。有的人 就打个酱油。。路过下 。。。 没有的 自己测试了哈。。。。

Index: data/static_data/items/item_effects.xml <-----------------编辑这个文件
===================================================================
<item>
<name>Robust Blow I</name>
<item_id>169500003</item_id>
<type>2</type>
<deletable>0</deletable>
<value>165</value>
<value2>1</value2>
<timer_end>0</timer_end>
<timer_interval>0</timer_interval>
<abnormal_effect_id>0</abnormal_effect_id>
</item>

技能书的ID自己去17173的数据DB里找啦 HOHO~~格式是这样了..


Index: src/com/aionemu/gameserver/itemengine/handlers/TeachSkillBook.java <--------添加这个文件路径自己看咯 >.,<
===================================================================

* This file is part of aion-unique <www.aion-unique.com>.
*
* aion-unique 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.
*
* aion-unique 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 aion-unique. If not, see <http://www.gnu.org/licenses/>.
*/
package com.aionemu.gameserver.itemengine.handlers;

import com.aionemu.gameserver.model.gameobjects.player.Player;
import org.apache.log4j.Logger;


/**
* @author Avol
*
*/

public class TeachSkillBook
{

private static final Logger log = Logger.getLogger(TeachSkillBook.class);

private static TeachSkillBook instance = new TeachSkillBook();

public void execute(final int skillid, int levelid, final Player player) {

player.learnSkill(skillid, levelid);
//log.info(\"Player learn spell : \" + skillid + \", rank :\" + levelid);
}
}

添加好了保存哟...记得检查下是否有报错...


index: src/com/aionemu/gameserver/itemengine/ItemActionSelecter.java <--------编辑这个文件
==================================================================
import org.apache.log4j.Logger;

import com.aionemu.gameserver.itemengine.handlers.HpItem;
import com.aionemu.gameserver.itemengine.handlers.TeachSkillBook; <-----------------增加的部分
import com.aionemu.gameserver.itemengine.loader.ItemTemplateLoader;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.network.aion.serverpackets.SM_ITEM_USAGE_ANIMATION;

找到下面的代码:
effect.execute(value, timerEnd, timerInterval, abnormal_id, player);
PacketSendUtility.broadcastPacket(player, new SM_ITEM_USAGE_ANIMATION(player.getObjectId(), itemObjId, itemId), true);
}
else if (type==2)
{
TeachSkillBook effect = new TeachSkillBook();
effect.execute(value,value2, player);
PacketSendUtility.broadcastPacket(player, new SM_ITEM_USAGE_ANIMATION(player.getObjectId(), itemObjId, itemId), true);
}




else
{
PacketSendUtility.broadcastPacket(player, new SM_ITEM_USAGE_ANIMATION(player.getObjectId(), itemObjId, itemId), true);

编辑完保存,同样记得查错...


Index: src/com/aionemu/gameserver/model/gameobjects/player/Player.java <----------编辑这个文件
===================================================================
package com.aionemu.gameserver.model.gameobjects.player;

import com.aionemu.commons.database.dao.DAOManager; <-----------增加部分
import com.aionemu.gameserver.dao.PlayerSkillListDAO; <--------增加部分

import com.aionemu.commons.callbacks.Enhancable;
import com.aionemu.gameserver.controllers.PlayerController;
import com.aionemu.gameserver.model.Gender;
import com.aionemu.gameserver.model.templates.stats.PlayerStatsTemplate;
import com.aionemu.gameserver.network.aion.AionConnection;
import com.aionemu.gameserver.network.aion.serverpackets.SM_PLAYER_STATE;
import com.aionemu.gameserver.network.aion.serverpackets.SM_SKILL_LIST; <--------增加部分
import com.aionemu.gameserver.services.PlayerService;
import com.aionemu.gameserver.utils.PacketSendUtility;

找到以下代码:

this.skillList = skillList;
}

public void learnSkill(int skillId, int skillLevel)
{
SkillList listskill = this.getSkillList();
listskill.addSkill(skillId, skillLevel);
DAOManager.getDAO(PlayerSkillListDAO.class).addSkill(this.getCommonData().getPlayerObjId(), skillId, skillLevel);
PacketSendUtility.sendPacket(this, new SM_SKILL_LIST(this));
}


以上为增加部分,自己查错....
/**
* Gets this players Friend List
* @return



OK....以上为吃书学技能的代码 大家自己测试吧..........good luck!

以上是增加部分,检查关系,别弄错......
温馨提示:
1. 本站模拟器源于网络,经 99Max.mE 二次开发,仅供个人学习娱乐使用,切勿用于商业用途,否则后果自负!
2. 如需更好体验游戏内容,请前往官方游戏!不具备合法的运营模式,都是强盗,请勿擅自搭建私服!
3. 如本站内容有侵犯您的权益,请发送信息至QQ:372607220 或 EMAIL:372607220@qq.com ,我们会及时删除。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|99Max综合娱乐网站(旧版) ( 沪ICP备11024206号-1 )

GMT+8, 2025-6-8 20:30 , Processed in 0.185679 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表