Java Code Examples for net.runelite.api.Skill#HITPOINTS
The following examples show how to use
net.runelite.api.Skill#HITPOINTS .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PartyPlugin.java From plugins with GNU General Public License v3.0 | 6 votes |
@Subscribe private void onSkillUpdate(final SkillUpdate event) { final PartyData partyData = getPartyData(event.getMemberId()); if (partyData == null) { return; } if (event.getSkill() == Skill.HITPOINTS) { partyData.setHitpoints(event.getValue()); partyData.setMaxHitpoints(event.getMax()); } else if (event.getSkill() == Skill.PRAYER) { partyData.setPrayer(event.getValue()); partyData.setMaxPrayer(event.getMax()); } }
Example 2
Source File: PartyPlugin.java From plugins with GNU General Public License v3.0 | 6 votes |
@Subscribe private void onUserSync(final UserSync event) { final int currentHealth = client.getBoostedSkillLevel(Skill.HITPOINTS); final int currentPrayer = client.getBoostedSkillLevel(Skill.PRAYER); final int realHealth = client.getRealSkillLevel(Skill.HITPOINTS); final int realPrayer = client.getRealSkillLevel(Skill.PRAYER); final PartyMember localMember = party.getLocalMember(); if (localMember != null) { final SkillUpdate hpUpdate = new SkillUpdate(Skill.HITPOINTS, currentHealth, realHealth); hpUpdate.setMemberId(localMember.getMemberId()); ws.send(hpUpdate); final SkillUpdate prayUpdate = new SkillUpdate(Skill.PRAYER, currentPrayer, realPrayer); prayUpdate.setMemberId(localMember.getMemberId()); ws.send(prayUpdate); } }
Example 3
Source File: PartyPlugin.java From runelite with BSD 2-Clause "Simplified" License | 6 votes |
@Subscribe public void onSkillUpdate(final SkillUpdate event) { final PartyData partyData = getPartyData(event.getMemberId()); if (partyData == null) { return; } if (event.getSkill() == Skill.HITPOINTS) { partyData.setHitpoints(event.getValue()); partyData.setMaxHitpoints(event.getMax()); } else if (event.getSkill() == Skill.PRAYER) { partyData.setPrayer(event.getValue()); partyData.setMaxPrayer(event.getMax()); } }
Example 4
Source File: PartyPlugin.java From runelite with BSD 2-Clause "Simplified" License | 6 votes |
@Subscribe public void onUserSync(final UserSync event) { final int currentHealth = client.getBoostedSkillLevel(Skill.HITPOINTS); final int currentPrayer = client.getBoostedSkillLevel(Skill.PRAYER); final int realHealth = client.getRealSkillLevel(Skill.HITPOINTS); final int realPrayer = client.getRealSkillLevel(Skill.PRAYER); final PartyMember localMember = party.getLocalMember(); if (localMember != null) { final SkillUpdate hpUpdate = new SkillUpdate(Skill.HITPOINTS, currentHealth, realHealth); hpUpdate.setMemberId(localMember.getMemberId()); ws.send(hpUpdate); final SkillUpdate prayUpdate = new SkillUpdate(Skill.PRAYER, currentPrayer, realPrayer); prayUpdate.setMemberId(localMember.getMemberId()); ws.send(prayUpdate); } }
Example 5
Source File: XpDropPlugin.java From plugins with GNU General Public License v3.0 | 5 votes |
@Subscribe private void onFakeXpDrop(FakeXpDrop fakeXpDrop) { if (fakeXpDrop.getSkill() == Skill.HITPOINTS) { calculateDamageDealt(fakeXpDrop.getXp()); } }
Example 6
Source File: XpState.java From plugins with GNU General Public License v3.0 | 5 votes |
private double getCombatXPModifier(Skill skill) { if (skill == Skill.HITPOINTS) { return SHARED_XP_MODIFIER; } return DEFAULT_XP_MODIFIER; }
Example 7
Source File: XpState.java From runelite with BSD 2-Clause "Simplified" License | 5 votes |
private double getCombatXPModifier(Skill skill) { if (skill == Skill.HITPOINTS) { return SHARED_XP_MODIFIER; } return DEFAULT_XP_MODIFIER; }