/// <summary> /// Fake equip, don't pass effects to local stats /// </summary> /// <param name="it">Item</param> /// <param name="ch">Character</param> /// <param name="tosocialtab">should it be equipped to social tab</param> /// <param name="location">Location</param> public void FakeEquipItem(AOItem it, Character ch, bool tosocialtab, int location) { int counter = 0; int f; lock (ch) { while (counter < it.Events.Count) { if (it.Events[counter].EventType == Constants.EventtypeOnWear) { this.ExecuteEvent( this, this, it.Events[counter], false, tosocialtab, location, CheckReqs.doEquipCheckReqs); } counter++; } // TODO check if still needed // Set Weaponmesh // Todo: another packet has to be sent, defining how to hold the weapon if (it.ItemType == Constants.itemtype_Weapon) { this.stats.WeaponsStyle.Value |= it.GetWeaponStyle(); if (tosocialtab) { this.stats.WeaponsStyle.Value = it.GetWeaponStyle(); } counter = 0; f = -1; while (counter < it.Stats.Count) { if (it.Stats[counter].Stat == 209) { f = counter; // found Weapon mesh attribute break; } counter++; } if (f != -1) { if (!tosocialtab) { if (location == 6) { this.stats.WeaponMeshRight.Set((uint)it.Stats[f].Value); // Weaponmesh this.meshLayer.AddMesh(1, it.Stats[f].Value, 0, 4); } else { this.stats.WeaponMeshLeft.Set((uint)it.Stats[f].Value); // Weaponmesh this.meshLayer.AddMesh(2, it.Stats[f].Value, 0, 4); } } else { if (location == 61) { if (this.SocialTab.ContainsKey(1006)) { this.SocialTab[1006] = it.Stats[f].Value; } else { this.SocialTab.Add(1006, it.Stats[f].Value); } this.socialMeshLayer.AddMesh(1, it.Stats[f].Value, 0, 4); } else { if (this.SocialTab.ContainsKey(1007)) { this.SocialTab[1007] = it.Stats[f].Value; } else { this.SocialTab.Add(1007, it.Stats[f].Value); } this.socialMeshLayer.AddMesh(2, it.Stats[f].Value, 0, 4); } } } } } }