Feature [TFS 1.2] Reflection attribute

Joined
Jul 5, 2013
Messages
33
Best answers
0
Likes
6
#21
@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.
 

Stigma

Well-Known Member
Joined
Feb 14, 2015
Messages
4,363
Best answers
356
Likes
1,938
#22
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?
 
Joined
Jul 5, 2013
Messages
33
Best answers
0
Likes
6
#23
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?
 

Stigma

Well-Known Member
Joined
Feb 14, 2015
Messages
4,363
Best answers
356
Likes
1,938
#26
"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
 
Joined
May 12, 2017
Messages
62
Best answers
3
Likes
11
Location
No Idea.
#28
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) {
        ^
 

Stigma

Well-Known Member
Joined
Feb 14, 2015
Messages
4,363
Best answers
356
Likes
1,938
#29
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;
            }
 
Joined
May 12, 2017
Messages
62
Best answers
3
Likes
11
Location
No Idea.
#30
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
 
Top