Merge branch 'master' of git://github.com/EQEmu/Server

This commit is contained in:
af4t
2013-04-06 08:32:40 -04:00
9 changed files with 42 additions and 5 deletions
+1
View File
@@ -238,6 +238,7 @@
#define DISCIPLINE_REUSE_MSG2 5808 //You can use the ability %1 again in %2 minute(s) %3 seconds.
#define FAILED_TAUNT 5811 //You have failed to taunt your target.
#define AA_NO_TARGET 5825 //You must first select a target for this ability!
#define FORAGE_MASTERY 6012 //Your forage mastery has enabled you to find something else!
#define GUILD_BANK_CANNOT_DEPOSIT 6097 // Cannot deposit this item. Containers must be empty, and only one of each LORE and no NO TRADE or TEMPORARY items may be deposited.
#define GUILD_BANK_FULL 6098 // There is no more room in the Guild Bank.
#define GUILD_BANK_TRANSFERRED 6100 // '%1' transferred to Guild Bank from Deposits.
+14 -1
View File
@@ -835,6 +835,9 @@ void Client::ApplyAABonuses(uint32 aaid, uint32 slots, StatBonuses* newbon)
case SE_ConsumeProjectile:
newbon->ConsumeProjectile += base1;
break;
case SE_ForageAdditionalItems:
newbon->ForageAdditionalItems += base1;
break;
case SE_ArcheryDamageModifier:
newbon->ArcheryDamageModifier += base1;
break;
@@ -2192,6 +2195,10 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses* ne
newbon->ConsumeProjectile += effect_value;
break;
case SE_ForageAdditionalItems:
newbon->ForageAdditionalItems += effect_value;
break;
case SE_ArcheryDamageModifier:
newbon->ArcheryDamageModifier += effect_value;
break;
@@ -3331,6 +3338,12 @@ void Mob::NegateSpellsBonuses(uint16 spell_id)
itembonuses.ConsumeProjectile = effect_value;
break;
case SE_ForageAdditionalItems:
spellbonuses.ForageAdditionalItems = effect_value;
aabonuses.ForageAdditionalItems = effect_value;
itembonuses.ForageAdditionalItems = effect_value;
break;
case SE_ArcheryDamageModifier:
spellbonuses.ArcheryDamageModifier = effect_value;
aabonuses.ArcheryDamageModifier = effect_value;
@@ -3473,4 +3486,4 @@ void Mob::NegateSpellsBonuses(uint16 spell_id)
}
}
}
}
}
+1 -1
View File
@@ -810,7 +810,7 @@ public:
void LogSQL(const char *fmt, ...);
bool CanFish();
void GoFish();
void ForageItem();
void ForageItem(bool guarantee = false);
//Calculate vendor price modifier based on CHA: (reverse==selling)
float CalcPriceMod(Mob* other = 0, bool reverse = false);
void ResetTrade();
+1
View File
@@ -346,6 +346,7 @@ struct StatBonuses {
bool FrontalBackstabMinDmg; // Allow frontal backstabs for min damage
uint8 FrontalBackstabChance; // Chance to backstab from the front for full damage
uint8 ConsumeProjectile; // Chance to not consume arrow.
uint8 ForageAdditionalItems; // Chance to forage another item.
uint16 ArcheryDamageModifier; // Increase Archery Damage by percent
bool SecondaryDmgInc; // Allow off hand weapon to recieve damage bonus.
uint16 GiveDoubleAttack; // Allow classes to double attack with a specified chance.
+8 -2
View File
@@ -400,7 +400,7 @@ void Client::GoFish()
}
}
void Client::ForageItem() {
void Client::ForageItem(bool guarantee) {
int skill_level = GetSkill(FORAGE);
@@ -417,7 +417,7 @@ void Client::ForageItem() {
};
// these may need to be fine tuned, I am just guessing here
if (MakeRandomInt(0,199) < skill_level) {
if (guarantee || MakeRandomInt(0,199) < skill_level) {
uint32 foragedfood = 0;
uint32 stringid = FORAGE_NOEAT;
@@ -476,6 +476,12 @@ void Client::ForageItem() {
}
parse->EventPlayer(EVENT_FORAGE_SUCCESS, this, "", inst != NULL ? inst->GetItem()->ID : 0);
int ChanceSecondForage = aabonuses.ForageAdditionalItems + itembonuses.ForageAdditionalItems + spellbonuses.ForageAdditionalItems;
if(!guarantee && MakeRandomInt(0,99) < ChanceSecondForage) {
this->Message_StringID(MT_Skills, FORAGE_MASTERY);
this->ForageItem(true);
}
} else {
Message_StringID(MT_Skills, FORAGE_FAILED);
+1
View File
@@ -2715,6 +2715,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
case SE_SecondaryDmgInc:
case SE_ArcheryDamageModifier:
case SE_ConsumeProjectile:
case SE_ForageAdditionalItems:
case SE_FrontalBackstabChance:
case SE_FrontalBackstabMinDmg:
case SE_TripleBackstab: