help with TopGL and DL

03/31/2012 00:31 zoro7070#1

i used that code to add top guild leader flag to winner guild but the problem when the war start the flag doesn't remove here is the c# code
Code:
if (client.Guild != null)
            {
                if (client.Entity.GuildRank == (ushort)Game.Enums.GuildMemberRank.DeputyLeader)
                {
                    if (client.Guild.Name == Game.ConquerStructures.Society.GuildWar.Pole.Name || Game.ConquerStructures.Society.GuildWar.IsWar == false)
                    {
                        client.Entity.AddFlag(Update.Flags.TopDeputyLeader);
                    }
                    else
                    {
                        client.Entity.RemoveFlag(Update.Flags.TopDeputyLeader);
                    }
                }
                else if (client.Entity.GuildRank == (ushort)Game.Enums.GuildMemberRank.GuildLeader)
                {
                    if (client.Guild.Name == Game.ConquerStructures.Society.GuildWar.Pole.Name || Game.ConquerStructures.Society.GuildWar.IsWar == false)
                    {
                       client.Entity.AddFlag(Update.Flags.TopGuildLeader);
                    }
                    else
                    {
                        client.Entity.RemoveFlag(Update.Flags.TopGuildLeader);
                    }
                }

            }
i have another problems the player skills don't save i use @save but didn't do anything
Code:
case "@save":
                    {
                        using (var conn = Database.DataHolder.MySqlConnection)
                        {
                            conn.Open();

                            var WC = ServerBase.Kernel.GamePool.Values.ToArray();
                            int total = WC.Length;
                            foreach (Client.GameState client in WC)
                            {
                                client.Account.Save(conn);
                                Database.EntityTable.SaveEntity(client, conn);
                                Database.SkillTable.SaveSkills(client, conn);
                                Database.ArenaTable.SaveArenaStatistics(client.ArenaStatistic, conn);
                            }
                            conn.Close();
                            new Database.MySqlCommand(Database.MySqlCommandType.UPDATE).Update("configuration")
    .Set("GuildID", Game.ConquerStructures.Society.Guild.GuildCounter.Now)
    .Set("ItemUID", Network.GamePackets.ConquerItem.ItemUID.Now)
    .Set("DetainItemUID", Database.DetainedItemTable.Counter.Now).Set("ClanUID", Game.Clans.ClanCount.Now)
    .Where("Server", ServerBase.Constants.ServerName).Execute();

                        }
                    }

03/31/2012 07:12 Sp!!ke#2
learn to code baby , first it's my code but you don't know how to use it ! and for skills , 5517 source it's a fking shit ! , you need to re-code skill save table
03/31/2012 11:26 shadowman123#3
y dont u reset top halos every Saterday and fix the above code
03/31/2012 14:52 zoro7070#4
Quote:
Originally Posted by shadowman123 View Post
y dont u reset top halos every Saterday and fix the above code
can you help be fix saving skils
03/31/2012 14:57 shadowman123#5
Quote:
Originally Posted by zoro7070 View Post
can you help be fix saving skils
actualy i solved this problem in my source but sry i dont give codes away ..Check Trinity Source
03/31/2012 15:20 zoro7070#6
ok np thanks for your help
03/31/2012 16:12 pro4never#7
Static Guild CurrentWinner

//on win
foreach(Player p in GuildManager.CurrentWinner.Members)
{
p.RemoveEffect(TopGuildHaloEffect);
p.RemoveEffect(TopDepHaloEffect);
}
GuildManager.CurrentWinner = newWinner;
foreach(Player p in GuildManager.CurrentWinner.Members)
{
if(p.Guild.Rank == GuildLeader)
p.AddEffect(TopGuildHaloEffect);
else if(p.Guild.Rank == DeputyLeader)
p.AddEffect(TopGuildHaloEffect)
}


Something like that is how I'd do it. Just store the current winner and add/remove effects every time the winner changes.
03/31/2012 18:56 zoro7070#8
you are the best
04/01/2012 21:33 Sp!!ke#9
pro4never I'm sure him thanked you for the code but can't understand what you trying to explain !
04/05/2012 19:53 zoro7070#10
Quote:
Originally Posted by Sp!!ke View Post
pro4never I'm sure him thanked you for the code but can't understand what you trying to explain !
of course i do :D