Cheat Engine Item ID Exploit
Is there any way to fix that you can't use Cheat Engine to change the Item ID's and use any Weapon you want?
private bool IsValid(Item item1, Item item2, IContainer con1, IContainer con2, InvSwapPacket packet,
Client client)
{
if (con2 is Container)
return true;
bool ret = false;
if (con1 is Container)
{
ret = con2.AuditItem(item1, packet.Obj2.SlotId);
if (!ret)
{
Console.WriteLine("Cheat engine detected for player {0},\nInvalid InvSwap. {1} instead of {2}",
client.Player.Name, client.Manager.GameData.Items[(ushort)packet.Obj1.ObjectType].ObjectId,
item1.ObjectId);
foreach (Player player in client.Player.Owner.Players.Values)
if (player.Client.Account.Rank >= 2)
player.SendInfo(
String.Format(
"Cheat engine detected for player {0},\nInvalid InvSwap. {1} instead of {2}",
client.Player.Name,
client.Manager.GameData.Items[(ushort)packet.Obj1.ObjectType].ObjectId,
item1.ObjectId));
}
}
if (con1 is Player && con2 is Player)
{
ret = con1.AuditItem(item1, packet.Obj2.SlotId) && con2.AuditItem(item2, packet.Obj1.SlotId);
if (!ret)
{
Console.WriteLine("Cheat engine detected for player {0},\nInvalid InvSwap. {1} instead of {2}",
client.Player.Name, item1.ObjectId,
client.Manager.GameData.Items[(ushort)packet.Obj2.ObjectType].ObjectId);
foreach (Player player in client.Player.Owner.Players.Values)
if (player.Client.Account.Rank >= 2)
player.SendInfo(
String.Format(
"Cheat engine detected for player {0},\nInvalid InvSwap. {1} instead of {2}",
client.Player.Name, item1.ObjectId,
client.Manager.GameData.Items[(ushort)packet.Obj2.ObjectType].ObjectId));
}
}
return ret;
}
<Object type="0x2367" id="Pixie-Enchanted Sword" setType="0x0003" setName="Swoll Paladin Set">
<Class>Equipment</Class>
<Item/>
<Texture>
<File>lofiObj3</File>
<Index>0x519</Index>
</Texture>
<SlotType>1</SlotType>
<Description>{equip.Pixies_are_often_a_more_aggressive_fae._It_makes_great_sens}</Description>
<RateOfFire>1</RateOfFire>
<Sound>weapon/mithril_sword</Sound>
<Projectile>
<ObjectId>Fairy Bullet</ObjectId>
<Speed>140</Speed>
<MinDamage>75</MinDamage>
<MaxDamage>90</MaxDamage>
<LifetimeMS>325</LifetimeMS>
<Size>80</Size>
</Projectile>
<NumProjectiles>4</NumProjectiles>
<ArcGap>10</ArcGap>
<ActivateOnEquip stat="20" amount="1">IncrementStat</ActivateOnEquip>
<BagType>4</BagType>
<FameBonus>4</FameBonus>
<OldSound>bladeSwing</OldSound>
<feedPower>500</feedPower>
<DisplayId>{equip.Pixie-Enchanted_Sword}</DisplayId>
</Object>