Ejemplo n.º 1
0
 public void OnClickGive()
 {
     if (m_GiveGold == 0)
     {
         return;
     }
     C2G.GuildGoldGive packet = new C2G.GuildGoldGive();
     packet.guild_idx = GuildManager.Instance.GuildIdx;
     packet.give_gold = m_GiveGold;
     Network.GameServer.JsonAsync <C2G.GuildGoldGive, C2G.GuildAck>(packet, OnGuildGoldGive);
 }
Ejemplo n.º 2
0
 void OnGuildGoldGive(C2G.GuildGoldGive packet, C2G.GuildAck ack)
 {
     switch (ack.result)
     {
     case pe_GuildResult.Success:
         Network.PlayerInfo.UseGoods(ack.use_goods);
         GameMain.Instance.UpdatePlayerInfo();
         GuildManager.Instance.SetGuildInfo(ack.guild_info);
         GameMain.Instance.UpdateMenu();
         base.OnClose();
         break;
     }
 }