public void UpdateBuffs(int i)
{
if (this.soulDrain > 0 && this.whoAmI == Main.myPlayer)
this.AddBuff(151, 2, true);
for (int index = 0; index < 1000; ++index)
{
if (Main.projectile[index].active && Main.projectile[index].owner == i)
++this.ownedProjectileCounts[Main.projectile[index].type];
}
for (int b1 = 0; b1 < 22; ++b1)
{
if (this.buffType[b1] > 0 && this.buffTime[b1] > 0)
{
if (this.whoAmI == Main.myPlayer && this.buffType[b1] != 28)
--this.buffTime[b1];
if (this.buffType[b1] == 1)
{
this.lavaImmune = true;
this.fireWalk = true;
this.buffImmune[24] = true;
}
else if (this.buffType[b1] == 158)
this.manaRegen += 2;
else if (this.buffType[b1] == 159 && this.inventory[this.selectedItem].melee)
this.armorPenetration = 4;
else if (this.buffType[b1] == 2)
this.lifeRegen += 4;
else if (this.buffType[b1] == 3)
this.moveSpeed += 0.25f;
else if (this.buffType[b1] == 4)
this.gills = true;
else if (this.buffType[b1] == 5)
this.statDefense += 8;
else if (this.buffType[b1] == 6)
this.manaRegenBuff = true;
else if (this.buffType[b1] == 7)
this.magicDamage += 0.2f;
else if (this.buffType[b1] == 8)
this.slowFall = true;
else if (this.buffType[b1] == 9)
this.findTreasure = true;
else if (this.buffType[b1] == 10)
this.invis = true;
else if (this.buffType[b1] == 11)
Lighting.AddLight((int)((double)this.position.X + (double)(this.width / 2)) / 16, (int)((double)this.position.Y + (double)(this.height / 2)) / 16, 0.8f, 0.95f, 1f);
else if (this.buffType[b1] == 12)
this.nightVision = true;
else if (this.buffType[b1] == 13)
this.enemySpawns = true;
else if (this.buffType[b1] == 14)
{
if ((double)this.thorns < 1.0)
this.thorns = 0.3333333f;
}
else if (this.buffType[b1] == 15)
this.waterWalk = true;
else if (this.buffType[b1] == 16)
this.archery = true;
else if (this.buffType[b1] == 17)
this.detectCreature = true;
else if (this.buffType[b1] == 18)
this.gravControl = true;
else if (this.buffType[b1] == 30)
this.bleed = true;
else if (this.buffType[b1] == 31)
this.confused = true;
else if (this.buffType[b1] == 32)
this.slow = true;
else if (this.buffType[b1] == 35)
this.silence = true;
else if (this.buffType[b1] == 160)
this.dazed = true;
else if (this.buffType[b1] == 46)
this.chilled = true;
else if (this.buffType[b1] == 47)
this.frozen = true;
else if (this.buffType[b1] == 156)
this.stoned = true;
else if (this.buffType[b1] == 69)
{
this.ichor = true;
this.statDefense -= 20;
}
else if (this.buffType[b1] == 36)
this.brokenArmor = true;
else if (this.buffType[b1] == 48)
this.honey = true;
else if (this.buffType[b1] == 59)
this.shadowDodge = true;
else if (this.buffType[b1] == 93)
this.ammoBox = true;
else if (this.buffType[b1] == 58)
this.palladiumRegen = true;
else if (this.buffType[b1] == 88)
this.chaosState = true;
else if (this.buffType[b1] == 63)
++this.moveSpeed;
else if (this.buffType[b1] == 104)
this.pickSpeed -= 0.25f;
else if (this.buffType[b1] == 105)
this.lifeMagnet = true;
else if (this.buffType[b1] == 106)
this.calmed = true;
else if (this.buffType[b1] == 121)
this.fishingSkill += 15;
else if (this.buffType[b1] == 122)
this.sonarPotion = true;
else if (this.buffType[b1] == 123)
this.cratePotion = true;
else if (this.buffType[b1] == 107)
{
this.tileSpeed += 0.25f;
this.wallSpeed += 0.25f;
++this.blockRange;
}
else if (this.buffType[b1] == 108)
this.kbBuff = true;
else if (this.buffType[b1] == 109)
{
this.ignoreWater = true;
this.accFlipper = true;
}
else if (this.buffType[b1] == 110)
++this.maxMinions;
else if (this.buffType[b1] == 150)
++this.maxMinions;
else if (this.buffType[b1] == 111)
this.dangerSense = true;
else if (this.buffType[b1] == 112)
this.ammoPotion = true;
else if (this.buffType[b1] == 113)
{
this.lifeForce = true;
this.statLifeMax2 += this.statLifeMax / 5 / 20 * 20;
}
else if (this.buffType[b1] == 114)
this.endurance += 0.1f;
else if (this.buffType[b1] == 115)
{
this.meleeCrit += 10;
this.rangedCrit += 10;
this.magicCrit += 10;
this.thrownCrit += 10;
}
else if (this.buffType[b1] == 116)
{
this.inferno = true;
Lighting.AddLight((int)((double)this.Center.X / 16.0), (int)((double)this.Center.Y / 16.0), 0.65f, 0.4f, 0.1f);
int type = 24;
float num = 200f;
bool flag = this.infernoCounter % 60 == 0;
int Damage = 10;
if (this.whoAmI == Main.myPlayer)
{
for (int number = 0; number < 200; ++number)
{
NPC npc = Main.npc[number];
if (npc.active && !npc.friendly && (npc.damage > 0 && !npc.dontTakeDamage) && (!npc.buffImmune[type] && (double)Vector2.Distance(this.Center, npc.Center) <= (double)num))
{
if (npc.HasBuff(type) == -1)
npc.AddBuff(type, 120, false);
if (flag)
{
npc.StrikeNPC(Damage, 0.0f, 0, false, false, false);
if (Main.netMode != 0)
NetMessage.SendData(28, -1, -1, "", number, (float)Damage, 0.0f, 0.0f, 0, 0, 0);
}
}
}
if (this.hostile)
{
for (int number = 0; number < (int)byte.MaxValue; ++number)
{
Player player = Main.player[number];
if (player != this && player.active && (!player.dead && player.hostile) && (!player.buffImmune[type] && (player.team != this.team || player.team == 0)) && (double)Vector2.Distance(this.Center, player.Center) <= (double)num)
{
if (player.HasBuff(type) == -1)
player.AddBuff(type, 120, true);
if (flag)
{
player.Hurt(Damage, 0, true, false, "", false);
if (Main.netMode != 0)
NetMessage.SendData(26, -1, -1, Lang.deathMsg(this.whoAmI, -1, -1, -1), number, 0.0f, (float)Damage, 1f, 0, 0, 0);
}
}
}
}
}
}
else if (this.buffType[b1] == 117)
{
this.thrownDamage += 0.1f;
this.meleeDamage += 0.1f;
this.rangedDamage += 0.1f;
this.magicDamage += 0.1f;
this.minionDamage += 0.1f;
}
else if (this.buffType[b1] == 119)
this.loveStruck = true;
else if (this.buffType[b1] == 120)
this.stinky = true;
else if (this.buffType[b1] == 124)
this.resistCold = true;
else if (this.buffType[b1] == 165)
{
this.lifeRegen += 6;
this.statDefense += 8;
this.dryadWard = true;
if ((double)this.thorns < 1.0)
this.thorns += 0.2f;
}
else if (this.buffType[b1] == 144)
{
this.electrified = true;
Lighting.AddLight((int)this.Center.X / 16, (int)this.Center.Y / 16, 0.3f, 0.8f, 1.1f);
}
else if (this.buffType[b1] == 94)
{
this.manaSick = true;
this.manaSickReduction = Player.manaSickLessDmg * ((float)this.buffTime[b1] / (float)Player.manaSickTime);
}
else if (this.buffType[b1] >= 95 && this.buffType[b1] <= 97)
{
this.buffTime[b1] = 5;
int num = (int)(byte)(1 + this.buffType[b1] - 95);
if (this.beetleOrbs > 0 && this.beetleOrbs != num)
{
if (this.beetleOrbs > num)
{
this.DelBuff(b1);
--b1;
}
else
{
for (int b2 = 0; b2 < 22; ++b2)
{
if (this.buffType[b2] >= 95 && this.buffType[b2] <= 95 + num - 1)
{
this.DelBuff(b2);
--b2;
}
}
}
}
this.beetleOrbs = num;
if (!this.beetleDefense)
{
this.beetleOrbs = 0;
this.DelBuff(b1);
--b1;
}
else
this.beetleBuff = true;
}
else if (this.buffType[b1] >= 170 && this.buffType[b1] <= 172)
{
this.buffTime[b1] = 5;
int num = (int)(byte)(1 + this.buffType[b1] - 170);
if (this.solarShields > 0 && this.solarShields != num)
{
if (this.solarShields > num)
{
this.DelBuff(b1);
--b1;
}
else
{
for (int b2 = 0; b2 < 22; ++b2)
{
if (this.buffType[b2] >= 170 && this.buffType[b2] <= 170 + num - 1)
{
this.DelBuff(b2);
--b2;
}
}
}
}
this.solarShields = num;
if (!this.setSolar)
{
this.solarShields = 0;
this.DelBuff(b1);
--b1;
}
}
else if (this.buffType[b1] >= 98 && this.buffType[b1] <= 100)
{
int num = (int)(byte)(1 + this.buffType[b1] - 98);
if (this.beetleOrbs > 0 && this.beetleOrbs != num)
{
if (this.beetleOrbs > num)
{
this.DelBuff(b1);
--b1;
}
else
{
for (int b2 = 0; b2 < 22; ++b2)
{
if (this.buffType[b2] >= 98 && this.buffType[b2] <= 98 + num - 1)
{
this.DelBuff(b2);
--b2;
}
}
}
}
this.beetleOrbs = num;
this.meleeDamage += 0.1f * (float)this.beetleOrbs;
this.meleeSpeed += 0.1f * (float)this.beetleOrbs;
if (!this.beetleOffense)
{
this.beetleOrbs = 0;
this.DelBuff(b1);
--b1;
}
else
this.beetleBuff = true;
}
else if (this.buffType[b1] >= 176 && this.buffType[b1] <= 178)
{
int num1 = this.nebulaLevelMana;
int num2 = (int)(byte)(1 + this.buffType[b1] - 176);
if (num1 > 0 && num1 != num2)
{
if (num1 > num2)
{
this.DelBuff(b1);
--b1;
}
else
{
for (int b2 = 0; b2 < 22; ++b2)
{
if (this.buffType[b2] >= 176 && this.buffType[b2] <= 178 + num2 - 1)
{
this.DelBuff(b2);
--b2;
}
}
}
}
this.nebulaLevelMana = num2;
if (this.buffTime[b1] == 2 && this.nebulaLevelMana > 1)
{
--this.nebulaLevelMana;
--this.buffType[b1];
this.buffTime[b1] = 480;
}
}
else if (this.buffType[b1] >= 173 && this.buffType[b1] <= 175)
{
int num1 = this.nebulaLevelLife;
int num2 = (int)(byte)(1 + this.buffType[b1] - 173);
if (num1 > 0 && num1 != num2)
{
if (num1 > num2)
{
this.DelBuff(b1);
--b1;
}
else
{
for (int b2 = 0; b2 < 22; ++b2)
{
if (this.buffType[b2] >= 173 && this.buffType[b2] <= 175 + num2 - 1)
{
this.DelBuff(b2);
--b2;
}
}
}
}
this.nebulaLevelLife = num2;
if (this.buffTime[b1] == 2 && this.nebulaLevelLife > 1)
{
--this.nebulaLevelLife;
--this.buffType[b1];
this.buffTime[b1] = 480;
}
this.lifeRegen += 10 * this.nebulaLevelLife;
}
else if (this.buffType[b1] >= 179 && this.buffType[b1] <= 181)
{
int num1 = this.nebulaLevelDamage;
int num2 = (int)(byte)(1 + this.buffType[b1] - 179);
if (num1 > 0 && num1 != num2)
{
if (num1 > num2)
{
this.DelBuff(b1);
--b1;
}
else
{
for (int b2 = 0; b2 < 22; ++b2)
{
if (this.buffType[b2] >= 179 && this.buffType[b2] <= 181 + num2 - 1)
{
this.DelBuff(b2);
--b2;
}
}
}
}
this.nebulaLevelDamage = num2;
if (this.buffTime[b1] == 2 && this.nebulaLevelDamage > 1)
{
--this.nebulaLevelDamage;
--this.buffType[b1];
this.buffTime[b1] = 480;
}
float num3 = 0.15f * (float)this.nebulaLevelDamage;
this.meleeDamage += num3;
this.rangedDamage += num3;
this.magicDamage += num3;
this.minionDamage += num3;
this.thrownDamage += num3;
}
else if (this.buffType[b1] == 62)
{
if ((double)this.statLife <= (double)this.statLifeMax2 * 0.5)
{
Lighting.AddLight((int)((double)this.Center.X / 16.0), (int)((double)this.Center.Y / 16.0), 0.1f, 0.2f, 0.45f);
this.iceBarrier = true;
this.endurance += 0.25f;
++this.iceBarrierFrameCounter;
if ((int)this.iceBarrierFrameCounter > 2)
{
this.iceBarrierFrameCounter = (byte)0;
++this.iceBarrierFrame;
if ((int)this.iceBarrierFrame >= 12)
this.iceBarrierFrame = (byte)0;
}
}
else
{
this.DelBuff(b1);
--b1;
}
}
else if (this.buffType[b1] == 49)
{
for (int index = 191; index <= 194; ++index)
{
if (this.ownedProjectileCounts[index] > 0)
this.pygmy = true;
}
if (!this.pygmy)
{
this.DelBuff(b1);
--b1;
}
else
this.buffTime[b1] = 18000;
}
else if (this.buffType[b1] == 83)
{
if (this.ownedProjectileCounts[317] > 0)
this.raven = true;
if (!this.raven)
{
this.DelBuff(b1);
--b1;
}
else
this.buffTime[b1] = 18000;
}
else if (this.buffType[b1] == 64)
{
if (this.ownedProjectileCounts[266] > 0)
this.slime = true;
if (!this.slime)
{
this.DelBuff(b1);
--b1;
}
else
this.buffTime[b1] = 18000;
}
else if (this.buffType[b1] == 125)
{
if (this.ownedProjectileCounts[373] > 0)
this.hornetMinion = true;
if (!this.hornetMinion)
{
this.DelBuff(b1);
--b1;
}
else
this.buffTime[b1] = 18000;
}
else if (this.buffType[b1] == 126)
{
if (this.ownedProjectileCounts[375] > 0)
this.impMinion = true;
if (!this.impMinion)
{
this.DelBuff(b1);
--b1;
}
else
this.buffTime[b1] = 18000;
}
else if (this.buffType[b1] == 133)
{
if (this.ownedProjectileCounts[390] > 0 || this.ownedProjectileCounts[391] > 0 || this.ownedProjectileCounts[392] > 0)
this.spiderMinion = true;
if (!this.spiderMinion)
{
this.DelBuff(b1);
--b1;
}
else
this.buffTime[b1] = 18000;
}
else if (this.buffType[b1] == 134)
{
if (this.ownedProjectileCounts[387] > 0 || this.ownedProjectileCounts[388] > 0)
this.twinsMinion = true;
if (!this.twinsMinion)
{
this.DelBuff(b1);
--b1;
}
else
this.buffTime[b1] = 18000;
}
else if (this.buffType[b1] == 135)
{
if (this.ownedProjectileCounts[393] > 0 || this.ownedProjectileCounts[394] > 0 || this.ownedProjectileCounts[395] > 0)
this.pirateMinion = true;
if (!this.pirateMinion)
{
this.DelBuff(b1);
--b1;
}
else
this.buffTime[b1] = 18000;
}
else if (this.buffType[b1] == 139)
{
if (this.ownedProjectileCounts[407] > 0)
this.sharknadoMinion = true;
if (!this.sharknadoMinion)
{
this.DelBuff(b1);
--b1;
}
else
this.buffTime[b1] = 18000;
}
else if (this.buffType[b1] == 140)
{
if (this.ownedProjectileCounts[423] > 0)
this.UFOMinion = true;
if (!this.UFOMinion)
{
this.DelBuff(b1);
--b1;
}
else
this.buffTime[b1] = 18000;
}
else if (this.buffType[b1] == 182)
{
if (this.ownedProjectileCounts[613] > 0)
this.stardustMinion = true;
if (!this.stardustMinion)
{
this.DelBuff(b1);
--b1;
}
else
this.buffTime[b1] = 18000;
}
else if (this.buffType[b1] == 187)
{
if (this.ownedProjectileCounts[623] > 0)
this.stardustGuardian = true;
if (!this.stardustGuardian)
{
this.DelBuff(b1);
--b1;
}
else
this.buffTime[b1] = 18000;
}
else if (this.buffType[b1] == 188)
{
if (this.ownedProjectileCounts[625] > 0)
this.stardustDragon = true;
if (!this.stardustDragon)
{
this.DelBuff(b1);
--b1;
}
else
this.buffTime[b1] = 18000;
}
else if (this.buffType[b1] == 161)
{
if (this.ownedProjectileCounts[533] > 0)
this.DeadlySphereMinion = true;
if (!this.DeadlySphereMinion)
{
this.DelBuff(b1);
--b1;
}
else
this.buffTime[b1] = 18000;
}
else if (this.buffType[b1] == 90)
{
this.mount.SetMount(0, this, false);
this.buffTime[b1] = 10;
}
else if (this.buffType[b1] == 128)
{
this.mount.SetMount(1, this, false);
this.buffTime[b1] = 10;
}
else if (this.buffType[b1] == 129)
{
this.mount.SetMount(2, this, false);
this.buffTime[b1] = 10;
}
else if (this.buffType[b1] == 130)
{
this.mount.SetMount(3, this, false);
this.buffTime[b1] = 10;
}
else if (this.buffType[b1] == 118)
{
this.mount.SetMount(6, this, true);
this.buffTime[b1] = 10;
}
else if (this.buffType[b1] == 138)
{
this.mount.SetMount(6, this, false);
this.buffTime[b1] = 10;
}
else if (this.buffType[b1] == 167)
{
this.mount.SetMount(11, this, true);
this.buffTime[b1] = 10;
}
else if (this.buffType[b1] == 166)
{
this.mount.SetMount(11, this, false);
this.buffTime[b1] = 10;
}
else if (this.buffType[b1] == 184)
{
this.mount.SetMount(13, this, true);
this.buffTime[b1] = 10;
}
else if (this.buffType[b1] == 185)
{
this.mount.SetMount(13, this, false);
this.buffTime[b1] = 10;
}
else if (this.buffType[b1] == 131)
{
this.ignoreWater = true;
this.accFlipper = true;
this.mount.SetMount(4, this, false);
this.buffTime[b1] = 10;
}
else if (this.buffType[b1] == 132)
{
this.mount.SetMount(5, this, false);
this.buffTime[b1] = 10;
}
else if (this.buffType[b1] == 168)
{
this.ignoreWater = true;
this.accFlipper = true;
this.mount.SetMount(12, this, false);
this.buffTime[b1] = 10;
}
else if (this.buffType[b1] == 141)
{
this.mount.SetMount(7, this, false);
this.buffTime[b1] = 10;
}
else if (this.buffType[b1] == 142)
{
this.mount.SetMount(8, this, false);
this.buffTime[b1] = 10;
}
else if (this.buffType[b1] == 143)
{
this.mount.SetMount(9, this, false);
this.buffTime[b1] = 10;
}
else if (this.buffType[b1] == 162)
{
this.mount.SetMount(10, this, false);
this.buffTime[b1] = 10;
}
else if (this.buffType[b1] == 37)
{
if (Main.wof >= 0 && Main.npc[Main.wof].type == 113)
{
this.gross = true;
this.buffTime[b1] = 10;
}
else
{
this.DelBuff(b1);
--b1;
}
}
else if (this.buffType[b1] == 38)
{
this.buffTime[b1] = 10;
this.tongued = true;
}
else if (this.buffType[b1] == 146)
{
this.moveSpeed += 0.1f;
this.moveSpeed *= 1.1f;
this.sunflower = true;
}
else if (this.buffType[b1] == 19)
{
this.buffTime[b1] = 18000;
this.lightOrb = true;
bool flag = true;
if (this.ownedProjectileCounts[18] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 18, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 155)
{
this.buffTime[b1] = 18000;
this.crimsonHeart = true;
bool flag = true;
if (this.ownedProjectileCounts[500] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 500, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 190)
{
this.buffTime[b1] = 18000;
this.suspiciouslookingTentacle = true;
bool flag = true;
if (this.ownedProjectileCounts[650] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 650, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 27 || this.buffType[b1] == 101 || this.buffType[b1] == 102)
{
this.buffTime[b1] = 18000;
bool flag = true;
int Type = 72;
if (this.buffType[b1] == 27)
this.blueFairy = true;
if (this.buffType[b1] == 101)
{
Type = 86;
this.redFairy = true;
}
if (this.buffType[b1] == 102)
{
Type = 87;
this.greenFairy = true;
}
if (this.head == 45 && this.body == 26 && this.legs == 25)
Type = 72;
if (this.ownedProjectileCounts[Type] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, Type, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 40)
{
this.buffTime[b1] = 18000;
this.bunny = true;
bool flag = true;
if (this.ownedProjectileCounts[111] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 111, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 148)
{
this.rabid = true;
if (Main.rand.Next(1200) == 0)
{
int num1 = Main.rand.Next(6);
float num2 = (float)Main.rand.Next(60, 100) * 0.01f;
if (num1 == 0)
this.AddBuff(22, (int)(60.0 * (double)num2 * 3.0), true);
else if (num1 == 1)
this.AddBuff(23, (int)(60.0 * (double)num2 * 0.75), true);
else if (num1 == 2)
this.AddBuff(31, (int)(60.0 * (double)num2 * 1.5), true);
else if (num1 == 3)
this.AddBuff(32, (int)(60.0 * (double)num2 * 3.5), true);
else if (num1 == 4)
this.AddBuff(33, (int)(60.0 * (double)num2 * 5.0), true);
else if (num1 == 5)
this.AddBuff(35, (int)(60.0 * (double)num2 * 1.0), true);
}
this.meleeDamage += 0.2f;
this.magicDamage += 0.2f;
this.rangedDamage += 0.2f;
this.thrownDamage += 0.2f;
this.minionDamage += 0.2f;
}
else if (this.buffType[b1] == 41)
{
this.buffTime[b1] = 18000;
this.penguin = true;
bool flag = true;
if (this.ownedProjectileCounts[112] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 112, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 152)
{
this.buffTime[b1] = 18000;
this.magicLantern = true;
if (this.ownedProjectileCounts[492] == 0)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 492, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 91)
{
this.buffTime[b1] = 18000;
this.puppy = true;
bool flag = true;
if (this.ownedProjectileCounts[334] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 334, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 92)
{
this.buffTime[b1] = 18000;
this.grinch = true;
bool flag = true;
if (this.ownedProjectileCounts[353] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 353, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 84)
{
this.buffTime[b1] = 18000;
this.blackCat = true;
bool flag = true;
if (this.ownedProjectileCounts[319] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 319, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 61)
{
this.buffTime[b1] = 18000;
this.dino = true;
bool flag = true;
if (this.ownedProjectileCounts[236] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 236, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 154)
{
this.buffTime[b1] = 18000;
this.babyFaceMonster = true;
bool flag = true;
if (this.ownedProjectileCounts[499] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 499, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 65)
{
this.buffTime[b1] = 18000;
this.eyeSpring = true;
bool flag = true;
if (this.ownedProjectileCounts[268] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 268, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 66)
{
this.buffTime[b1] = 18000;
this.snowman = true;
bool flag = true;
if (this.ownedProjectileCounts[269] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 269, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 42)
{
this.buffTime[b1] = 18000;
this.turtle = true;
bool flag = true;
if (this.ownedProjectileCounts[(int)sbyte.MaxValue] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, (int)sbyte.MaxValue, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 45)
{
this.buffTime[b1] = 18000;
this.eater = true;
bool flag = true;
if (this.ownedProjectileCounts[175] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 175, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 50)
{
this.buffTime[b1] = 18000;
this.skeletron = true;
bool flag = true;
if (this.ownedProjectileCounts[197] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 197, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 51)
{
this.buffTime[b1] = 18000;
this.hornet = true;
bool flag = true;
if (this.ownedProjectileCounts[198] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 198, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 52)
{
this.buffTime[b1] = 18000;
this.tiki = true;
bool flag = true;
if (this.ownedProjectileCounts[199] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 199, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 53)
{
this.buffTime[b1] = 18000;
this.lizard = true;
bool flag = true;
if (this.ownedProjectileCounts[200] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 200, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 54)
{
this.buffTime[b1] = 18000;
this.parrot = true;
bool flag = true;
if (this.ownedProjectileCounts[208] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 208, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 55)
{
this.buffTime[b1] = 18000;
this.truffle = true;
bool flag = true;
if (this.ownedProjectileCounts[209] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 209, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 56)
{
this.buffTime[b1] = 18000;
this.sapling = true;
bool flag = true;
if (this.ownedProjectileCounts[210] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 210, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 85)
{
this.buffTime[b1] = 18000;
this.cSapling = true;
bool flag = true;
if (this.ownedProjectileCounts[324] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 324, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 81)
{
this.buffTime[b1] = 18000;
this.spider = true;
bool flag = true;
if (this.ownedProjectileCounts[313] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 313, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 82)
{
this.buffTime[b1] = 18000;
this.squashling = true;
bool flag = true;
if (this.ownedProjectileCounts[314] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 314, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 57)
{
this.buffTime[b1] = 18000;
this.wisp = true;
bool flag = true;
if (this.ownedProjectileCounts[211] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 211, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 60)
{
this.buffTime[b1] = 18000;
this.crystalLeaf = true;
bool flag = true;
for (int index = 0; index < 1000; ++index)
{
if (Main.projectile[index].active && Main.projectile[index].owner == this.whoAmI && Main.projectile[index].type == 226)
{
if (!flag)
Main.projectile[index].Kill();
flag = false;
}
}
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 226, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == (int)sbyte.MaxValue)
{
this.buffTime[b1] = 18000;
this.zephyrfish = true;
bool flag = true;
if (this.ownedProjectileCounts[380] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 380, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 136)
{
this.buffTime[b1] = 18000;
this.miniMinotaur = true;
bool flag = true;
if (this.ownedProjectileCounts[398] > 0)
flag = false;
if (flag)
Projectile.NewProjectile(this.position.X + (float)(this.width / 2), this.position.Y + (float)(this.height / 2), 0.0f, 0.0f, 398, 0, 0.0f, this.whoAmI, 0.0f, 0.0f);
}
else if (this.buffType[b1] == 70)
this.venom = true;
else if (this.buffType[b1] == 20)
this.poisoned = true;
else if (this.buffType[b1] == 21)
this.potionDelay = this.buffTime[b1];
else if (this.buffType[b1] == 22)
this.blind = true;
else if (this.buffType[b1] == 80)
this.blackout = true;
else if (this.buffType[b1] == 23)
this.noItems = true;
else if (this.buffType[b1] == 24)
this.onFire = true;
else if (this.buffType[b1] == 103)
this.dripping = true;
else if (this.buffType[b1] == 137)
this.drippingSlime = true;
else if (this.buffType[b1] == 67)
this.burned = true;
else if (this.buffType[b1] == 68)
this.suffocating = true;
else if (this.buffType[b1] == 39)
this.onFire2 = true;
else if (this.buffType[b1] == 44)
this.onFrostBurn = true;
else if (this.buffType[b1] == 163)
{
this.headcovered = true;
this.bleed = true;
}
else if (this.buffType[b1] == 164)
this.vortexDebuff = true;
else if (this.buffType[b1] == 145)
this.moonLeech = true;
else if (this.buffType[b1] == 149)
{
this.webbed = true;
if ((double)this.velocity.Y != 0.0)
this.velocity = new Vector2(0.0f, 1E-06f);
else
this.velocity = Vector2.Zero;
Player.jumpHeight = 0;
this.gravity = 0.0f;
this.moveSpeed = 0.0f;
this.dash = 0;
this.noKnockback = true;
this.grappling[0] = -1;
this.grapCount = 0;
for (int index = 0; index < 1000; ++index)
{
if (Main.projectile[index].active && Main.projectile[index].owner == this.whoAmI && Main.projectile[index].aiStyle == 7)
Main.projectile[index].Kill();
}
}
else if (this.buffType[b1] == 43)
this.paladinBuff = true;
else if (this.buffType[b1] == 29)
{
this.magicCrit += 2;
this.magicDamage += 0.05f;
this.statManaMax2 += 20;
this.manaCost -= 0.02f;
}
else if (this.buffType[b1] == 28)
{
if (!Main.dayTime && this.wolfAcc && !this.merman)
{
++this.lifeRegen;
this.wereWolf = true;
this.meleeCrit += 2;
this.meleeDamage += 0.051f;
this.meleeSpeed += 0.051f;
this.statDefense += 3;
this.moveSpeed += 0.05f;
}
else
{
this.DelBuff(b1);
--b1;
}
}
else if (this.buffType[b1] == 33)
{
this.meleeDamage -= 0.051f;
this.meleeSpeed -= 0.051f;
this.statDefense -= 4;
this.moveSpeed -= 0.1f;
}
else if (this.buffType[b1] == 25)
{
this.statDefense -= 4;
this.meleeCrit += 2;
this.meleeDamage += 0.1f;
this.meleeSpeed += 0.1f;
}
else if (this.buffType[b1] == 26)
{
this.wellFed = true;
this.statDefense += 2;
this.meleeCrit += 2;
this.meleeDamage += 0.05f;
this.meleeSpeed += 0.05f;
this.magicCrit += 2;
this.magicDamage += 0.05f;
this.rangedCrit += 2;
this.rangedDamage += 0.05f;
this.thrownCrit += 2;
this.thrownDamage += 0.05f;
this.minionDamage += 0.05f;
this.minionKB += 0.5f;
this.moveSpeed += 0.2f;
}
else if (this.buffType[b1] == 71)
this.meleeEnchant = (byte)1;
else if (this.buffType[b1] == 73)
this.meleeEnchant = (byte)2;
else if (this.buffType[b1] == 74)
this.meleeEnchant = (byte)3;
else if (this.buffType[b1] == 75)
this.meleeEnchant = (byte)4;
else if (this.buffType[b1] == 76)
this.meleeEnchant = (byte)5;
else if (this.buffType[b1] == 77)
this.meleeEnchant = (byte)6;
else if (this.buffType[b1] == 78)
this.meleeEnchant = (byte)7;
else if (this.buffType[b1] == 79)
this.meleeEnchant = (byte)8;
}
}
}