Bug fixes (#603)

* Update Boundary.java

* fix xp to level up

* tomato shop

* fix longsword attack anim

* Update MeleeData.java

* fix dagger/longsword/shortsword anims

* Update MeleeData.java

* obby maul and warhammer interfaces and halberd anims

* Pickaxe anims

randomly uses the anim for either stab str or crush str. Cheaphax before system redesign

* adds razmires builder shop

* pom.xml update
This commit is contained in:
MatthewBishop
2023-02-06 13:43:27 -05:00
committed by GitHub
parent 67efff663e
commit 81e6344dd8
7 changed files with 64 additions and 18 deletions
@@ -4,6 +4,8 @@ import com.rs2.event.EventContext;
import com.rs2.event.EventSubscriber;
import com.rs2.event.SubscribesTo;
import com.rs2.event.impl.NpcThirdClickEvent;
import com.rs2.game.content.StaticNpcList;
import com.rs2.game.content.StaticObjectList;
import com.rs2.game.players.Player;
@SubscribesTo(NpcThirdClickEvent.class)
@@ -14,6 +16,11 @@ public final class NpcThirdClick implements EventSubscriber<NpcThirdClickEvent>
if (player.playerRights == 3) {
player.getPacketSender().sendMessage("[click= npc], [type = third], [id= " + event.getNpc() + "], [Type= " + event.getNpc() + "]");
}
//TODO when plugins occur, move the handling of this to the specific plugin for those map areas.
if(event.getNpc() == StaticNpcList.RAZMIRE_KEELGAN) {
player.getShopAssistant().openShop(283);
}
}
}
@@ -4,6 +4,7 @@ import com.rs2.event.EventContext;
import com.rs2.event.EventSubscriber;
import com.rs2.event.SubscribesTo;
import com.rs2.event.impl.ObjectFirstClickEvent;
import com.rs2.game.content.StaticObjectList;
import com.rs2.game.content.skills.core.Mining;
import com.rs2.game.players.Player;
import com.rs2.world.clip.Region;
@@ -26,6 +27,11 @@ public final class ObjectFirstClick implements EventSubscriber<ObjectFirstClickE
player.getMining().startMining(player, event.getGameObject(), player.objectX, player.objectY, player.clickObjectType);
return;
}
//TODO when plugins occur, move the handling of this to the specific plugin for those map areas.
if(event.getGameObject() == StaticObjectList.CRATE_6839) {
player.getShopAssistant().openShop(146);
}
}
+20 -3
View File
@@ -155,13 +155,30 @@
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/java</source>
<source>plugins</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<generatedSourcesDirectory>${project.basedir}/plugins</generatedSourcesDirectory>
<generatedSourcesDirectory>${project.basedir}/src/main/java</generatedSourcesDirectory>
<source>8</source>
<target>8</target>
<encoding>UTF-8</encoding>
@@ -6,6 +6,7 @@ import com.rs2.game.items.DeprecatedItems;
import com.rs2.game.items.ItemConstants;
import com.rs2.game.items.impl.Greegree.MonkeyData;
import com.rs2.game.players.Player;
import com.rs2.util.Misc;
import static com.rs2.game.content.StaticItemList.TOKTZKETXIL;
@@ -330,14 +331,22 @@ public class MeleeData {
return 806;
}
if (weaponName.contains("halberd")) {
return 440;
return c.fightMode == 2 ? 440 : 412;
}
//pickaxe anims are 395, 400, 401, 395
//this is for attack, str, str, and def.
if (weaponName.contains("pickaxe")) {
switch (c.fightMode) {
case 2:
return (Misc.random(1) == 0) ? 400 : 401;
default:
return 395;
}
}
if (weaponName.contains("dragon dagger")) {
return 402;
}
if (weaponName.endsWith("dagger")) {
return 412;
}
if (weaponName.contains("2h sword") || weaponName.contains("godsword")
|| weaponName.contains("aradomin sword")) {
switch (c.fightMode) {
@@ -349,14 +358,21 @@ public class MeleeData {
return 407;
}
}
if (weaponName.contains("sword")) {
switch (c.fightMode) {
case 0:
case 1:
return 412;
case 2:
return 451;
}
if (weaponName.contains("longsword")) {
switch (c.fightMode) {
case 3:
return 412;
default:
return 451;
}
}
if (weaponName.contains("sword") || weaponName.endsWith("dagger")) {
switch (c.fightMode) {
case 3:
return 451;
default:
return 412;
}
}
if (weaponName.contains("karil")) {
return 2075;
@@ -646,7 +646,7 @@ public class ItemAssistant {
player.getPacketSender().setSidebarInterface(0, 3796); // pound, pummel, spike, block
player.getPacketSender().sendFrame246(3797, 200, weapon);
player.getPacketSender().sendString(weaponName, 3799);
} else if (player.playerEquipment[player.playerWeapon] == 4153) {
} else if (newWeapon.toLowerCase().contains("tzhaar") || newWeapon.toLowerCase().contains("warhammer") || player.playerEquipment[player.playerWeapon] == 4153) {
player.getPacketSender().setSidebarInterface(0, 425); // war hammer equip
player.getPacketSender().sendFrame246(426, 200, weapon);
player.getPacketSender().sendString(weaponName, 428);
@@ -2039,7 +2039,7 @@ public class PlayerAssistant {
}
int oldLevel = getLevelForXP(player.playerXP[skill]);
player.playerXP[skill] += amount;
if (oldLevel < getLevelForXP(player.playerXP[skill])) {
if (oldLevel <= getLevelForXP(player.playerXP[skill])) {
if (player.playerLevel[skill] < player.getLevelForXP(player.playerXP[skill]) && skill != 3 && skill != 5) {
player.playerLevel[skill] = player.getLevelForXP(player.playerXP[skill]);
}
@@ -274,7 +274,7 @@ public class Boundary {
public static final Boundary SOPHANEM = new Boundary(3273, 3323, 2749, 2806);
public static final Boundary MENAPHOS = new Boundary(3200, 3266, 2749, 2806);
public static final Boundary POLLIVNEACH = new Boundary(3329, 3377, 2936, 3002);
public static final Boundary SHANTAY_PASS = new Boundary(3298, 3312, 3304, 3303);
public static final Boundary SHANTAY_PASS = new Boundary(3295, 3311, 3116, 3128);
public static final Boundary[] NO_HEAT = {NARDAH, BANDIT_CAMP, MINING_CAMP, BEDABIN, UZER, AGILITY_PYRAMID, PYRAMID, SOPHANEM, MENAPHOS, POLLIVNEACH, SHANTAY_PASS};