コード例 #1
0
        static bool DeleteCharAccessories(uint charId)
        {
            try
            {
                SpellRecord.DeleteAll("OwnerId = " + charId);
                AuraRecord.DeleteAll("OwnerId = " + charId);
                ItemRecord.DeleteAll("OwnerId = " + charId);
                SkillRecord.DeleteAll("OwnerId = " + charId);
                SpecProfile.DeleteAll("CharacterId = " + charId);
                ReputationRecord.DeleteAll("OwnerId = " + charId);
                QuestRecord.DeleteAll("OwnerId = " + charId);
                SummonedPetRecord.DeleteAll("OwnerLowId = " + charId);
                PermanentPetRecord.DeleteAll("OwnerLowId = " + charId);

                MailMgr.ReturnValueMailFor(charId);
                MailMessage.DeleteAll("ReceiverId = " + charId);

                RelationMgr.Instance.RemoveRelations(charId);
                InstanceMgr.RemoveLog(charId);
                GroupMgr.Instance.RemoveOfflineCharacter(charId);
                AchievementRecord.DeleteAll("CharacterId = " + charId);
                AchievementProgressRecord.DeleteAll("CharacterId = " + charId);

                return(true);
            }
            catch (Exception ex)
            {
                LogUtil.ErrorException(ex, "Failed to delete character with Id: " + charId);

                return(false);
            }
        }