RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.content.combat.Skulling Class Reference

Handles the skulling class. More...

Collaboration diagram for com.runehive.content.combat.Skulling:

Public Member Functions

void checkForSkulling (Player opponent)
 Checks if player requires a skull upon attacking another player.
SkullHeadIconType getHeadIconType ()
 Gets the skull icon.
SkullRemoveTask getSkullRemoveTask ()
boolean isSkulled ()
void skull ()
void skull (Player attacking, SkullHeadIconType icon)
 Skulls the player and deposit's the attacked player into the list.
void skull (SkullHeadIconType icon)
 Skulling (Player player)
 Constructs a new Skulling class.
void unskull ()
 Unskulls the player.

Private Attributes

final List< String > attacked = new LinkedList<>()
 All the other player's this entity has attacked.
SkullHeadIconType icon = SkullHeadIconType.NO_SKULL
 Their skull icon identification.
Player player
 The player of this class.
SkullRemoveTask skullRemoveTask

Detailed Description

Handles the skulling class.

Author
Daniel

Definition at line 18 of file Skulling.java.

Constructor & Destructor Documentation

◆ Skulling()

com.runehive.content.combat.Skulling.Skulling ( Player player)

Constructs a new Skulling class.

Parameters
playerThe player instance.

Definition at line 36 of file Skulling.java.

36 {
37 this.player = player;
38 this.skullRemoveTask = new SkullRemoveTask(player);
39 }

References player.

Member Function Documentation

◆ checkForSkulling()

void com.runehive.content.combat.Skulling.checkForSkulling ( Player opponent)

Checks if player requires a skull upon attacking another player.

Parameters
opponentThe opponent.

Definition at line 46 of file Skulling.java.

46 {
47 /* if (Area.inEventArena(opponent)) {
48 return;
49 }*/
50 if (!attacked.contains(opponent.getName()) && !opponent.skulling.attacked.contains(player.getName())) {
51 skull(opponent, SkullHeadIconType.WHITE_SKULL);
52 }
53 }

References attacked, com.runehive.game.world.entity.mob.player.Player.getName(), player, skull(), com.runehive.game.world.entity.mob.player.Player.skulling, and com.runehive.content.combat.SkullHeadIconType.WHITE_SKULL.

Here is the call graph for this function:

◆ getHeadIconType()

SkullHeadIconType com.runehive.content.combat.Skulling.getHeadIconType ( )

Gets the skull icon.

Returns
The skull icon.

Definition at line 115 of file Skulling.java.

115 {
116 return icon;
117 }

References icon.

Referenced by com.runehive.net.packet.out.SendPlayerUpdate.appendAppearanceMask().

Here is the caller graph for this function:

◆ getSkullRemoveTask()

SkullRemoveTask com.runehive.content.combat.Skulling.getSkullRemoveTask ( )

Definition at line 106 of file Skulling.java.

106 {
107 return skullRemoveTask;
108 }

References skullRemoveTask.

◆ isSkulled()

boolean com.runehive.content.combat.Skulling.isSkulled ( )

Definition at line 88 of file Skulling.java.

88 {
89 return skullRemoveTask.isRunning();
90 }

References skullRemoveTask.

Referenced by com.runehive.game.world.entity.combat.effect.impl.CombatSkullEffect.apply(), com.runehive.game.world.entity.mob.player.PlayerDeath.calculateDropItems(), com.runehive.game.world.entity.combat.effect.impl.CombatSkullEffect.onLogin(), com.runehive.content.ItemsKeptOnDeath.open(), com.runehive.game.world.entity.combat.effect.impl.CombatSkullEffect.removeOn(), and unskull().

Here is the caller graph for this function:

◆ skull() [1/3]

void com.runehive.content.combat.Skulling.skull ( )

Definition at line 55 of file Skulling.java.

55 {
56 skull(player, SkullHeadIconType.WHITE_SKULL);
57 }

References player, skull(), and com.runehive.content.combat.SkullHeadIconType.WHITE_SKULL.

Referenced by com.runehive.game.world.entity.combat.effect.impl.CombatSkullEffect.apply(), checkForSkulling(), skull(), and skull().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ skull() [2/3]

void com.runehive.content.combat.Skulling.skull ( Player attacking,
SkullHeadIconType icon )

Skulls the player and deposit's the attacked player into the list.

Parameters
attacking

Definition at line 68 of file Skulling.java.

68 {
69 if (attacking.inActivity()) {
70 return;
71 }
72
73 if(LMSGame.inGameArea(attacking)) return;
74
75 if (attacking != player) {
76 attacked.add(attacking.getName());
77 }
78
79 this.icon = icon;
80 player.updateFlags.add(UpdateFlag.APPEARANCE);
81
82 if (!skullRemoveTask.isRunning()) {
83 skullRemoveTask.setSkullTime(skullRemoveTask.getSkullTime() <= 0 ? Config.SKULL_TIME : skullRemoveTask.getSkullTime());
84 World.schedule(skullRemoveTask);
85 }
86 }

References com.runehive.game.world.entity.mob.UpdateFlag.APPEARANCE, attacked, com.runehive.game.world.entity.mob.player.Player.getName(), icon, com.runehive.game.world.entity.mob.Mob.inActivity(), com.runehive.content.lms.LMSGame.inGameArea(), player, com.runehive.game.world.World.schedule(), com.runehive.Config.SKULL_TIME, and skullRemoveTask.

Here is the call graph for this function:

◆ skull() [3/3]

void com.runehive.content.combat.Skulling.skull ( SkullHeadIconType icon)

Definition at line 59 of file Skulling.java.

59 {
60 skull(player, icon);
61 }

References icon, player, and skull().

Here is the call graph for this function:

◆ unskull()

void com.runehive.content.combat.Skulling.unskull ( )

Unskulls the player.

Definition at line 95 of file Skulling.java.

95 {
96 if (!isSkulled()) {
97 return;
98 }
99
100 skullRemoveTask.setSkullTime(0);
101 attacked.clear();
102 icon = SkullHeadIconType.NO_SKULL;
103 player.updateFlags.add(UpdateFlag.APPEARANCE);
104 }

References com.runehive.game.world.entity.mob.UpdateFlag.APPEARANCE, attacked, icon, isSkulled(), com.runehive.content.combat.SkullHeadIconType.NO_SKULL, player, and skullRemoveTask.

Referenced by com.runehive.game.world.entity.combat.effect.impl.CombatSkullEffect.removeOn().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ attacked

final List<String> com.runehive.content.combat.Skulling.attacked = new LinkedList<>()
private

All the other player's this entity has attacked.

Definition at line 21 of file Skulling.java.

Referenced by checkForSkulling(), skull(), and unskull().

◆ icon

SkullHeadIconType com.runehive.content.combat.Skulling.icon = SkullHeadIconType.NO_SKULL
private

Their skull icon identification.

Definition at line 27 of file Skulling.java.

Referenced by getHeadIconType(), skull(), skull(), and unskull().

◆ player

Player com.runehive.content.combat.Skulling.player
private

The player of this class.

Definition at line 24 of file Skulling.java.

Referenced by checkForSkulling(), skull(), skull(), skull(), Skulling(), and unskull().

◆ skullRemoveTask

SkullRemoveTask com.runehive.content.combat.Skulling.skullRemoveTask
private

Definition at line 29 of file Skulling.java.

Referenced by getSkullRemoveTask(), isSkulled(), skull(), and unskull().


The documentation for this class was generated from the following file: