Add this class in the Players directory:
All godswords handled.
Code:
package RS2E.Players;
import RS2E.Players.Player;
import RS2E.Main;
public class WeaponAnim
{
public WeaponAnim(Player p)
{
if(p == null)
{
return;
}
int weaponID = p.equipment[3];
switch(weaponID) {
case 11696: //Bandos Godsword Handled
case 11694: //Armadyl Godsword Handled
case 11698: //Saradomin Godsword Handled
case 11700: //Zamorak Godsword Handled
p.standEmote = 7047;
p.walkEmote = 7046;
p.runEmote = 7039;
p.turnAnimation = 7040; //Regular turn
p.turnAnimation180 = 7045; //180 degree turn
p.turnAnimationC90 = 7044; //1st 90 degree turn
p.turnAnimationCC90 = 7043; //2nd 90 degree turn
break;
default: //All unhandled weapons
p.standEmote = 0x328;
p.walkEmote = 0x333;
p.runEmote = 0x338;
break;
}
}
}
In PlayerUpdateBlock.java, add this above "playerProps.writeWord(p.standEmote);":
Code:
WeaponAnim wep = new WeaponAnim(p);
In PlayerUpdateBlock, delete this line:
Code:
public int[] otherEmotes = {0x337, 0x334, 0x335, 0x336};
Now go to PlayerInstances and declare these integers:
Code:
public int turnAnimation = 0x337;
public int turnAnimation180 = 0x334;
public int turnAnimationC90 = 0x335;
public int turnAnimationCC90 = 0x336;
Now go back to PlayerUpdateBlock and change the following lines:
Code:
playerProps.writeWord(otherEmotes[0]);
To:
Code:
playerProps.writeWord(p.turnAnimation);
Then:
Code:
playerProps.writeWord(otherEmotes[1]);
To:
Code:
playerProps.writeWord(p.turnAnimation180);
Then:
Code:
playerProps.writeWord(otherEmotes[2]);
To:
Code:
playerProps.writeWord(p.turnAnimationC90);
Then:
Code:
playerProps.writeWord(otherEmotes[3]);
To:
Code:
playerProps.writeWord(p.turnAnimationCC90);
This will make the correct animation, if handled, to appear and this is just a way to organize it
Note: I already have the zamorak godsword handled for people. Thanks to Zamorak Zxt for the IDs