Advertisement
ChristianMacedo

Alterar o Tamanho da Arma na mão do Dwarf aCis

Jul 30th, 2024
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.01 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P aCis_gameserver
  3. diff --git config/aCis/Personagem.properties
  4. index 7ac3169..3932b7b 100644
  5. --- config/aCis/Personagem.properties
  6. +++ config/aCis/Personagem.properties
  7. @@ -2,40 +2,49 @@
  8. # Spawn New Character
  9. #===============================================================
  10. # Custom starting spawn location.
  11. # Giran = 83400,148104,-3400
  12. AllowCustomSpawnLocation = False
  13. CustomSpawnLocation = 83400,148104,-3400
  14.  
  15. # Custom title on new chars.
  16. AllowNewCharTitle = False
  17. NewCharTitle = New Char
  18.  
  19. # Custom Level New Character.
  20. StartingLevelCharacter = 1
  21.  
  22. #===============================================================
  23. # Comprar Varias Armas hero no Monumento Hero?
  24. #===============================================================
  25. # Retail = False
  26. BuyHeroWeaponsAll = True
  27.  
  28. +#==========================================================
  29. +# Size Weapon Dwarf
  30. +#==========================================================
  31. +# Ligar mod de alterar tamanho da weapons por dwarf?
  32. +EnableDwarfWeaponSize = True
  33. +
  34. +# Tamanho da arma no dwarf, Boa tamanho 6
  35. +SizeWeaponDwarf = 6
  36.  
  37. #===============================================================
  38. # Elf Village To Village for PvP Zone
  39. #===============================================================
  40. # Quando esta ativado, as class Elf e dark Elf, elas irao para Elf Village, se tiverem numa zona PvP Na Region Elf Village.
  41. # Retail = False
  42. EnableAllClassElfToVillage = False
  43.  
  44. #===============================================================
  45. # Enable Cancel Attack for Bow
  46. #===============================================================
  47. # Quando essa opsao esta ativa, o personagem pode se interrompido seu atk usando bow
  48. # Server PvP Deixe sempre False, principalmente para uso perfeito do Auto Farm.
  49. # Chance Retail quando ta ativo e 15%
  50. AltGameCancelByBow = False
  51.  
  52. #===============================================================
  53. # Enable Cancel Attack for CastSpeed
  54. #===============================================================
  55. # Quando essa opsao esta ativa, o personagem pode se interrompido seu CastSpeed quando leva dano.
  56. # Server PvP Deixe sempre False, principalmente para uso perfeito do Auto Farm.
  57. diff --git java/net/sf/l2j/Config.java
  58. index db55846..833ee22 100644
  59. --- java/net/sf/l2j/Config.java
  60. +++ java/net/sf/l2j/Config.java
  61. @@ -76,40 +76,42 @@
  62. public static final String PVP_EVENT_FILE = "./config/aCis/Eventos/PvPEvent.properties";
  63. public static final String MISSION_FILE = "./config/aCis/Eventos/Mission.properties";
  64. public static final String BOSS_SOLO_FILE = "./config/aCis/Eventos/SoloBoss.properties";
  65. // --------------------------------------------------
  66. // Clans settings
  67. // --------------------------------------------------
  68.  
  69. /** Clans */
  70. public static int ALT_CLAN_JOIN_DAYS;
  71. public static int ALT_CLAN_CREATE_DAYS;
  72. public static int ALT_CLAN_DISSOLVE_DAYS;
  73. public static int ALT_ALLY_JOIN_DAYS_WHEN_LEAVED;
  74. public static int ALT_ALLY_JOIN_DAYS_WHEN_DISMISSED;
  75. public static int ALT_ACCEPT_CLAN_DAYS_WHEN_DISMISSED;
  76. public static int ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED;
  77. public static int ALT_MAX_NUM_OF_CLANS_IN_ALLY;
  78. public static int ALT_CLAN_MEMBERS_FOR_WAR;
  79. public static int ALT_CLAN_WAR_PENALTY_WHEN_ENDED;
  80. public static boolean ALT_MEMBERS_CAN_WITHDRAW_FROM_CLANWH;
  81. public static boolean REMOVE_CASTLE_CIRCLETS;
  82. + public static boolean ENABLE_DWARF_WEAPON_SIZE;
  83. + public static int SIZE_WEAPON_DWARF;
  84.  
  85. public static boolean USE_SAY_FILTER;
  86. public static String CHAT_FILTER_CHARS;
  87. public static ArrayList<String> FILTER_LIST = new ArrayList<>();
  88. public static int CHAT_FILTER_PUNISHMENT_PARAM1;
  89. public static int CHAT_FILTER_PUNISHMENT_PARAM2;
  90. public static int CHAT_FILTER_PUNISHMENT_PARAM3;
  91. public static String CHAT_FILTER_PUNISHMENT;
  92. public static String INTERFACE_KEY;
  93. public static int VERIFICATION_TIME;
  94.  
  95. /** Variaveis Boss Solo */
  96. public static int NPC_GK_SOLOBOSS;
  97. public static int[] NPC_GK_BOSS_SOLO_X = new int[3];
  98. public static boolean SOLO_BOSS_EVENT;
  99. public static String[] SOLO_BOSS_EVENT_INTERVAL_BY_TIME_OF_DAY;
  100. public static int SOLO_RAID_REWARDS_RANGE;
  101. public static int SOLO_BOSS_ID_ONE;
  102. public static boolean SCREN_MSG_BOSS_SOLO;
  103. public static int BOSS_ID_ONE_X;
  104. @@ -3602,40 +3604,42 @@
  105. CRYSTAL_ENCHANT_MIN = Integer.parseInt(enchant.getProperty("CrystalEnchantMin", "20"));
  106. CRYSTAL_ENCHANT_WEAPON_MAX = Integer.parseInt(enchant.getProperty("CrystalEnchantWeaponMax", "25"));
  107. CRYSTAL_ENCHANT_ARMOR_MAX = Integer.parseInt(enchant.getProperty("CrystalEnchantArmorMax", "25"));
  108. CRYSTAL_ENCHANT_JEWELRY_MAX = Integer.parseInt(enchant.getProperty("CrystalEnchantJewelryMax", "25"));
  109.  
  110. DONATOR_ENCHANT_MIN = Integer.parseInt(enchant.getProperty("DonatorEnchantMin", "20"));
  111. DONATOR_ENCHANT_WEAPON_MAX = Integer.parseInt(enchant.getProperty("DonatorEnchantWeaponMax", "25"));
  112. DONATOR_ENCHANT_ARMOR_MAX = Integer.parseInt(enchant.getProperty("DonatorEnchantArmorMax", "25"));
  113. DONATOR_ENCHANT_JEWELRY_MAX = Integer.parseInt(enchant.getProperty("DonatorEnchantJewelryMax", "25"));
  114. DONATOR_DECREASE_ENCHANT = Boolean.valueOf(enchant.getProperty("DonatorDecreaseEnchant", "false")).booleanValue();
  115. BLESSED_DECREASE_ENCHANT = Boolean.valueOf(enchant.getProperty("BlessedDecreaseEnchant", "false")).booleanValue();
  116. SYSTEM_ENCHANT_BLESS_REDUCED = Boolean.parseBoolean(enchant.getProperty("EnableSystemBlessDecrease", "False"));
  117. }
  118.  
  119. /**
  120. * Loads New Char Classic settings.<br>
  121. */
  122. private static final void loadPlayerConfig()
  123. {
  124. final ExProperties newbiechar = initProperties(NEWCHARACTER);
  125. + ENABLE_DWARF_WEAPON_SIZE = Boolean.parseBoolean(newbiechar.getProperty("EnableDwarfWeaponSize", "False"));
  126. + SIZE_WEAPON_DWARF = newbiechar.getProperty("SizeWeaponDwarf", 0);
  127. ENABLE_WEAPONS_HERO_ALL = Boolean.parseBoolean(newbiechar.getProperty("BuyHeroWeaponsAll", "False"));
  128. ENABLE_ALL_CLASS_TL_ELFVILLAGE = Boolean.parseBoolean(newbiechar.getProperty("EnableAllClassElfToVillage", "False"));
  129. ALT_GAME_CANCEL_BOW = Boolean.parseBoolean(newbiechar.getProperty("AltGameCancelByBow", "False"));
  130. ALT_GAME_CANCEL_CAST = Boolean.parseBoolean(newbiechar.getProperty("AltGameCancelByCast", "False"));
  131. OPEN_EFFECT_CLASSIC_TELEPORTER = Boolean.parseBoolean(newbiechar.getProperty("EnableEffectTeleporter", "False"));
  132. AUTO_MACRO_AUTOFARM = Boolean.parseBoolean(newbiechar.getProperty("AutoMacroAutoFarmNewbie", "False"));
  133. AUTO_MACRO_MENU = Boolean.parseBoolean(newbiechar.getProperty("AutoMacroMenuNewbie", "False"));
  134. ENABLE_USE_SKILLS_BS = Boolean.parseBoolean(newbiechar.getProperty("DeadSkillsUsedAll", "False"));
  135. TELEPORTER_SKILLS_ACTIVED = Boolean.parseBoolean(newbiechar.getProperty("SkillsContinue", "False"));
  136. ENABLE_USE_SKILLS_PETS = Boolean.parseBoolean(newbiechar.getProperty("SkillsContinuePets", "False"));
  137. USE_SKILLS_FORMALWEAR = Boolean.parseBoolean(newbiechar.getProperty("UseSkillsEquipedWear", "False"));
  138. USE_ITEMS_FORMALWEAR = Boolean.parseBoolean(newbiechar.getProperty("EquipedItemsForWear", "False"));
  139. CUSTOM_TELEGIRAN_ON_DIE = Boolean.parseBoolean(newbiechar.getProperty("CustomTeleportOnDie", "false"));
  140. BOOK_ITEM_CUSTOM = Integer.parseInt(newbiechar.getProperty("BookCustomItemID", "0"));
  141.  
  142. DISABLE_GRADE_PENALTY = Boolean.parseBoolean(newbiechar.getProperty("DisableGradePenalty", "False"));
  143. DISABLE_WEIGHT_PENALTY = Boolean.parseBoolean(newbiechar.getProperty("DisableWeightPenalty", "False"));
  144. UNSTUCK_TIME = Integer.parseInt(newbiechar.getProperty("UnstuckTime", "0"));
  145. NEW_PLAYER_EFFECT = Boolean.parseBoolean(newbiechar.getProperty("NewPlayerEffect", "false"));
  146. ESPECIAL_VIP_LOGIN = Boolean.parseBoolean(newbiechar.getProperty("CharVipEffectLogin", "false"));
  147. diff --git java/net/sf/l2j/gameserver/model/actor/template/CharTemplate.java
  148. index 37be180..d946d59 100644
  149. --- java/net/sf/l2j/gameserver/model/actor/template/CharTemplate.java
  150. +++ java/net/sf/l2j/gameserver/model/actor/template/CharTemplate.java
  151. @@ -1,36 +1,39 @@
  152. /*
  153. * This program is free software: you can redistribute it and/or modify it under
  154. * the terms of the GNU General Public License as published by the Free Software
  155. * Foundation, either version 3 of the License, or (at your option) any later
  156. * version.
  157. *
  158. * This program is distributed in the hope that it will be useful, but WITHOUT
  159. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  160. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  161. * details.
  162. *
  163. * You should have received a copy of the GNU General Public License along with
  164. * this program. If not, see <http://www.gnu.org/licenses/>.
  165. */
  166. package net.sf.l2j.gameserver.model.actor.template;
  167.  
  168. +import net.sf.l2j.Config;
  169. +import net.sf.l2j.gameserver.model.actor.template.NpcTemplate.Race;
  170. +import net.sf.l2j.gameserver.model.base.ClassRace;
  171. import net.sf.l2j.gameserver.templates.StatsSet;
  172.  
  173. public class CharTemplate
  174. {
  175. private final int _baseSTR;
  176. private final int _baseCON;
  177. private final int _baseDEX;
  178. private final int _baseINT;
  179. private final int _baseWIT;
  180. private final int _baseMEN;
  181.  
  182. private final double _baseHpMax;
  183. private final double _baseMpMax;
  184.  
  185. private final double _baseHpReg;
  186. private final double _baseMpReg;
  187.  
  188. private final double _basePAtk;
  189. private final double _baseMAtk;
  190. private final double _basePDef;
  191. @@ -154,26 +157,35 @@
  192.  
  193. public final int getBaseCritRate()
  194. {
  195. return _baseCritRate;
  196. }
  197.  
  198. public final int getBaseWalkSpeed()
  199. {
  200. return _baseWalkSpd;
  201. }
  202.  
  203. public final int getBaseRunSpeed()
  204. {
  205. return _baseRunSpd;
  206. }
  207.  
  208. public final double getCollisionRadius()
  209. {
  210. return _collisionRadius;
  211. }
  212. + public int getCollisionRadius(ClassRace raceid)
  213. + {
  214. + if(Config.ENABLE_DWARF_WEAPON_SIZE)
  215. + {
  216. + if(raceid == ClassRace.DWARF)
  217. + return Config.SIZE_WEAPON_DWARF;
  218. + return (int) getCollisionRadius();
  219. + }
  220. + return (int) getCollisionRadius();
  221. + }
  222. public final double getCollisionHeight()
  223. {
  224. return _collisionHeight;
  225. }
  226. }
  227. \ No newline at end of file
  228. diff --git java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java
  229. index abf60a1..1bf77c3 100644
  230. --- java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java
  231. +++ java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java
  232. @@ -3,40 +3,41 @@
  233. * the terms of the GNU General Public License as published by the Free Software
  234. * Foundation, either version 3 of the License, or (at your option) any later
  235. * version.
  236. *
  237. * This program is distributed in the hope that it will be useful, but WITHOUT
  238. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  239. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  240. * details.
  241. *
  242. * You should have received a copy of the GNU General Public License along with
  243. * this program. If not, see <http://www.gnu.org/licenses/>.
  244. */
  245. package net.sf.l2j.gameserver.network.serverpackets;
  246.  
  247. import net.sf.l2j.Config;
  248. import net.sf.l2j.gameserver.datatables.NpcTable;
  249. import net.sf.l2j.gameserver.instancemanager.CursedWeaponsManager;
  250. import net.sf.l2j.gameserver.model.L2Party;
  251. import net.sf.l2j.gameserver.model.Location;
  252. import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  253. +import net.sf.l2j.gameserver.model.actor.template.NpcTemplate.Race;
  254. import net.sf.l2j.gameserver.model.itemcontainer.Inventory;
  255. import net.sf.l2j.gameserver.model.zone.ZoneId;
  256. import net.sf.l2j.gameserver.skills.AbnormalEffect;
  257.  
  258. import Dev.Event.CTF.CTF;
  259. import Dev.Event.TvT.TvT;
  260. import Dev.Event.TvTFortress.FOSConfig;
  261. import Dev.Event.TvTFortress.FOSEvent;
  262.  
  263. public class CharInfo extends L2GameServerPacket
  264. {
  265. private final L2PcInstance _activeChar;
  266. private final Inventory _inv;
  267.  
  268. public CharInfo(L2PcInstance cha)
  269. {
  270. _activeChar = cha;
  271. _inv = _activeChar.getInventory();
  272. }
  273.  
  274. @@ -238,42 +239,50 @@
  275. int _walkSpd = _activeChar.getStat().getBaseWalkSpeed();
  276. int _swimSpd = _activeChar.getStat().getBaseSwimSpeed();
  277. writeD(_runSpd); // base run speed
  278. writeD(_walkSpd); // base walk speed
  279. writeD(_swimSpd); // swim run speed
  280. writeD(_swimSpd); // swim walk speed
  281. writeD(_runSpd);
  282. writeD(_walkSpd);
  283. writeD(_activeChar.isFlying() ? _runSpd : 0); // fly run speed
  284. writeD(_activeChar.isFlying() ? _walkSpd : 0); // fly walk speed
  285. writeF(_activeChar.getStat().getMovementSpeedMultiplier()); // run speed multiplier
  286. writeF(_activeChar.getStat().getAttackSpeedMultiplier()); // attack speed multiplier
  287.  
  288. if (_activeChar.getMountType() != 0)
  289. {
  290. writeF(NpcTable.getInstance().getTemplate(_activeChar.getMountNpcId()).getCollisionRadius());
  291. writeF(NpcTable.getInstance().getTemplate(_activeChar.getMountNpcId()).getCollisionHeight());
  292. }
  293. else
  294. {
  295. - writeF(_activeChar.getCollisionRadius());
  296. - writeF(_activeChar.getCollisionHeight());
  297. + if(Config.ENABLE_DWARF_WEAPON_SIZE)
  298. + {
  299. + writeF(_activeChar.getBaseTemplate().getCollisionRadius(_activeChar.getBaseTemplate().getRace()));
  300. + writeF(_activeChar.getBaseTemplate().getCollisionHeight());
  301. + }
  302. + else
  303. + {
  304. + writeF(_activeChar.getCollisionRadius());
  305. + writeF(_activeChar.getCollisionHeight());
  306. + }
  307. }
  308.  
  309. writeD(_activeChar.getAppearance().getHairStyle());
  310. writeD(_activeChar.getAppearance().getHairColor());
  311. writeD(_activeChar.getAppearance().getFace());
  312.  
  313. if (gmSeeInvis)
  314. {
  315. writeS("Invisible");
  316. }
  317. else if(_activeChar.isInsideZone(ZoneId.PVP_CUSTOM) && Config.ENABLE_NAME_TITLE_PVPEVENT)
  318. {
  319. writeS(Config.NEW_TITLE_PVPEVENT);
  320. }
  321. else if(Config.ENABLE_NEW_TITLE_AUTOFARM && _activeChar.isAutoFarm())
  322. {
  323. writeS(Config.NEW_TITLE_AUTOFARM);
  324. }
  325. else if (_activeChar.isInDMEvent())
  326. {
  327. diff --git java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java
  328. index 8c4559f..18eb7d4 100644
  329. --- java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java
  330. +++ java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java
  331. @@ -253,42 +253,50 @@
  332. int _swimSpd = _activeChar.getStat().getBaseSwimSpeed();
  333. writeD(_runSpd); // base run speed
  334. writeD(_walkSpd); // base walk speed
  335. writeD(_swimSpd); // swim run speed
  336. writeD(_swimSpd); // swim walk speed
  337. writeD(0);
  338. writeD(0);
  339. writeD(_activeChar.isFlying() ? _runSpd : 0); // fly run speed
  340. writeD(_activeChar.isFlying() ? _walkSpd : 0); // fly walk speed
  341. writeF(_activeChar.getStat().getMovementSpeedMultiplier()); // run speed multiplier
  342. writeF(_activeChar.getStat().getAttackSpeedMultiplier()); // attack speed multiplier
  343.  
  344. L2Summon pet = _activeChar.getPet();
  345. if (_activeChar.getMountType() != 0 && pet != null)
  346. {
  347. writeF(pet.getCollisionRadius());
  348. writeF(pet.getCollisionHeight());
  349. }
  350. else
  351. {
  352. - writeF(_activeChar.getCollisionRadius());
  353. - writeF(_activeChar.getCollisionHeight());
  354. + if(Config.ENABLE_DWARF_WEAPON_SIZE)
  355. + {
  356. + writeF(_activeChar.getBaseTemplate().getCollisionRadius(_activeChar.getBaseTemplate().getRace()));
  357. + writeF(_activeChar.getBaseTemplate().getCollisionHeight());
  358. + }
  359. + else
  360. + {
  361. + writeF(_activeChar.getCollisionRadius());
  362. + writeF(_activeChar.getCollisionHeight());
  363. + }
  364. }
  365.  
  366. writeD(_activeChar.getAppearance().getHairStyle());
  367. writeD(_activeChar.getAppearance().getHairColor());
  368. writeD(_activeChar.getAppearance().getFace());
  369. writeD(_activeChar.isGM() ? 1 : 0); // builder level
  370.  
  371. //writeS((_activeChar.getPolyType() != PolyType.DEFAULT) ? "Morphed" : _activeChar.getTitle());
  372.  
  373. if (_activeChar.isInDMEvent())
  374. {
  375. writeS("Kills: " + _activeChar.getDMPointScore());
  376. }
  377. else if (_activeChar.isInFOSEvent())
  378. {
  379. byte playerTeamId = FOSEvent.getParticipantTeamId(_activeChar.getObjectId());
  380.  
  381. if (playerTeamId == 0)
  382. writeS("Score: " + _activeChar.getFOSPointScore());
  383.  
  384.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement