- Awards
- 38
Hola a todos,
Aportado por Gazia,
Testeado en TFS 1.3, protocolo 12.72
Utilizaremos el Visual Studio 2019 para poder compilar,
Abriremos items.cpp y buscaremos:
debajo pegaremos:
Ahora nos iremos en item.cpp
buscaremos:
Pegaremos encima esto:
buscaremos:
Debajo copiaremos:
buscaremos:
debajo pondremos:
buscaremos: ( linea 1640 approximadamente )
Encima pegaremos:
Justo debajo , aparecerá el
que reemplazaremos por:
Buscamos por el mismo codigo de nuevo ( hay 3 en total )
Encima copiaremos este codigo, y debajo repetiremos lo mismo que arriba, borraremos el
De la siguiente manera de nuevo:
que reemplazaremos por:
Por último,
Buscamos de nuevo:
Reemplazamos por:
y encima pondremos:
Terminando con esto, compilamos y pasamos los .DLL y .EXE a nuestro servidor.
Ahora en items.xml podremos utilizar el nuevo attributo:
En donde Valor indicaran un número de valor para reflejar.
Refleja todo tipo de elementos, incluyendo life, drown, healing, holy, earth, energy, physical, etc.
Aportado por Gazia,
Testeado en TFS 1.3, protocolo 12.72
Utilizaremos el Visual Studio 2019 para poder compilar,
Abriremos items.cpp y buscaremos:
Código:
else if (tmpStrValue == "absorbpercentall" || tmpStrValue == "absorbpercentallelements") {
int16_t value = pugi::cast<int16_t>(valueAttribute.value());
Abilities& abilities = it.getAbilities();
for (auto& i : abilities.absorbPercent) {
i += value;
}
Código:
else if (tmpStrValue == "reflectpercentall") {
int16_t value = pugi::cast<int16_t>(valueAttribute.value());
Abilities& abilities = it.getAbilities();
for (auto& i : abilities.reflectPercent) {
i += value;
}
}
Ahora nos iremos en item.cpp
buscaremos:
Código:
for (size_t i = 0; i < COMBAT_COUNT; ++i) {
if (it.abilities->absorbPercent[i] == 0) {
continue;
}
ss.str("");
ss << getCombatName(indexToCombatType(i)) << ' '
<< std::showpos << it.abilities->absorbPercent[i] << std::noshowpos << '%';
descriptions.emplace_back("Protection", ss.str());
}
Pegaremos encima esto:
Código:
for (size_t i = 0; i < COMBAT_COUNT; ++i) {
if (it.abilities->reflectPercent[i] == 0) {
continue;
}
ss.str("");
ss << getCombatName(indexToCombatType(i)) << ' '
<< std::showpos << it.abilities->reflectPercent[i] << std::noshowpos << '%';
descriptions.emplace_back("Damage Reflection", ss.str());
}
Código:
for (size_t i = 0; i < COMBAT_COUNT; ++i) {
if (it.abilities->fieldAbsorbPercent[i] == 0) {
continue;
}
ss.str("");
ss << getCombatName(indexToCombatType(i)) << ' '
<< std::showpos << it.abilities->fieldAbsorbPercent[i] << std::noshowpos << '%';
descriptions.emplace_back("Field Protection", ss.str());
}
Debajo copiaremos:
Código:
for (size_t i = 0; i < COMBAT_COUNT; ++i) {
if (it.abilities->reflectPercent[i] == 0) {
continue;
}
ss.str("");
ss << getCombatName(indexToCombatType(i)) << ' '
<< std::showpos << it.abilities->reflectPercent[i] << std::noshowpos << '%';
descriptions.emplace_back("Damage Reflection", ss.str());
}
buscaremos:
Código:
for (size_t i = 0; i < COMBAT_COUNT; ++i) {
if (it.abilities->absorbPercent[i] == 0) {
continue;
}
ss.str("");
ss << getCombatName(indexToCombatType(i)) << ' '
<< std::showpos << it.abilities->absorbPercent[i] << std::noshowpos << '%';
descriptions.emplace_back("Protection", ss.str());
}
Código:
for (size_t i = 0; i < COMBAT_COUNT; ++i) {
if (it.abilities->reflectPercent[i] == 0) {
continue;
}
ss.str("");
ss << getCombatName(indexToCombatType(i)) << ' '
<< std::showpos << it.abilities->reflectPercent[i] << std::noshowpos << '%';
descriptions.emplace_back("Damage Reflection", ss.str());
}
Código:
int16_t show = it.abilities->absorbPercent[0];
Código:
int16_t show = it.abilities->reflectPercent[0];
if (show != 0) {
for (size_t i = 1; i < COMBAT_COUNT; ++i) {
if (it.abilities->reflectPercent[i] != show) {
show = 0;
break;
}
}
}
if (show == 0) {
bool tmp = true;
for (size_t i = 0; i < COMBAT_COUNT; ++i) {
if (it.abilities->reflectPercent[i] == 0) {
continue;
}
if (tmp) {
tmp = false;
if (begin) {
begin = false;
s << " (";
}
else {
s << ", ";
}
s << "damage reflection ";
}
else {
s << ", ";
}
s << getCombatName(indexToCombatType(i)) << ' ' << std::showpos << it.abilities->reflectPercent[i] << std::noshowpos << '%';
}
}
else {
if (begin) {
begin = false;
s << " (";
}
else {
s << ", ";
}
s << "damage reflection all " << std::showpos << show << std::noshowpos << '%';
}
Justo debajo , aparecerá el
Código:
int16_t show = it.abilities->absorbPercent[0];
Código:
show = it.abilities->absorbPercent[0];
Buscamos por el mismo codigo de nuevo ( hay 3 en total )
Código:
int16_t show = it.abilities->absorbPercent[0];
int16_t
(ver despues del codigo)
Código:
int16_t show = it.abilities->reflectPercent[0];
if (show != 0) {
for (size_t i = 1; i < COMBAT_COUNT; ++i) {
if (it.abilities->reflectPercent[i] != show) {
show = 0;
break;
}
}
}
if (show == 0) {
bool tmp = true;
for (size_t i = 0; i < COMBAT_COUNT; ++i) {
if (it.abilities->reflectPercent[i] == 0) {
continue;
}
if (tmp) {
tmp = false;
if (begin) {
begin = false;
s << " (";
}
else {
s << ", ";
}
s << "damage reflection ";
}
else {
s << ", ";
}
s << getCombatName(indexToCombatType(i)) << ' ' << std::showpos << it.abilities->reflectPercent[i] << std::noshowpos << '%';
}
}
else {
if (begin) {
begin = false;
s << " (";
}
else {
s << ", ";
}
s << "damage reflection all " << std::showpos << show << std::noshowpos << '%';
}
Código:
int16_t show = it.abilities->absorbPercent[0];
Código:
show = it.abilities->absorbPercent[0];
Por último,
Buscamos de nuevo:
Código:
int16_t show = it.abilities->absorbPercent[0];
Código:
show = it.abilities->absorbPercent[0];
Código:
int16_t show = it.abilities->reflectPercent[0];
if (show != 0) {
for (size_t i = 1; i < COMBAT_COUNT; ++i) {
if (it.abilities->reflectPercent[i] != show) {
show = 0;
break;
}
}
}
if (!show) {
bool damageReflected = true;
for (size_t i = 0; i < COMBAT_COUNT; ++i) {
if (it.abilities->reflectPercent[i] == 0) {
continue;
}
if (damageReflected) {
damageReflected = false;
if (begin) {
begin = false;
s << " (";
}
else {
s << ", ";
}
s << "damage reflection ";
}
else {
s << ", ";
}
s << getCombatName(indexToCombatType(i)) << ' ' << std::showpos << it.abilities->reflectPercent[i] << std::noshowpos << '%';
}
}
else {
if (begin) {
begin = false;
s << " (";
}
else {
s << ", ";
}
s << "damage reflection all " << std::showpos << show << std::noshowpos << '%';
}
Terminando con esto, compilamos y pasamos los .DLL y .EXE a nuestro servidor.
Ahora en items.xml podremos utilizar el nuevo attributo:
<attribute key="reflectpercentall" value="VALOR" />
En donde Valor indicaran un número de valor para reflejar.
Refleja todo tipo de elementos, incluyendo life, drown, healing, holy, earth, energy, physical, etc.
Última edición: