public override int HandlePacket(GamePlayer player, GSPacketIn packet) { int result2; if (player.PlayerCharacter.ConsortiaID == 0) { result2 = 0; } else { int id = packet.ReadInt(); bool result = false; string msg = "ConsortiaDutyDeleteHandler.Failed"; using (ConsortiaBussiness db = new ConsortiaBussiness()) { if (db.DeleteConsortiaDuty(id, player.PlayerCharacter.ID, player.PlayerCharacter.ConsortiaID, ref msg)) { msg = "ConsortiaDutyDeleteHandler.Success"; result = true; } } packet.WriteBoolean(result); packet.WriteString(LanguageMgr.GetTranslation(msg, new object[0])); player.Out.SendTCP(packet); result2 = 0; } return(result2); }
public int HandlePacket(GameClient client, GSPacketIn packet) { if (client.Player.PlayerCharacter.ConsortiaID == 0) { return(0); } int id = packet.ReadInt(); bool result = false; string msg = "ConsortiaDutyDeleteHandler.Failed"; using (ConsortiaBussiness db = new ConsortiaBussiness()) { if (db.DeleteConsortiaDuty(id, client.Player.PlayerCharacter.ID, client.Player.PlayerCharacter.ConsortiaID, ref msg)) { msg = "ConsortiaDutyDeleteHandler.Success"; result = true; } } packet.WriteBoolean(result); packet.WriteString(LanguageMgr.GetTranslation(msg)); client.Out.SendTCP(packet); return(0); }