diff options
author | TheJumper <maximilian.springer@web.de> | 2014-02-22 01:21:49 +0100 |
---|---|---|
committer | TheJumper <maximilian.springer@web.de> | 2014-02-22 01:21:49 +0100 |
commit | 7a7b9e88b295bd5e151f84cb4ae78d1749367d4e (patch) | |
tree | e77eee810941cfed4aa9fa071280e9c38d5a7451 | |
parent | Fixed Mob Drops, Add Rare and Uncommon Drops, Looting inflicts Drops (diff) | |
download | cuberite-7a7b9e88b295bd5e151f84cb4ae78d1749367d4e.tar cuberite-7a7b9e88b295bd5e151f84cb4ae78d1749367d4e.tar.gz cuberite-7a7b9e88b295bd5e151f84cb4ae78d1749367d4e.tar.bz2 cuberite-7a7b9e88b295bd5e151f84cb4ae78d1749367d4e.tar.lz cuberite-7a7b9e88b295bd5e151f84cb4ae78d1749367d4e.tar.xz cuberite-7a7b9e88b295bd5e151f84cb4ae78d1749367d4e.tar.zst cuberite-7a7b9e88b295bd5e151f84cb4ae78d1749367d4e.zip |
-rw-r--r-- | src/BlockID.h | 32 | ||||
-rw-r--r-- | src/Mobs/Blaze.cpp | 2 | ||||
-rw-r--r-- | src/Mobs/Cavespider.cpp | 2 | ||||
-rw-r--r-- | src/Mobs/Chicken.cpp | 2 | ||||
-rw-r--r-- | src/Mobs/Cow.cpp | 2 | ||||
-rw-r--r-- | src/Mobs/Creeper.cpp | 2 | ||||
-rw-r--r-- | src/Mobs/Enderman.cpp | 2 | ||||
-rw-r--r-- | src/Mobs/Ghast.cpp | 2 | ||||
-rw-r--r-- | src/Mobs/Horse.cpp | 2 | ||||
-rw-r--r-- | src/Mobs/Mooshroom.cpp | 2 | ||||
-rw-r--r-- | src/Mobs/Pig.cpp | 2 | ||||
-rw-r--r-- | src/Mobs/Skeleton.cpp | 2 | ||||
-rw-r--r-- | src/Mobs/Slime.cpp | 2 | ||||
-rw-r--r-- | src/Mobs/Spider.cpp | 2 | ||||
-rw-r--r-- | src/Mobs/Squid.cpp | 2 | ||||
-rw-r--r-- | src/Mobs/Witch.cpp | 2 | ||||
-rw-r--r-- | src/Mobs/Zombie.cpp | 2 | ||||
-rw-r--r-- | src/Mobs/Zombiepigman.cpp | 2 |
18 files changed, 49 insertions, 17 deletions
diff --git a/src/BlockID.h b/src/BlockID.h index 740c5fc90..e23a0f82a 100644 --- a/src/BlockID.h +++ b/src/BlockID.h @@ -392,6 +392,38 @@ enum ENUM_ITEM_ID +// 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, +}; + + + + enum { diff --git a/src/Mobs/Blaze.cpp b/src/Mobs/Blaze.cpp index 084567708..bd16a36e2 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->IsA("cPlayer") || a_Killer->IsA("cWolf")) { - int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21); + int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING); AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_BLAZE_ROD); } } diff --git a/src/Mobs/Cavespider.cpp b/src/Mobs/Cavespider.cpp index 0554f5c2a..7274820b7 100644 --- a/src/Mobs/Cavespider.cpp +++ b/src/Mobs/Cavespider.cpp @@ -31,7 +31,7 @@ void cCavespider::Tick(float a_Dt, cChunk & a_Chunk) void cCavespider::GetDrops(cItems & a_Drops, cEntity * a_Killer) { - int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21); + int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING); AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_STRING); if (a_Killer->IsA("cPlayer") || a_Killer->IsA("cWolf")) { diff --git a/src/Mobs/Chicken.cpp b/src/Mobs/Chicken.cpp index 4ca016883..9388e1097 100644 --- a/src/Mobs/Chicken.cpp +++ b/src/Mobs/Chicken.cpp @@ -48,7 +48,7 @@ void cChicken::Tick(float a_Dt, cChunk & a_Chunk) void cChicken::GetDrops(cItems & a_Drops, cEntity * a_Killer) { - int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21); + int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING); 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 2740e4e72..cda067fac 100644 --- a/src/Mobs/Cow.cpp +++ b/src/Mobs/Cow.cpp @@ -21,7 +21,7 @@ cCow::cCow(void) : void cCow::GetDrops(cItems & a_Drops, cEntity * a_Killer) { - int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21); + int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING); 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 594878e52..0ae78eee3 100644 --- a/src/Mobs/Creeper.cpp +++ b/src/Mobs/Creeper.cpp @@ -39,7 +39,7 @@ void cCreeper::Tick(float a_Dt, cChunk & a_Chunk) void cCreeper::GetDrops(cItems & a_Drops, cEntity * a_Killer) { - int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21); + int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING); AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_GUNPOWDER); if ((a_Killer != NULL) && (a_Killer->IsProjectile())) diff --git a/src/Mobs/Enderman.cpp b/src/Mobs/Enderman.cpp index b79bf20fc..4a5ad25be 100644 --- a/src/Mobs/Enderman.cpp +++ b/src/Mobs/Enderman.cpp @@ -21,7 +21,7 @@ cEnderman::cEnderman(void) : void cEnderman::GetDrops(cItems & a_Drops, cEntity * a_Killer) { - int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21); + int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING); AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_ENDER_PEARL); } diff --git a/src/Mobs/Ghast.cpp b/src/Mobs/Ghast.cpp index b62069d63..a73ed0944 100644 --- a/src/Mobs/Ghast.cpp +++ b/src/Mobs/Ghast.cpp @@ -18,7 +18,7 @@ cGhast::cGhast(void) : void cGhast::GetDrops(cItems & a_Drops, cEntity * a_Killer) { - int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21); + int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING); 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 4220585a1..3c29e3682 100644 --- a/src/Mobs/Horse.cpp +++ b/src/Mobs/Horse.cpp @@ -140,7 +140,7 @@ void cHorse::OnRightClicked(cPlayer & a_Player) void cHorse::GetDrops(cItems & a_Drops, cEntity * a_Killer) { - int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21); + int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING); 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 4c245ea2d..17995ce91 100644 --- a/src/Mobs/Mooshroom.cpp +++ b/src/Mobs/Mooshroom.cpp @@ -23,7 +23,7 @@ cMooshroom::cMooshroom(void) : void cMooshroom::GetDrops(cItems & a_Drops, cEntity * a_Killer) { - int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21); + int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING); 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 063e2a5b4..e4e46dfec 100644 --- a/src/Mobs/Pig.cpp +++ b/src/Mobs/Pig.cpp @@ -21,7 +21,7 @@ cPig::cPig(void) : void cPig::GetDrops(cItems & a_Drops, cEntity * a_Killer) { - int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21); + int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING); 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 b0a5670cf..622cb5ceb 100644 --- a/src/Mobs/Skeleton.cpp +++ b/src/Mobs/Skeleton.cpp @@ -20,7 +20,7 @@ cSkeleton::cSkeleton(bool IsWither) : void cSkeleton::GetDrops(cItems & a_Drops, cEntity * a_Killer) { - int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21); + int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING); if (IsWither()) { AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_BONE); diff --git a/src/Mobs/Slime.cpp b/src/Mobs/Slime.cpp index f5b2cabc2..7941e2452 100644 --- a/src/Mobs/Slime.cpp +++ b/src/Mobs/Slime.cpp @@ -20,7 +20,7 @@ cSlime::cSlime(int a_Size) : void cSlime::GetDrops(cItems & a_Drops, cEntity * a_Killer) { - int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21); + int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING); if (GetSize() == 1) { AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_SLIMEBALL); diff --git a/src/Mobs/Spider.cpp b/src/Mobs/Spider.cpp index 1f41328a2..aeb6e1bcc 100644 --- a/src/Mobs/Spider.cpp +++ b/src/Mobs/Spider.cpp @@ -18,7 +18,7 @@ cSpider::cSpider(void) : void cSpider::GetDrops(cItems & a_Drops, cEntity * a_Killer) { - int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21); + int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING); AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_STRING); if (a_Killer->IsA("cPlayer") || a_Killer->IsA("cWolf")) { diff --git a/src/Mobs/Squid.cpp b/src/Mobs/Squid.cpp index 9dee69cbb..4f2abf574 100644 --- a/src/Mobs/Squid.cpp +++ b/src/Mobs/Squid.cpp @@ -21,7 +21,7 @@ cSquid::cSquid(void) : void cSquid::GetDrops(cItems & a_Drops, cEntity * a_Killer) { // Drops 0-3 Ink Sacs - int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21); + int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING); 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 88e8f4e50..6cb103645 100644 --- a/src/Mobs/Witch.cpp +++ b/src/Mobs/Witch.cpp @@ -18,7 +18,7 @@ cWitch::cWitch(void) : void cWitch::GetDrops(cItems & a_Drops, cEntity * a_Killer) { - int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21); + int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING); MTRand r1; int DropTypeCount = (r1.randInt() % 3) + 1; for (int i = 0; i < DropTypeCount; i++) diff --git a/src/Mobs/Zombie.cpp b/src/Mobs/Zombie.cpp index 72373266a..6a007683b 100644 --- a/src/Mobs/Zombie.cpp +++ b/src/Mobs/Zombie.cpp @@ -23,7 +23,7 @@ cZombie::cZombie(bool a_IsVillagerZombie) : void cZombie::GetDrops(cItems & a_Drops, cEntity * a_Killer) { - int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21); + int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING); AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_ROTTEN_FLESH); cItems RareDrops; RareDrops.Add(cItem(E_ITEM_IRON)); diff --git a/src/Mobs/Zombiepigman.cpp b/src/Mobs/Zombiepigman.cpp index d1eadc2ae..ca222f9fe 100644 --- a/src/Mobs/Zombiepigman.cpp +++ b/src/Mobs/Zombiepigman.cpp @@ -19,7 +19,7 @@ cZombiePigman::cZombiePigman(void) : void cZombiePigman::GetDrops(cItems & a_Drops, cEntity * a_Killer) { - int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21); + int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING); AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_ROTTEN_FLESH); AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_GOLD_NUGGET); |