All crafts HQ?
All crafts HQ?
How would one make it so you HQ all the time?
Re: All crafts HQ?
https://github.com/DarkstarProject/dark ... s.cpp#L438
For this line change the result to be hq, so it will look like this:
For this line change the result to be hq, so it will look like this:
Code: Select all
result = SYNTHESIS_HQ;
// результат синтеза записываем в поле quantity ячейки кристалла.
PChar->CraftContainer->setQuantity(0, result);
Re: All crafts HQ?
Thank you!
Hmm, that didn't seem to work. I recompiled and still getting NQs below and at cap.
Hmm, that didn't seem to work. I recompiled and still getting NQs below and at cap.
Re: All crafts HQ?
I figured out a way to do it by setting hqtier to 4 for all.
I also figured out a way to do NQs if you have Guild Synth Support. Since sometimes, you need an NQ (guild rank up, recipe for another synth)
//NQ if you have guild synth support
if (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_SMITHING_IMAGERY))
hqtier = 0;
else if (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_GOLDSMITHING_IMAGERY))
hqtier = 0;
else if (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_WOODWORKING_IMAGERY))
hqtier = 0;
else if (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_CLOTHCRAFT_IMAGERY))
hqtier = 0;
else if (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_LEATHERCRAFT_IMAGERY))
hqtier = 0;
else if (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_BONECRAFT_IMAGERY))
hqtier = 0;
else if (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_ALCHEMY_IMAGERY))
hqtier = 0;
else if (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_COOKING_IMAGERY))
hqtier = 0;
I also figured out a way to do NQs if you have Guild Synth Support. Since sometimes, you need an NQ (guild rank up, recipe for another synth)
//NQ if you have guild synth support
if (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_SMITHING_IMAGERY))
hqtier = 0;
else if (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_GOLDSMITHING_IMAGERY))
hqtier = 0;
else if (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_WOODWORKING_IMAGERY))
hqtier = 0;
else if (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_CLOTHCRAFT_IMAGERY))
hqtier = 0;
else if (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_LEATHERCRAFT_IMAGERY))
hqtier = 0;
else if (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_BONECRAFT_IMAGERY))
hqtier = 0;
else if (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_ALCHEMY_IMAGERY))
hqtier = 0;
else if (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_COOKING_IMAGERY))
hqtier = 0;
Re: All crafts HQ?
You mean using OR? Sure =Pwhasf wrote:that's an awful lot of code that can be in one statement
if ( (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_SMITHING_IMAGERY)) || (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_GOLDSMITHING_IMAGERY)) || (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_WOODWORKING_IMAGERY)) ...... )
hqtier = 0;
Is there a way to check for all imagery effects with one call?
Re: All crafts HQ?
can't remember if i added a lambda function for status effects yet. either way, aren't all the imagery IDs right beside each other? if imagery >= smithing and imagery <= whatever the last one is
Re: All crafts HQ?
But isn't HasStatusEffect a boolean? how could you do a greater than or less than?
Am i calling the wrong method?
Am i calling the wrong method?
-
- Developer
- Posts: 707
- Joined: Sun Jul 22, 2012 12:11 am
Re: All crafts HQ?
The idea is to just use a loop to simplify the code...Assuming smithing is the first and cooking is the last, it'd look something like this:
Code: Select all
//NQ if you have guild synth support
for(auto i = EFFECT_SMITHING_IMAGERY; i <= EFFECT_COOKING_IMAGERY; i++)
{
if (PChar->StatusEffectContainer->HasStatusEffect(i))
{
hqtier = 0;
break;
}
}