Zombiegod
Active Member
- Joined
- Oct 22, 2009
- Messages
- 198
- Solutions
- 1
- Reaction score
- 25
okay so i am trying to convert this ... script?.. too 1.3 i got most of it done (i think), however there is a few i am stumped on, because i can not find their alternatives anywhere in the code.
This is the code i am working with
In there these are not recognized
I also need help with this part of the code found in creature.cpp
Its saying that
is incompatible with
Temporarily i changed it too
and visual studios is not complaining, but idk if that actually fixed it.
This is the code i am working with
C++:
if (!attackspells.empty()) {
xmlNodePtr root_attack = xmlDocGetRootElement(xmlParseMemory(attackspells.c_str(), attackspells.length()));
xmlNodePtr tmpNode_attack = root_attack->children;
while (tmpNode_attack)
{
if (!xmlStrcmp(tmpNode_attack->name, (const xmlChar*)"attack"))
{
spellBlock_t sb;
if (g_monsters.deserializeSpell(tmpNode_attack, sb, "doCreateCustomMonster"))
pobranyTyp->info.attackSpells.push_back(sb);
}
tmpNode_attack = tmpNode_attack->next;
}
}
if (!defensespells.empty()) {
xmlNodePtr root_defense = xmlDocGetRootElement(xmlParseMemory(defensespells.c_str(), defensespells.length()));
xmlNodePtr tmpNode_defense = root_defense->children;
while (tmpNode_defense)
{
if (!xmlStrcmp(tmpNode_defense->name, (const xmlChar*)"defense"))
{
spellBlock_t defense;
if (g_monsters.deserializeSpell(tmpNode_defense, defense, "doCreateCustomMonster"))
pobranyTyp->info.defenseSpells.push_back(defense);
}
tmpNode_defense = tmpNode_defense->next;
}
}
In there these are not recognized
- xmlNodePtr
- xmlDocGetRootElement
- xmlParseMemory
- xmlStrcmp
- xmlChar
I also need help with this part of the code found in creature.cpp
C++:
bool Monster::isTarget(const Creature* creature) const
{
if (!isClone(creature) || creature->isRemoved() || !creature->isAttackable() ||
creature->getZone() == ZONE_PROTECTION || !canSeeCreature(creature)) {
return false;
}
if (creature->getPosition().z != getPosition().z) {
return false;
}
return true;
}
Its saying that
C++:
!isClone(creature)
is incompatible with
C++:
Monster::isTarget(const Creature* creature) const
Temporarily i changed it too
C++:
creature->isClone()
and visual studios is not complaining, but idk if that actually fixed it.