summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Enchantments.h33
-rw-r--r--src/Mobs/Blaze.cpp2
-rw-r--r--src/Mobs/Cavespider.cpp2
-rw-r--r--src/Mobs/Chicken.cpp2
-rw-r--r--src/Mobs/Cow.cpp2
-rw-r--r--src/Mobs/Creeper.cpp2
-rw-r--r--src/Mobs/Enderman.cpp2
-rw-r--r--src/Mobs/Ghast.cpp2
-rw-r--r--src/Mobs/Horse.cpp2
-rw-r--r--src/Mobs/Mooshroom.cpp2
-rw-r--r--src/Mobs/Pig.cpp2
-rw-r--r--src/Mobs/Skeleton.cpp2
-rw-r--r--src/Mobs/Slime.cpp2
-rw-r--r--src/Mobs/Spider.cpp2
-rw-r--r--src/Mobs/Squid.cpp2
-rw-r--r--src/Mobs/Witch.cpp2
-rw-r--r--src/Mobs/Zombie.cpp2
-rw-r--r--src/Mobs/Zombiepigman.cpp2
18 files changed, 17 insertions, 50 deletions
diff --git a/src/Enchantments.h b/src/Enchantments.h
index 14a900e19..f77b535d8 100644
--- a/src/Enchantments.h
+++ b/src/Enchantments.h
@@ -21,39 +21,6 @@ class cParsedNBT;
-// ENCHANTMENT IDS
-enum
-{
- E_ENCHANTMENT_PROTECTION = 0,
- E_ENCHANTMENT_FIRE_PROTECTION = 1,
- E_ENCHANTMENT_FEATHER_FALLING = 2,
- E_ENCHANTMENT_BLAST_PROTECTION = 3,
- E_ENCHANTMENT_PROJECTILE_PROTECTION= 4,
- E_ENCHANTMENT_RESPIRATION = 5,
- E_ENCHANTMENT_AQUA_AFFINITY = 6,
- E_ENCHANTMENT_THORNS = 7,
- E_ENCHANTMENT_SHARPNESS = 16,
- E_ENCHANTMENT_SMITE = 17,
- E_ENCHANTMENT_BANE_OF_ARTHROPODS = 18,
- E_ENCHANTMENT_KNOCKBACK = 19,
- E_ENCHANTMENT_FIREASPECT = 20,
- E_ENCHANTMENT_LOOTING = 21,
- E_ENCHANTMENT_EFFICIENCY = 32,
- E_ENCHANTMENT_SILKTOUCH = 33,
- E_ENCHANTMENT_UNBREAKING = 34,
- E_ENCHANTMENT_FORTUNE = 35,
- E_ENCHANTMENT_POWER = 48,
- E_ENCHANTMENT_PUNCH = 49,
- E_ENCHANTMENT_FLAME = 50,
- E_ENCHANTMENT_INFINITY = 51,
- E_ENCHANTMENT_LUCKOFTHESEA = 61,
- E_ENCHANTMENT_LURE = 62,
-};
-
-
-
-
-
/** Class that stores item enchantments or stored-enchantments
The enchantments may be serialized to a stringspec and read back from such stringspec.
The format for the stringspec is "id=lvl;id=lvl;id=lvl...", with an optional semicolon at the end,
diff --git a/src/Mobs/Blaze.cpp b/src/Mobs/Blaze.cpp
index cd5437d97..ac42cf40b 100644
--- a/src/Mobs/Blaze.cpp
+++ b/src/Mobs/Blaze.cpp
@@ -21,7 +21,7 @@ void cBlaze::GetDrops(cItems & a_Drops, cEntity * a_Killer)
{
if ((a_Killer != NULL) && (a_Killer->IsPlayer() || a_Killer->IsA("cWolf")))
{
- int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
+ int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_BLAZE_ROD);
}
}
diff --git a/src/Mobs/Cavespider.cpp b/src/Mobs/Cavespider.cpp
index 4ef80e5f0..94e93283d 100644
--- a/src/Mobs/Cavespider.cpp
+++ b/src/Mobs/Cavespider.cpp
@@ -34,7 +34,7 @@ void cCavespider::GetDrops(cItems & a_Drops, cEntity * a_Killer)
int LootingLevel = 0;
if (a_Killer != NULL)
{
- LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
+ LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
}
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_STRING);
if ((a_Killer != NULL) && (a_Killer->IsPlayer() || a_Killer->IsA("cWolf")))
diff --git a/src/Mobs/Chicken.cpp b/src/Mobs/Chicken.cpp
index b58eedbf7..f7e44238f 100644
--- a/src/Mobs/Chicken.cpp
+++ b/src/Mobs/Chicken.cpp
@@ -51,7 +51,7 @@ void cChicken::GetDrops(cItems & a_Drops, cEntity * a_Killer)
int LootingLevel = 0;
if (a_Killer != NULL)
{
- LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
+ LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
}
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_FEATHER);
AddRandomDropItem(a_Drops, 1, 1, IsOnFire() ? E_ITEM_COOKED_CHICKEN : E_ITEM_RAW_CHICKEN);
diff --git a/src/Mobs/Cow.cpp b/src/Mobs/Cow.cpp
index 49eac5cf5..9914df6b5 100644
--- a/src/Mobs/Cow.cpp
+++ b/src/Mobs/Cow.cpp
@@ -24,7 +24,7 @@ void cCow::GetDrops(cItems & a_Drops, cEntity * a_Killer)
int LootingLevel = 0;
if (a_Killer != NULL)
{
- LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
+ LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
}
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_LEATHER);
AddRandomDropItem(a_Drops, 1, 3 + LootingLevel, IsOnFire() ? E_ITEM_STEAK : E_ITEM_RAW_BEEF);
diff --git a/src/Mobs/Creeper.cpp b/src/Mobs/Creeper.cpp
index 3dd978088..40ee20e44 100644
--- a/src/Mobs/Creeper.cpp
+++ b/src/Mobs/Creeper.cpp
@@ -42,7 +42,7 @@ void cCreeper::GetDrops(cItems & a_Drops, cEntity * a_Killer)
int LootingLevel = 0;
if (a_Killer != NULL)
{
- LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
+ LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
}
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_GUNPOWDER);
diff --git a/src/Mobs/Enderman.cpp b/src/Mobs/Enderman.cpp
index f0a3b5f5d..becc99a86 100644
--- a/src/Mobs/Enderman.cpp
+++ b/src/Mobs/Enderman.cpp
@@ -24,7 +24,7 @@ void cEnderman::GetDrops(cItems & a_Drops, cEntity * a_Killer)
int LootingLevel = 0;
if (a_Killer != NULL)
{
- LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
+ LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
}
AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_ENDER_PEARL);
}
diff --git a/src/Mobs/Ghast.cpp b/src/Mobs/Ghast.cpp
index 300435557..fe18f5e76 100644
--- a/src/Mobs/Ghast.cpp
+++ b/src/Mobs/Ghast.cpp
@@ -21,7 +21,7 @@ void cGhast::GetDrops(cItems & a_Drops, cEntity * a_Killer)
int LootingLevel = 0;
if (a_Killer != NULL)
{
- LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
+ LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
}
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_GUNPOWDER);
AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_GHAST_TEAR);
diff --git a/src/Mobs/Horse.cpp b/src/Mobs/Horse.cpp
index 73cc532bf..9d130301f 100644
--- a/src/Mobs/Horse.cpp
+++ b/src/Mobs/Horse.cpp
@@ -143,7 +143,7 @@ void cHorse::GetDrops(cItems & a_Drops, cEntity * a_Killer)
int LootingLevel = 0;
if (a_Killer != NULL)
{
- LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
+ LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
}
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_LEATHER);
if (m_bIsSaddled)
diff --git a/src/Mobs/Mooshroom.cpp b/src/Mobs/Mooshroom.cpp
index bc1b9cac7..5873ec63f 100644
--- a/src/Mobs/Mooshroom.cpp
+++ b/src/Mobs/Mooshroom.cpp
@@ -27,7 +27,7 @@ void cMooshroom::GetDrops(cItems & a_Drops, cEntity * a_Killer)
int LootingLevel = 0;
if (a_Killer != NULL)
{
- LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
+ LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
}
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_LEATHER);
AddRandomDropItem(a_Drops, 1, 3 + LootingLevel, IsOnFire() ? E_ITEM_STEAK : E_ITEM_RAW_BEEF);
diff --git a/src/Mobs/Pig.cpp b/src/Mobs/Pig.cpp
index aa127a590..e862f5aaa 100644
--- a/src/Mobs/Pig.cpp
+++ b/src/Mobs/Pig.cpp
@@ -24,7 +24,7 @@ void cPig::GetDrops(cItems & a_Drops, cEntity * a_Killer)
int LootingLevel = 0;
if (a_Killer != NULL)
{
- LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
+ LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
}
AddRandomDropItem(a_Drops, 1, 3 + LootingLevel, IsOnFire() ? E_ITEM_COOKED_PORKCHOP : E_ITEM_RAW_PORKCHOP);
if (m_bIsSaddled)
diff --git a/src/Mobs/Skeleton.cpp b/src/Mobs/Skeleton.cpp
index c941ae521..661f0712c 100644
--- a/src/Mobs/Skeleton.cpp
+++ b/src/Mobs/Skeleton.cpp
@@ -23,7 +23,7 @@ void cSkeleton::GetDrops(cItems & a_Drops, cEntity * a_Killer)
int LootingLevel = 0;
if (a_Killer != NULL)
{
- LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
+ LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
}
if (IsWither())
{
diff --git a/src/Mobs/Slime.cpp b/src/Mobs/Slime.cpp
index 2001fdcb4..52a52bb39 100644
--- a/src/Mobs/Slime.cpp
+++ b/src/Mobs/Slime.cpp
@@ -23,7 +23,7 @@ void cSlime::GetDrops(cItems & a_Drops, cEntity * a_Killer)
int LootingLevel = 0;
if (a_Killer != NULL)
{
- LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
+ LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
}
if (GetSize() == 1)
{
diff --git a/src/Mobs/Spider.cpp b/src/Mobs/Spider.cpp
index 4a6f09aa4..8b978ff6b 100644
--- a/src/Mobs/Spider.cpp
+++ b/src/Mobs/Spider.cpp
@@ -21,7 +21,7 @@ void cSpider::GetDrops(cItems & a_Drops, cEntity * a_Killer)
int LootingLevel = 0;
if (a_Killer != NULL)
{
- LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
+ LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
}
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_STRING);
if ((a_Killer != NULL) && (a_Killer->IsPlayer() || a_Killer->IsA("cWolf")))
diff --git a/src/Mobs/Squid.cpp b/src/Mobs/Squid.cpp
index 24818222b..ba9171b39 100644
--- a/src/Mobs/Squid.cpp
+++ b/src/Mobs/Squid.cpp
@@ -24,7 +24,7 @@ void cSquid::GetDrops(cItems & a_Drops, cEntity * a_Killer)
int LootingLevel = 0;
if (a_Killer != NULL)
{
- LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
+ LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
}
AddRandomDropItem(a_Drops, 0, 3 + LootingLevel, E_ITEM_DYE, E_META_DYE_BLACK);
}
diff --git a/src/Mobs/Witch.cpp b/src/Mobs/Witch.cpp
index a278a1964..bdc9e11de 100644
--- a/src/Mobs/Witch.cpp
+++ b/src/Mobs/Witch.cpp
@@ -21,7 +21,7 @@ void cWitch::GetDrops(cItems & a_Drops, cEntity * a_Killer)
int LootingLevel = 0;
if (a_Killer != NULL)
{
- LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
+ LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
}
MTRand r1;
int DropTypeCount = (r1.randInt() % 3) + 1;
diff --git a/src/Mobs/Zombie.cpp b/src/Mobs/Zombie.cpp
index 5facf085e..999cd4a35 100644
--- a/src/Mobs/Zombie.cpp
+++ b/src/Mobs/Zombie.cpp
@@ -26,7 +26,7 @@ void cZombie::GetDrops(cItems & a_Drops, cEntity * a_Killer)
int LootingLevel = 0;
if (a_Killer != NULL)
{
- LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
+ LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
}
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_ROTTEN_FLESH);
cItems RareDrops;
diff --git a/src/Mobs/Zombiepigman.cpp b/src/Mobs/Zombiepigman.cpp
index 3ecc65fed..a967d5066 100644
--- a/src/Mobs/Zombiepigman.cpp
+++ b/src/Mobs/Zombiepigman.cpp
@@ -22,7 +22,7 @@ void cZombiePigman::GetDrops(cItems & a_Drops, cEntity * a_Killer)
int LootingLevel = 0;
if (a_Killer != NULL)
{
- LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
+ LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
}
AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_ROTTEN_FLESH);
AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_GOLD_NUGGET);