|
المشاركات 2,515 |
+التقييم 1.28 |
تاريخ التسجيل Jul 2019 |
الاقامة |
نظام التشغيل |
رقم العضوية 358 |
public void Die(Entity killer)
Network.GamePackets.Attack animationdie = new Attack(true);
animationdie.Attacker = killer.UID;
animationdie.Attacked = this.UID;
animationdie.AttackType = Network.GamePackets.Attack.Kill;
animationdie.X = this.X;
animationdie.Y = this.Y;
this.SendScreen(animationdie);
else if (attacker.MonsterInfo.SpellID == 0)
if (attacked.Hitpoints <= damage)
{
// attacked.Die(attacker.UID);
foreach (var client in Program.Values)
attacked.Die(attacker);
public void Die(Entity killer)
public void Die(Entity killer)
{
try
{
#region Unique Killer
if (EntityFlag == EntityFlag.Entity && killer.EntityFlag == EntityFlag.Entity)
{
if (killer.MapID == 2014)
{
if (killer.MapID == 2014)
{
killer.Owner.uniquepoints += 1;
if (killer.Owner.uniquepoints >= 20)
{
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Congratulations, You Have Now " + killer.Owner.uniquepoints + " Points you can claim your prize now!");
npc.OptionID = 255;
killer.Owner.Send(npc.ToArray());
}
else
{
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "You Have Now " + killer.Owner.uniquepoints + " Points Congratz you still need " + (20 - killer.Owner.uniquepoints) + " more!");
npc.OptionID = 255;
killer.Owner.Send(npc.ToArray());
}
}
}
#endregion
#region CpsDraobMAP
if (killer.MapID == 1234)
{
if (ConquerPoints >= 1200)
{
ConquerPoints -= 1200;
killer.ConquerPoints += 1200;
}
}
if (killer.MapID == 1235)
{
if (ConquerPoints >= 800)
{
ConquerPoints -= 800;
killer.ConquerPoints += 800;
}
}
if (killer.MapID == 1236)
{
if (ConquerPoints >= 600)
{
ConquerPoints -= 600;
killer.ConquerPoints += 600;
}
}
if (killer.MapID == 1237)
{
if (ConquerPoints >= 400)
{
ConquerPoints -= 400;
killer.ConquerPoints += 400;
}
}
if (killer.MapID == 1238)
{
if (ConquerPoints >= 500)
{
ConquerPoints -= 500;
killer.ConquerPoints += 500;
}
}
#endregion
#region Xocount and countkilling
if (Owner.Spells.ContainsKey(12660) && Owner.Player.EpicWarrior())
{
XPCountTwist = Owner.XPCount;
}
if (killer.CountKilling >= 100 && killer.HeavenBlessing > 0 && killer.BlessedHunting < 4578)
{
killer.CountKilling = 0;
killer.BlessedHunting += 1;
}
#endregion
#region Flag
if (ContainsFlag3((ulong)1UL << 53))
RemoveFlag3((ulong)1UL << 53);
if (Owner.Spells.ContainsKey(12660))
{
XPCountTwist = Owner.XPCount;
}
#endregion
#region Experince
if (!Constants.PKFreeMaps.Contains(MapID))
{
if (Level < 140 && Experience != 0)
{
ulong amount = 0;
if (VIPLevel < 4)
{
Experience -= Math.Min(Hitpoints * MaxHitpoints * Level, Experience);
amount = Math.Min(Hitpoints * MaxHitpoints * Level, Experience);
killer.Owner.IncreaseExperience(amount, false);
}
else
{
Experience -= Math.Min(Hitpoints * MaxHitpoints * Level, Experience) / 2;
amount = Math.Min(Hitpoints * MaxHitpoints * Level, Experience) / 2;
killer.Owner.IncreaseExperience(amount, false);
}
Owner.Send(new Message("You lost " + amount + " EXP!", System.Drawing.Color.Red, Message.System));
}
}
#endregion
if (killer.MapID == 3979)
{
killer.MessiPoints += 25;
}
Owner.Send(new Message("You are dead.", System.Drawing.Color.Red, Message.System));
}
#region MyClones
if (MyClones.Count > 0)
{
foreach (var item in MyClones.Values)
{
Data data = new Data(true);
data.UID = item.UID;
data.ID = Network.GamePackets.Data.RemoveEntity;
item.MonsterInfo.SendScreen(data);
}
MyClones.Clear();
}
#endregion
#region Perfection
if (EntityFlag == EntityFlag.Entity && Perfection != null)
{
Game.Enums.PerfectionEffect effect = Enums.PerfectionEffect.StraightLife;
byte chance = 0;
new MsgRefineEffect().HandleStraightLife(this, ref chance);
killer.StraightLife = 0;//true
if (Kernel.Rate(chance))
{
new MsgRefineEffect().SendEffect(this, killer, effect);
}
}
#endregion
#region CaptureTheFlag
if (killer.GuildID != 0 && killer.MapID == CaptureTheFlag.MapID && CaptureTheFlag.IsWar)
{
if (GuildID != 0)
{
if (killer.Owner.Guild.Enemy.ContainsKey(GuildID))
killer.Owner.Guild.CTFPoints += 1;
else if (killer.Owner.Guild.Ally.ContainsKey(GuildID))
killer.Owner.Guild.CTFPoints += 1;
}
if (ContainsFlag2(Network.GamePackets.Update.Flags2.CarryingFlag))
{
StaticEntity entity = new StaticEntity((uint)(X * 1000 + Y), X, Y, MapID);
entity.DoFlag();
Owner.Map.AddStaticEntity(entity);
RemoveFlag2(Network.GamePackets.Update.Flags2.CarryingFlag);
Owner.Send(Program.World.CTF.generateTimer(0));
Owner.Send(Program.World.CTF.generateEffect(Owner));
if (killer.GuildID != GuildID)
{
Killer.AddFlag2(Network.GamePackets.Update.Flags2.CarryingFlag);
Time32 end = FlagStamp.AddSeconds(60) - Time32.Now;
killer.FlagStamp = end;
killer.Owner.Send(Program.World.CTF.generateTimer((uint)end.Value));
killer.Owner.Send(Program.World.CTF.generateEffect(killer.Owner));
killer.Owner.Guild.CTFPoints += 3;
}
}
}
#endregion
#region Die Guild System
if (killer.EntityFlag == EntityFlag.Entity && EntityFlag == EntityFlag.Entity)
{
if (Owner.Guild != null && killer.Owner.Guild != null && Owner.Map.ID == 1015)
{
Owner.Guild.pkp_donation += 2;
Owner.Guild.pkp_donation -= 2;
foreach (var client in Kernel.GamePool.Values)
{
client.Send(new Message("The " + killer.Owner.AsMember.Rank + " " + killer.Name + " of the Guild " + killer.Owner.Guild.Name + " has killed the " + killer.Owner.AsMember.Rank + " " + Name + " of the Guild " + Owner.Guild.Name + " at BirdIsland!", System.Drawing.Color.Yellow, Network.GamePackets.Message.Guild));
}
}
if (Owner.Guild != null && killer.Owner.Guild != null && Owner.Map.ID == 1020)
{
Owner.Guild.pkp_donation += 2;
Owner.Guild.pkp_donation -= 2;
foreach (var client in Kernel.GamePool.Values)
client.Send(new Message("The " + killer.Owner.AsMember.Rank + " " + killer.Name + " of the Guild " + killer.Owner.Guild.Name + " has killed the " + killer.Owner.AsMember.Rank + " " + Name + " of the Guild " + Owner.Guild.Name + " at ApeCity!", System.Drawing.Color.Yellow, Network.GamePackets.Message.Guild));
}
if (Owner.Guild != null && killer.Owner.Guild != null && Owner.Map.ID == 1011)
{
Owner.Guild.pkp_donation += 2;
Owner.Guild.pkp_donation -= 2;
foreach (var client in Kernel.GamePool.Values)
client.Send(new Message("The " + killer.Owner.AsMember.Rank + " " + killer.Name + " of the Guild " + killer.Owner.Guild.Name + " has killed the " + killer.Owner.AsMember.Rank + " " + Name + " of the Guild " + Owner.Guild.Name + " at PhoenixCastle!", System.Drawing.Color.Yellow, Network.GamePackets.Message.Guild));
}
if (Owner.Guild != null && killer.Owner.Guild != null && Owner.Map.ID == 1000)
{
Owner.Guild.pkp_donation += 2;
Owner.Guild.pkp_donation -= 2;
foreach (var client in Kernel.GamePool.Values)
client.Send(new Message("The " + killer.Owner.AsMember.Rank + " " + killer.Name + " of the Guild " + killer.Owner.Guild.Name + " has killed the " + killer.Owner.AsMember.Rank + " " + Name + " of the Guild " + Owner.Guild.Name + " at DesertCity!", System.Drawing.Color.Yellow, Network.GamePackets.Message.Guild));
}
}
#endregion
#region Booth
if (EntityFlag == EntityFlag.Entity)
{
Owner.XPCount = 0;
if (OnDeath != null) OnDeath(this);
if (Owner.Booth != null)
{
Owner.Booth.Remove();
Owner.Booth = null;
}
}
#endregion
#region killerCountM
killer.CountKilling++;
killer.KillCount++;
killer.KillCount2++;
Killer = killer;
Hitpoints = 0;
DeathStamp = Time32.Now;
ToxicFogLeft = 0;
#endregion
#region Companion
if (Companion)
{
if (Hitpoints < 1)
{
Hitpoints = 0;
AddFlag((ulong)Network.GamePackets.Update.Flags.Ghost | (ulong)Network.GamePackets.Update.Flags.Dead | (ulong)Network.GamePackets.Update.Flags.FadeAway);
Attack attackx = new Attack(true);
attackx.Attacked = UID;
attackx.AttackType = Network.GamePackets.Attack.Kill;
attackx.X = X;
attackx.Y = Y;
MonsterInfo.SendScreen(attackx);
Owner.Map.RemoveEntity(this);
Owner.Pet.RemovePet(pettype);
}
}
#endregion
if (EntityFlag == EntityFlag.Entity)
{
if (killer.EntityFlag == EntityFlag.Entity)
{
if (Constants.PKFreeMaps.Contains(killer.MapID))
goto Over;
if (killer.Owner.Map.BaseID == 700)
goto Over;
if (((killer.PKMode != Mr_Panda.Game.Enums.PKMode.Jiang) && (killer.PKMode != Mr_Panda.Game.Enums.PKMode.Guild) && (killer.PKMode != Mr_Panda.Game.Enums.PKMode.Revenge) && (!ContainsFlag(Network.GamePackets.Update.Flags.FlashingName) && !ContainsFlag(Network.GamePackets.Update.Flags.BlackName)) && !this.ContainsFlag(1L)) && !this.ContainsFlag(0x8000L))
{
killer.AddFlag(Network.GamePackets.Update.Flags.FlashingName);
killer.FlashingNameStamp = Time32.Now;
killer.FlashingNameTime = 60;
if (killer.GuildID != 0)
{
if (killer.Owner.Guild.Enemy.ContainsKey(GuildID))
{
killer.PKPoints += 3;
killer.Cursed = Time32.Now;
Update update = new Update(true) { UID = killer.UID };
update.Append(Network.GamePackets.Update.CursedTimer, UID);
killer.AddFlag(Network.GamePackets.Update.Flags.Cursed);
killer.Owner.Send(update.ToArray());
}
else
{
if (!killer.Owner.Enemy.ContainsKey(UID))
killer.PKPoints += 10;
else
killer.PKPoints += 5;
killer.PKPoints += 3;
killer.Cursed = Time32.Now;
Update update = new Update(true) { UID = killer.UID };
update.Append(Network.GamePackets.Update.CursedTimer, UID);
killer.AddFlag(Network.GamePackets.Update.Flags.Cursed);
killer.Owner.Send(update.ToArray());
}
}
else
{
if (!killer.Owner.Enemy.ContainsKey(UID))
{
killer.PKPoints += 10;
}
else
{
killer.PKPoints += 5;
}
killer.Cursed = Time32.Now;
Update update = new Update(true) { UID = killer.UID };
update.Append(Network.GamePackets.Update.CursedTimer, UID);
killer.AddFlag(Network.GamePackets.Update.Flags.Cursed);
killer.Owner.Send(update.ToArray());
}
if (killer.EntityFlag == Game.EntityFlag.Entity)
{
if (EntityFlag == Game.EntityFlag.Entity)
{
Game.PkExpeliate pk = new Game.PkExpeliate();
if (!killer.PkExplorerValues.ContainsKey(UID))
{
pk.UID = killer.UID;
pk.killedUID = UID;
pk.Name = Name;
pk.KilledAt = GetMapName(MapID);
pk.LostExp = 0;
pk.Times = 1;
pk.Potency = (uint)BattlePower;
pk.Level = Level;
PkExpelTable.PkExploitAdd(killer.Owner, pk);
}
else
{
pk.UID = killer.UID;
pk.killedUID = UID;
pk.Name = Name;
pk.KilledAt = GetMapName(MapID);
pk.LostExp = 0;
killer.PkExplorerValues[UID].Times += 1;
pk.Times = killer.PkExplorerValues[UID].Times;
pk.Potency = (uint)BattlePower;
pk.Level = Level;
PkExpelTable.Update(killer.Owner, pk);
}
}
}
Network.PacketHandler.AddEnemy(this.Owner, killer.Owner);
}
if (killer.PKMode != Mr_Panda.Game.Enums.PKMode.Jiang)
{
if (killer.EntityFlag == Mr_Panda.Game.EntityFlag.Entity)
{
if (Kernel.Rate(50))
{
DropRandomStuff(Killer);
}
}
}
}
}
Over:
Network.GamePackets.Attack attack = new Attack(true);
attack.Attacker = killer.UID;
attack.Attacked = UID;
attack.AttackType = Network.GamePackets.Attack.Kill;
attack.X = X;
attack.Y = Y;
if (EntityFlag == EntityFlag.Entity)
{
AddFlag(Network.GamePackets.Update.Flags.Ghost);
AddFlag(Network.GamePackets.Update.Flags.Dead);
RemoveFlags();
SpiritFocus = false;
#region Aura
if (Aura_isActive)
{
RemoveFlag2(Aura_actType);
Owner.removeAuraBonuses(Aura_actType, Aura_actPower, 1);
Aura_isActive = false;
AuraTime = 0;
Aura_actType = 0;
Aura_actPower = 0;
}
#endregion
if (Body % 10 < 3)
TransformationID = 99;
else
TransformationID = 98;
Owner.SendScreen(attack, true);
Owner.Send(new MapStatus() { BaseID = Owner.Map.BaseID, ID = Owner.Map.ID, Status = Database.MapsTable.MapInformations[Owner.Map.ID].Status, Weather = Database.MapsTable.MapInformations[Owner.Map.ID].Weather });
Owner.EndQualifier();
}
else
{
if (!Companion && !IsDropped)
MonsterInfo.Drop(killer);
Kernel.Maps[MapID].Floor[X, Y, MapObjType, this] = true;
if (killer.EntityFlag == EntityFlag.Entity)
{
#region Team
if (killer.Owner.Team != null)
{
killer.Owner.IncreaseExperience(MaxHitpoints, true);
foreach (Client.GameState teammate in killer.Owner.Team.Teammates)
{
if (Kernel.GetDistance(killer.X, killer.Y, teammate.Player.X, teammate.Player.Y) <= Constants.pScreenDistance)
{
if (killer.UID != teammate.Player.UID)
{
uint extraExperience = MaxHitpoints / 2;
if (killer.Spouse == teammate.Player.Name)
extraExperience = MaxHitpoints * 2;
byte TLevelN = teammate.Player.Level;
if (killer.Owner.Team.CanGetNoobExperience(teammate))
{
if (teammate.Player.Level < 137)
{
extraExperience *= 2;
teammate.IncreaseExperience(extraExperience, false);
teammate.Send(Constants.NoobTeamExperience(extraExperience));
}
}
else
{
if (teammate.Player.Level < 137)
{
teammate.IncreaseExperience(extraExperience, false);
teammate.Send(Constants.TeamExperience(extraExperience));
}
}
byte TLevelNn = teammate.Player.Level;
byte newLevel = (byte)(TLevelNn - TLevelN);
if (newLevel != 0)
{
if (TLevelN < 70)
{
for (int i = TLevelN; i < TLevelNn; i++)
{
teammate.Team.Teammates[0].VirtuePoints += (uint)(i * 3.83F);
teammate.Team.SendMessage(new Message("The leader, " + teammate.Team.Teammates[0].Player.Name + ", has gained " + (uint)(i * 7.7F) + " virtue points for power leveling the rookies.", System.Drawing.Color.Red, Message.Team));
}
}
}
}
}
}
}
#endregion
if (killer.OnKOSpell())
killer.KOSpellTime++;
else killer.Owner.XPCount++;
}
}
if (EntityFlag == EntityFlag.Entity)
if (OnDeath != null) OnDeath(this);
}
catch (Exception e)
{
Console.WriteLine(e);
}
}
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
أدوات الموضوع | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
اذاي اخلي الجارد يلبس سلاحين و يبقي شكل الاكونت العادي | Tefa | تطوير سيرفرات كونكر | 9 | 2022-04-06 04:53 PM |
اذاي اخلي الواتر يموت من ٤ او ٥ | سمير | تطوير سيرفرات كونكر | 0 | 2021-09-18 08:09 PM |
عاوز اول ما الاكونت يموت يصحي علي طول | Mr3bdallahPro | مشكلات السيرفيرات كونكر الشخصيه | 4 | 2020-05-02 03:47 PM |
مشكلة الاج الخفيف لما الاكونت يموت | MRonlineGvrix | مشكلات السيرفيرات كونكر الشخصيه | 4 | 2020-02-29 01:37 PM |
اذاي اخلي اي ايتم تترد ؟؟؟ | Tefa | تطوير سيرفرات كونكر | 8 | 2019-07-12 01:03 PM |