41889 {
41891 {
41892 return;
41893 }
41894 for (
int i = 0;
i < 255;
i++)
41895 {
41896 Player player = Main.player[
i];
41897 if (i ==
whoAmI || !player.active || !player.hostile || player.immune || player.dead || (
team != 0 &&
team == player.team) || !
itemRectangle.Intersects(player.Hitbox) || !
CanHit(player))
41898 {
41899 continue;
41900 }
41901 bool flag = false;
41902 if (Main.rand.Next(1, 101) <= 10)
41903 {
41904 flag = true;
41905 }
41906 int num = Main.DamageVar(damage,
luck);
41908 OnHit(player.Center.X, player.Center.Y, player);
41912 {
41915 vector *= (float)Main.rand.Next(30, 41) * 0.1f;
41919 }
41920 if (
sItem.type == 5097)
41921 {
41923 }
41925 {
41928 }
41930 {
41931 Projectile.NewProjectile(
GetProjectileSource_Misc(8), player.Center.X, player.Center.Y, player.velocity.X, player.velocity.Y, 289, 0, 0f,
whoAmI);
41932 }
41933 if (
sItem.type == 1123)
41934 {
41935 int num3 = Main.rand.Next(1, 4);
41937 {
41939 }
41940 for (
int j = 0;
j <
num3;
j++)
41941 {
41942 float num4 = (float)(
direction * 2) + (float)Main.rand.Next(-35, 36) * 0.02f;
41943 float num5 = (float)Main.rand.Next(-35, 36) * 0.02f;
41947 Main.projectile[
num6].melee =
true;
41948 }
41949 }
41951 {
41953 if (Main.netMode == 1)
41954 {
41955 NetMessage.SendData(84, -1, -1,
null,
whoAmI);
41956 }
41957 }
41958 if (Main.netMode != 0)
41959 {
41961 }
41963 }
41964 }
static PlayerDeathReason ByPlayer(int index)
void ApplyAttackCooldown()
void StatusToPlayerPvP(int type, int i)
IEntitySource GetProjectileSource_Misc(int projectileSourceId)
IEntitySource GetProjectileSource_Item(Item item)
void BatBat_TryLifeLeeching(Entity entity)
void OnHit(float x, float y, Entity victim)