• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.2 Bless icon

adric21

Well-Known Member
Joined
Apr 26, 2016
Messages
295
Solutions
1
Reaction score
82
I would like to know how I could do to make this icon appear when using the! Bless command, I do not know if it is necessary to modify the sources or a simple script. I am currently using tfs 1.2
Anyone can give me the code for edit the source?

12345
 
Hey sir @Static_ ,
Could you help us finish this code?

if you can't handle writing it i will later, whenever i feel like doing it

Please...
No one here is paid to help anyone, we do it when we have time and wanna do it, if you are in a hurry create a thread in the jobs section and pay for it insted.
 
@Oxygens21 @rudger


This working for me, try yourself ;)
Code:
condition.cpp

case CONDITION_DAZZLED:
    return new ConditionDazzled(id, type, ticks, buff, subId);  
  
  
In ConditionDamage::getIcons()
// case CONDITION_DAZZLED:
    // icons |= ICON_DAZZLED;
    // break;
          


bool ConditionDazzled::startCondition(Creature* creature)
{
    if (!Condition::startCondition(creature)) {
        return false;
    }

    return true;
}

bool ConditionDazzled::executeCondition(Creature* creature, int32_t interval)
{
    return Condition::executeCondition(creature, interval);
}

void ConditionDazzled::endCondition(Creature* creature)
{

}

void ConditionDazzled::addCondition(Creature* creature, const Condition* addCondition)
{
    if (updateCondition(addCondition)) {
        setTicks(addCondition->getTicks());
    }
}

uint32_t ConditionDazzled::getIcons() const
{
    return ICON_DAZZLED;  
}



condition.h
class ConditionDazzled final : public Condition
{
    public:
        ConditionDazzled(ConditionId_t id, ConditionType_t type, int32_t ticks, bool buff = true, uint32_t subId = 0) :
            Condition(id, type, ticks, buff, subId) {}

        bool startCondition(Creature* creature) final;
        bool executeCondition(Creature* creature, int32_t interval) final;
        void endCondition(Creature* creature) final;
        void addCondition(Creature* creature, const Condition* condition) final;
        uint32_t getIcons() const final;
      
        ConditionDazzled* clone() const final {
            return new ConditionDazzled(*this);
        }

};
 
Last edited:
Back
Top