Feature [TFS 1.2] Reflection attribute

sebaloko

Member
Joined
Jul 5, 2013
Messages
33
Reaction score
6
@Vulcan_ sorry cant, the problem is that the items with the reflection attribute (added on items.xml) dont show the reflection on the description, but the ones that you do item:setAttribute(ITEM_ATTRIBUTE_REFLECTION,1) appears on description.
 
OP
Stigma

Stigma

Veteran OT User
Joined
Feb 14, 2015
Messages
4,401
Reaction score
1,977
i don't see any reason why that would be the case
iirc it worked both ways when i made this, but it's been over a year so maybe not
are you testing both cases on the same type of item, like an armor?
 

sebaloko

Member
Joined
Jul 5, 2013
Messages
33
Reaction score
6
i don't see any reason why that would be the case
iirc it worked both ways when i made this, but it's been over a year so maybe not
are you testing both cases on the same type of item, like an armor?
yes maybe its because im using tfs 1.3?
 

Mr Erimyth

Intermediate OT User
Joined
Apr 8, 2009
Messages
153
Reaction score
6
Location
Texas
Bug it crash my server, anyone can help me to fix? i need use it to tfs 1.3
>> Segmantation Fault

 
OP
Stigma

Stigma

Veteran OT User
Joined
Feb 14, 2015
Messages
4,401
Reaction score
1,977
"it crash my server"
let me pull out my crystal ball and tell you the exact solution
jokes aside you need to post more information, what you're doing before the crash, post gdb crash log
 

Catalyst

whoU
Joined
May 12, 2017
Messages
62
Reaction score
11
Location
No Idea.
This is kinda old but im trying to make it work for TFS 1.3 and i keep getting the following error when I try to compile.

Code:
 /item.cpp:911:44: error: variable ‘reflection’ set but not used [-Werror=unused-but-set-variable]
     int32_t attack, defense, extraDefense, reflection;
                                            ^
Code:
/item.cpp:947:8: error: ‘reflection’ was not declared in this scope
    if (reflection != 0) {
        ^
 
OP
Stigma

Stigma

Veteran OT User
Joined
Feb 14, 2015
Messages
4,401
Reaction score
1,977
This is kinda old but im trying to make it work for TFS 1.3 and i keep getting the following error when I try to compile.

Code:
 /item.cpp:911:44: error: variable ‘reflection’ set but not used [-Werror=unused-but-set-variable]
     int32_t attack, defense, extraDefense, reflection;
                                            ^
Code:
/item.cpp:947:8: error: ‘reflection’ was not declared in this scope
    if (reflection != 0) {
        ^
you must've not copied the rest of it
reflection gets defined straight after that line
C++:
            int32_t attack, defense, extraDefense, reflection;
            if (item) {
                attack = item->getAttack();
                defense = item->getDefense();
                extraDefense = item->getExtraDefense();
                reflection = item->getReflection();
            } else {
                attack = it.attack;
                defense = it.defense;
                extraDefense = it.extraDefense;
                reflection = it.reflection;
            }
 

Catalyst

whoU
Joined
May 12, 2017
Messages
62
Reaction score
11
Location
No Idea.
you must've not copied the rest of it
reflection gets defined straight after that line
C++:
            int32_t attack, defense, extraDefense, reflection;
            if (item) {
                attack = item->getAttack();
                defense = item->getDefense();
                extraDefense = item->getExtraDefense();
                reflection = item->getReflection();
            } else {
                attack = it.attack;
                defense = it.defense;
                extraDefense = it.extraDefense;
                reflection = it.reflection;
            }
Still didn't get it to work, can you help? Heres my item.cpp

/** * The Forgotten Server - a free and open-source MMORPG server emulator * - Pastebin.com
 

diarmaint

New Member
Joined
Oct 6, 2012
Messages
3
Reaction score
0
Hi vulcan the reflection attribute works great, but i can get to work it to appear on description
Code:
if (reflection != 0) {
                if (begin) {
                    begin = false;
                    s << " (";
                } else {
                    s << ", ";
                }
             
                s << "Reflection: " << reflection << std::noshowpos << "%";
            }
thanks in advance
[CITAR]
I Need
 
Top