Рейтинг темы:
  • 0 Голос(ов) - 0 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
Coupon effect
#11
Hey PROGRAMMATOR

Как я могу получить больше эффект купоны?

writeD(0x8000 * 0x4000 * 0x40); ??
Ответ
#12
https://forum.zone-game.info/showpost.ph...ostcount=4
Ответ
#13
SM_ROOM_SLOT_INFO

Correct ?

Код:
writeC((byte)_room.getSlotState(slot)); // Slot.State
                                writeC((byte)playerBySlot.getRank()); // Player.Rank
                                if (clan.clan_id != 0) // ClanId
                                {
                                    writeD(1);
                                    writeD(1);
                                }
                                else
                                {
                                    writeB(new byte[8]);
                                }
                                writeC((byte)clan.clan_rank); // Clan.Rank
                                writeC((byte)clan._logo1); // Clan.Mark
                                writeC((byte)clan._logo2); // Clan.Mark
                                writeC((byte)clan._logo3); // Clan.Mark
                                writeC((byte)clan._logo4); // Clan.Mark
                                writeC((byte)clan._color); // ClanNameColor
                                writeC((byte)playerBySlot.pc_cafe);
                                if ((obj_id > 0x8000) | (obj_id > 0x80))
                                {
                                    writeD(obj_id);
                                }
                                writeB(new byte[] { 3, 4, 5, 6, 7 });
                                writeS(clan.clan_name, 16);
                                writeH(0);
                                writeC(0);
                                writeC(0);
Ответ
#14
Код:
if ((obj_id > 0x8000) | (obj_id > 0x80))
{
    writeD(obj_id);
}

What is it?

It is active effects mask or 0.
Ответ
#15
SM_ROOM_SLOT_INFO

Код:
public class SM_ROOM_SLOT_INFO : SendBaseGamePacket
    {
        private Room _room;
        private int item_id;
          
        public SM_ROOM_SLOT_INFO(Room r)
        {
            _room = r;
            makeme();
        }

        protected internal override void write()
        {
            try
            {
                if (_room != null)
                {
                    writeH(3861);
                    if (_room.getLeader() == null)
                    {
                        _room.setNewLeader(0);
                    }
                    if (_room.getLeader() != null)
                    {
                        writeD(_room.getLeader().getSlot());
                        for (int slot = 0; slot < 16; slot++)
                        {
                            Account playerBySlot = _room.getPlayerBySlot(slot);
                            if (playerBySlot != null)
                            {
                                int obj_id = AccountManager.getInstance().getItemIdForOBID(this.item_id);
                                Clan clan = new Clan();
                                if (ClanManager.getInstance().@get(playerBySlot.clan_id) != null)
                                {
                                    clan = ClanManager.getInstance().@get(playerBySlot.clan_id);
                                }
                                writeC((byte)_room.getSlotState(slot)); // Slot.State
                                writeC((byte)playerBySlot.getRank()); // Player.Rank
                                if (clan.clan_id != 0)
                                {
                                    writeD(1);
                                    writeD(1);
                                }
                                else
                                {
                                    writeB(new byte[8]);
                                }
                                writeC((byte)clan.clan_rank); // Clan.Rank
                                writeC((byte)clan._logo1); // Clan.Mark
                                writeC((byte)clan._logo2); // Clan.Mark
                                writeC((byte)clan._logo3); // Clan.Mark
                                writeC((byte)clan._logo4); // Clan.Mark
                                writeC((byte)clan._color); // ClanNameColor
                                writeC(0);
                                writeC((byte)playerBySlot.pc_cafe);
                                switch (obj_id)
                                {
                                    case 1:
                                    {
                                         writeD(32768); // QUICK_CHANGE_WEAPON десятичный
                                         break;
                                    }
                                    case 2:
                                    {
                                         writeD(16384); // QUICK_CHANGE_MAGAZINE десятичный
                                         break;
                                    }
                                    case 3:
                                    {
                                        writeD(8192); // MEGA_HP10 десятичный
                                        break;
                                    }
                                    case 4:
                                    {
                                        writeD(2048); // BULLET_PROOF_VEST десятичный
                                        break;
                                    }
                                    case 5:
                                    {
                                        writeD(128); //  INCREASE_GRENADE_SLOT десятичный
                                        break;
                                    }
                                    case 6:
                                    {
                                        writeD(8); //  HOLLOW_POINT_AMMO_PLUS десятичный
                                        break;
                                    }
                                }
                                writeB(new byte[] { 3, 4, 5, 6, 7 });
                                writeS(clan.clan_name, 16);
                                writeH(0);
                                writeC(0);
                                writeC(0);
                            }
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                CLogger.getInstance().error(exception.ToString());
            }
        }
    }

[color=black]AccountManager.getInstance().getItemIdForOBID[/color]

public int getItemIdForOBID(int obj_id)
        {
            int num;
            Npgsql.NpgsqlConnection NpgsqlConnection = SQLjec.getInstance().conn();
            try
            {
                NpgsqlCommand command = NpgsqlConnection.CreateCommand();
                NpgsqlConnection.Open();
                command.CommandText = string.Concat("SELECT item_id FROM items WHERE object_id='", obj_id, "';");
                command.CommandType = CommandType.Text;
                Npgsql.NpgsqlDataReader NpgsqlDataReader = command.ExecuteReader();
                if (NpgsqlDataReader.Read())
                {
                    int result = NpgsqlDataReader.GetInt32(2);
                    NpgsqlConnection.Close();
                    num = result;
                    return num;
                }
            }
            finally
            {
                if (NpgsqlConnection != null)
                {
                    ((IDisposable)NpgsqlConnection).Dispose();
                }
            }
            num = 0;
            return num;
        }

Я пытался ввести в действие более 1-го купона
Ответ
#16
correct?
Ответ
#17
Henrique, not correct. This is a mask. It does not need any swith.
Ответ
#18
PROGRAMMATOR, I am unable to put more than one effect of coupon
Ответ
#19
[SRC="csharp"][Flags]
enum CouponEffect
{
// ...
MegaHp10 = 0x2000,
QuickChangeWeapon = 0x4000,
QuickChangeMagazine = 0x8000,
// ...
}
[/SRC]


[SRC="csharp"]var effects = CouponEffect.MegaHp10 | CouponEffect.QuickChangeWeapon | CouponEffect.QuickChangeMagazine;

Write<int>(effects);
[/SRC]
Ответ
#20
OFFTOP
Ответ


Возможно похожие темы ...
Тема Автор Ответы Просмотры Последний пост
  Coupon mask list ManuelDev 2 1,690 01-02-2017, 07:31 PM
Последний пост: ManuelDev
  Help Coupon Not Efect XRoro 2 2,007 11-16-2016, 06:12 AM
Последний пост: XRoro
  Help Me ! (Coupon effect - 24 Hrs) yGGhz 4 1,883 09-01-2016, 12:38 AM
Последний пост: Awiion
  Coupon Change Nick Name Exile03 5 2,175 02-05-2016, 11:03 PM
Последний пост: Exile03
  Respawn Effect Exile03 5 2,372 01-30-2016, 05:44 PM
Последний пост: Exile03
  ID FLAG'S EFFECT"S Exile03 10 3,262 01-26-2016, 05:03 PM
Последний пост: Exile03

Перейти к форуму:


Пользователи, просматривающие эту тему: 1 Гость(ей)