mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 05:15:13 +00:00
Enchantment: Remove activation type stuff
This isn't and won't be used anywhere.
This commit is contained in:
parent
0e538ee51d
commit
cc1951c7ba
@ -61,10 +61,6 @@ class Enchantment{
|
|||||||
public const RARITY_RARE = 2;
|
public const RARITY_RARE = 2;
|
||||||
public const RARITY_MYTHIC = 3;
|
public const RARITY_MYTHIC = 3;
|
||||||
|
|
||||||
public const ACTIVATION_EQUIP = 0;
|
|
||||||
public const ACTIVATION_HELD = 1;
|
|
||||||
public const ACTIVATION_SELF = 2;
|
|
||||||
|
|
||||||
public const SLOT_NONE = 0;
|
public const SLOT_NONE = 0;
|
||||||
public const SLOT_ALL = 0b11111111111111;
|
public const SLOT_ALL = 0b11111111111111;
|
||||||
public const SLOT_ARMOR = 0b1111;
|
public const SLOT_ARMOR = 0b1111;
|
||||||
@ -91,9 +87,9 @@ class Enchantment{
|
|||||||
public static function init(){
|
public static function init(){
|
||||||
self::$enchantments = new \SplFixedArray(256);
|
self::$enchantments = new \SplFixedArray(256);
|
||||||
|
|
||||||
self::registerEnchantment(new Enchantment(self::PROTECTION, "%enchantment.protect.all", self::RARITY_COMMON, self::ACTIVATION_EQUIP, self::SLOT_ARMOR));
|
self::registerEnchantment(new Enchantment(self::PROTECTION, "%enchantment.protect.all", self::RARITY_COMMON, self::SLOT_ARMOR));
|
||||||
self::registerEnchantment(new Enchantment(self::FIRE_PROTECTION, "%enchantment.protect.fire", self::RARITY_UNCOMMON, self::ACTIVATION_EQUIP, self::SLOT_ARMOR));
|
self::registerEnchantment(new Enchantment(self::FIRE_PROTECTION, "%enchantment.protect.fire", self::RARITY_UNCOMMON, self::SLOT_ARMOR));
|
||||||
self::registerEnchantment(new Enchantment(self::FEATHER_FALLING, "%enchantment.protect.fall", self::RARITY_UNCOMMON, self::ACTIVATION_EQUIP, self::SLOT_FEET));
|
self::registerEnchantment(new Enchantment(self::FEATHER_FALLING, "%enchantment.protect.fall", self::RARITY_UNCOMMON, self::SLOT_FEET));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -136,22 +132,18 @@ class Enchantment{
|
|||||||
/** @var int */
|
/** @var int */
|
||||||
private $rarity;
|
private $rarity;
|
||||||
/** @var int */
|
/** @var int */
|
||||||
private $activationType;
|
|
||||||
/** @var int */
|
|
||||||
private $slot;
|
private $slot;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param int $rarity
|
* @param int $rarity
|
||||||
* @param int $activationType
|
* @param int $slot
|
||||||
* @param int $slot
|
|
||||||
*/
|
*/
|
||||||
public function __construct(int $id, string $name, int $rarity, int $activationType, int $slot){
|
public function __construct(int $id, string $name, int $rarity, int $slot){
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
$this->rarity = $rarity;
|
$this->rarity = $rarity;
|
||||||
$this->activationType = $activationType;
|
|
||||||
$this->slot = $slot;
|
$this->slot = $slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,14 +171,6 @@ class Enchantment{
|
|||||||
return $this->rarity;
|
return $this->rarity;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an int constant describing what type of activation this enchantment requires. For example armor enchantments only apply when worn.
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
public function getActivationType() : int{
|
|
||||||
return $this->activationType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an int with bitflags set to indicate what item types this enchantment can apply to.
|
* Returns an int with bitflags set to indicate what item types this enchantment can apply to.
|
||||||
* @return int
|
* @return int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user