Masca emotiei, doar la anumite emotii

Discuție în 'C++ /Python' creată de [RaffaeL], 12 Ian 2019.

  1. [RaffaeL]

    [RaffaeL] Developer

    Înscris:
    11 Noi 2018
    Mesaje:
    43
    Aprecieri primite:
    44
    Puncte trofeu:
    18
    Sex:
    Masculin

    Am rescris functiile in urma unei cereri, pe alta comunitate, care suna cam asa:
    "
    How do i make request item for use certain emotions
    Ex: For all emotion (sad/clap/angry...) don't request nothing.But for dancing to request mask emotion
    "
    Asa, ca...de lene, voi da copy-paste(mna... :)) )
    PHP:
    Firstyou have to define a new request(in cmd_emotions.cpp). So for that

    //Search:
    #define TARGET_DISARM    (1 << 5)

    //and add bellow:
    #define NEED_ITEM    (1 << 6)
    Then you have to insert that requestinto emotions enumso for that:

    //Find and change:
    // DANCE ->as requested..
        
    "占쏙옙1",    "dance1",    NEED_ITEM,    1.0f },
        { 
    "占쏙옙2",    "dance2",    NEED_ITEM,    1.0f },
        { 
    "占쏙옙3",    "dance3",    NEED_ITEM,    1.0f },
        { 
    "占쏙옙4",    "dance4",    NEED_ITEM,    1.0f },
        { 
    "占쏙옙5",    "dance5",    NEED_ITEM,    1.0f },
        { 
    "占쏙옙6",    "dance6",    NEED_ITEM,    1.0f },

    //or include any other emotion, if you want to.
    Nowchange the can_emotion boollike this:

    bool CHARACTER_CanEmotion(CHARACTERrch)
    {
        return 
    true;
    }
    And 
    finaly, do the item check, for dance_emotions:

    //Search:
        
    if (IS_SET(emotion_types[i].flagWOMAN_ONLY) && SEX_MALE==GET_SEX(ch))
        {
            
    ch->ChatPacket(CHAT_TYPE_INFOLC_TEXT("占쏙옙占쌘몌옙 占쏙옙 占쏙옙 占쌍쏙옙占싹댐옙."));
            return;
        }

    //and add bellow:
        
    if (IS_SET(emotion_types[i].flagNEED_ITEM) && !ch->IsEquipUniqueItem(UNIQUE_ITEM_EMOTION_MASK))
        {
            
    ch->ChatPacket(CHAT_TYPE_INFOLC_TEXT("You need Emotion Mask for that...bla bla.")); //here you have to add your message
            
    return;
        }
    Daca cineva doreste postul initial:
     
  2. Ionut

    Ionut Moderator Membru personal

    Înscris:
    22 Apr 2018
    Mesaje:
    505
    Aprecieri primite:
    822
    Puncte trofeu:
    93
    Sex:
    Masculin

    Interesant,multumim frumos ;)
     

This site is owned and third-party cookies. If you continue with us we understand that you accept the use of cookies.