mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 19:51:29 +00:00
Merge branch 'master' of https://github.com/EQEmu/Server
Initial check-in of bard bot in combat song code.
This commit is contained in:
commit
8ac4845930
@ -2,6 +2,21 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
|||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
== 10/11/2013 ==
|
== 10/11/2013 ==
|
||||||
Bad_Captain: Fixed merc crash issue by updating special_abilities & vwMercNpcTypes (Sorvani).
|
Bad_Captain: Fixed merc crash issue by updating special_abilities & vwMercNpcTypes (Sorvani).
|
||||||
|
JJ: (demonstar55) Allow use of Go Home button when Tutorial still selected in RoF.
|
||||||
|
|
||||||
|
== 10/10/2013 ==
|
||||||
|
Secrets: Fixed zone shutdown (or #reloadqst) reinitalization of Perl. This should allow for Perl 5.14 and later to work on Windows under the new quest system.
|
||||||
|
demonstar55: Beneficial single target buffs shouldn't have their mana/timers set if they fail to cast after the Mob::SpellOnTarget call in Mob::SpellFinished
|
||||||
|
JJ: Revert change to EnterWorldPacket introduced on 22 April 2013 to fix inability to enter Tutorial or Go Home from character select screen.
|
||||||
|
|
||||||
|
== 10/09/2013 ==
|
||||||
|
demonstar55: Fixed some more instances of the AA timer being eaten
|
||||||
|
|
||||||
|
== 10/08/2013 ==
|
||||||
|
demonstar55: Added IsBuffSpell(spell_id) that will return true if the spell has a duration, so would end up in effects/song/discs etc windows on the client
|
||||||
|
demonstar55: Replaced instances of using CalcBuffDuration to determine if a spell was a buff with IsBuffSpell
|
||||||
|
demonstar55: Removed Mob::HasBuffIcon since it was doing what IsBuffSpell does in a more convoluted way with a rather misleading name
|
||||||
|
demonstar55: Fixed issues that arose from the 10/03/2013 change
|
||||||
|
|
||||||
== 10/05/2013 ==
|
== 10/05/2013 ==
|
||||||
Sorvani: fixed issue with stackable items being created with 0 charges cause by fix to SummonItems
|
Sorvani: fixed issue with stackable items being created with 0 charges cause by fix to SummonItems
|
||||||
|
|||||||
@ -987,6 +987,13 @@ bool IsSelfConversionSpell(uint16 spell_id) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// returns true for both detrimental and beneficial buffs
|
||||||
|
bool IsBuffSpell(uint16 spell_id) {
|
||||||
|
if(IsValidSpell(spell_id) && (spells[spell_id].buffduration || spells[spell_id].buffdurationformula))
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
uint32 GetMorphTrigger(uint32 spell_id)
|
uint32 GetMorphTrigger(uint32 spell_id)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < EFFECT_COUNT; ++i)
|
for(int i = 0; i < EFFECT_COUNT; ++i)
|
||||||
|
|||||||
@ -792,6 +792,7 @@ bool IsGroupHealOverTimeSpell(uint16 spell_id);
|
|||||||
bool IsDebuffSpell(uint16 spell_id);
|
bool IsDebuffSpell(uint16 spell_id);
|
||||||
bool IsResistDebuffSpell(uint16 spell_id);
|
bool IsResistDebuffSpell(uint16 spell_id);
|
||||||
bool IsSelfConversionSpell(uint16 spell_id);
|
bool IsSelfConversionSpell(uint16 spell_id);
|
||||||
|
bool IsBuffSpell(uint16 spell_id);
|
||||||
uint32 GetMorphTrigger(uint32 spell_id);
|
uint32 GetMorphTrigger(uint32 spell_id);
|
||||||
uint32 GetPartialMeleeRuneReduction(uint32 spell_id);
|
uint32 GetPartialMeleeRuneReduction(uint32 spell_id);
|
||||||
uint32 GetPartialMagicRuneReduction(uint32 spell_id);
|
uint32 GetPartialMagicRuneReduction(uint32 spell_id);
|
||||||
|
|||||||
@ -27,9 +27,7 @@ IF(MINGW)
|
|||||||
ENDIF(MINGW)
|
ENDIF(MINGW)
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
IF(NOT FREEBSD)
|
TARGET_LINK_LIBRARIES(eqlaunch "${CMAKE_DL_LIBS}")
|
||||||
TARGET_LINK_LIBRARIES(eqlaunch "dl")
|
|
||||||
ENDIF(NOT FREEBSD)
|
|
||||||
TARGET_LINK_LIBRARIES(eqlaunch "z")
|
TARGET_LINK_LIBRARIES(eqlaunch "z")
|
||||||
TARGET_LINK_LIBRARIES(eqlaunch "m")
|
TARGET_LINK_LIBRARIES(eqlaunch "m")
|
||||||
TARGET_LINK_LIBRARIES(eqlaunch "rt")
|
TARGET_LINK_LIBRARIES(eqlaunch "rt")
|
||||||
|
|||||||
@ -55,9 +55,7 @@ IF(MINGW)
|
|||||||
ENDIF(MINGW)
|
ENDIF(MINGW)
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
IF(NOT FREEBSD)
|
TARGET_LINK_LIBRARIES(loginserver "${CMAKE_DL_LIBS}")
|
||||||
TARGET_LINK_LIBRARIES(loginserver "dl")
|
|
||||||
ENDIF(NOT FREEBSD)
|
|
||||||
TARGET_LINK_LIBRARIES(loginserver "z")
|
TARGET_LINK_LIBRARIES(loginserver "z")
|
||||||
TARGET_LINK_LIBRARIES(loginserver "m")
|
TARGET_LINK_LIBRARIES(loginserver "m")
|
||||||
TARGET_LINK_LIBRARIES(loginserver "rt")
|
TARGET_LINK_LIBRARIES(loginserver "rt")
|
||||||
|
|||||||
@ -33,9 +33,7 @@ IF(MINGW)
|
|||||||
ENDIF(MINGW)
|
ENDIF(MINGW)
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
IF(NOT FREEBSD)
|
TARGET_LINK_LIBRARIES(queryserv "${CMAKE_DL_LIBS}")
|
||||||
TARGET_LINK_LIBRARIES(queryserv "dl")
|
|
||||||
ENDIF(NOT FREEBSD)
|
|
||||||
TARGET_LINK_LIBRARIES(queryserv "z")
|
TARGET_LINK_LIBRARIES(queryserv "z")
|
||||||
TARGET_LINK_LIBRARIES(queryserv "m")
|
TARGET_LINK_LIBRARIES(queryserv "m")
|
||||||
TARGET_LINK_LIBRARIES(queryserv "rt")
|
TARGET_LINK_LIBRARIES(queryserv "rt")
|
||||||
|
|||||||
@ -33,9 +33,7 @@ IF(MINGW)
|
|||||||
ENDIF(MINGW)
|
ENDIF(MINGW)
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
IF(NOT FREEBSD)
|
TARGET_LINK_LIBRARIES(shared_memory "${CMAKE_DL_LIBS}")
|
||||||
TARGET_LINK_LIBRARIES(shared_memory "dl")
|
|
||||||
ENDIF(NOT FREEBSD)
|
|
||||||
TARGET_LINK_LIBRARIES(shared_memory "z")
|
TARGET_LINK_LIBRARIES(shared_memory "z")
|
||||||
TARGET_LINK_LIBRARIES(shared_memory "m")
|
TARGET_LINK_LIBRARIES(shared_memory "m")
|
||||||
TARGET_LINK_LIBRARIES(shared_memory "rt")
|
TARGET_LINK_LIBRARIES(shared_memory "rt")
|
||||||
|
|||||||
@ -27,7 +27,7 @@ IF(MINGW)
|
|||||||
ENDIF(MINGW)
|
ENDIF(MINGW)
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
TARGET_LINK_LIBRARIES(tests "dl")
|
TARGET_LINK_LIBRARIES(tests "${CMAKE_DL_LIBS}")
|
||||||
TARGET_LINK_LIBRARIES(tests "z")
|
TARGET_LINK_LIBRARIES(tests "z")
|
||||||
TARGET_LINK_LIBRARIES(tests "m")
|
TARGET_LINK_LIBRARIES(tests "m")
|
||||||
TARGET_LINK_LIBRARIES(tests "rt")
|
TARGET_LINK_LIBRARIES(tests "rt")
|
||||||
|
|||||||
@ -35,10 +35,7 @@ IF(MINGW)
|
|||||||
ENDIF(MINGW)
|
ENDIF(MINGW)
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
|
TARGET_LINK_LIBRARIES(ucs "${CMAKE_DL_LIBS}")
|
||||||
IF(NOT FREEBSD)
|
|
||||||
TARGET_LINK_LIBRARIES(ucs "dl")
|
|
||||||
ENDIF(NOT FREEBSD)
|
|
||||||
TARGET_LINK_LIBRARIES(ucs "z")
|
TARGET_LINK_LIBRARIES(ucs "z")
|
||||||
TARGET_LINK_LIBRARIES(ucs "m")
|
TARGET_LINK_LIBRARIES(ucs "m")
|
||||||
TARGET_LINK_LIBRARIES(ucs "rt")
|
TARGET_LINK_LIBRARIES(ucs "rt")
|
||||||
|
|||||||
@ -81,10 +81,7 @@ IF(MINGW)
|
|||||||
ENDIF(MINGW)
|
ENDIF(MINGW)
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
|
TARGET_LINK_LIBRARIES(world "${CMAKE_DL_LIBS}")
|
||||||
IF(NOT FREEBSD)
|
|
||||||
TARGET_LINK_LIBRARIES(world "dl")
|
|
||||||
ENDIF(NOT FREEBSD)
|
|
||||||
TARGET_LINK_LIBRARIES(world "z")
|
TARGET_LINK_LIBRARIES(world "z")
|
||||||
TARGET_LINK_LIBRARIES(world "m")
|
TARGET_LINK_LIBRARIES(world "m")
|
||||||
TARGET_LINK_LIBRARIES(world "rt")
|
TARGET_LINK_LIBRARIES(world "rt")
|
||||||
|
|||||||
@ -709,7 +709,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!pZoning && ew->return_home)
|
if(!pZoning && ew->return_home && !ew->tutorial)
|
||||||
{
|
{
|
||||||
CharacterSelect_Struct* cs = new CharacterSelect_Struct;
|
CharacterSelect_Struct* cs = new CharacterSelect_Struct;
|
||||||
memset(cs, 0, sizeof(CharacterSelect_Struct));
|
memset(cs, 0, sizeof(CharacterSelect_Struct));
|
||||||
@ -723,7 +723,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
|
|||||||
if(cs->gohome[x] == 1)
|
if(cs->gohome[x] == 1)
|
||||||
{
|
{
|
||||||
home_enabled = true;
|
home_enabled = true;
|
||||||
return true;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -755,7 +755,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
|
|||||||
if(cs->tutorial[x] == 1)
|
if(cs->tutorial[x] == 1)
|
||||||
{
|
{
|
||||||
tutorial_enabled = true;
|
tutorial_enabled = true;
|
||||||
return true;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
14
zone/AA.cpp
14
zone/AA.cpp
@ -262,7 +262,6 @@ void Client::ActivateAA(aaID activate){
|
|||||||
}
|
}
|
||||||
SetMana(GetMana() - caa->mana_cost);
|
SetMana(GetMana() - caa->mana_cost);
|
||||||
}
|
}
|
||||||
HandleAAAction(aaid);
|
|
||||||
if(caa->reuse_time > 0)
|
if(caa->reuse_time > 0)
|
||||||
{
|
{
|
||||||
uint32 timer_base = CalcAAReuseTimer(caa);
|
uint32 timer_base = CalcAAReuseTimer(caa);
|
||||||
@ -273,6 +272,7 @@ void Client::ActivateAA(aaID activate){
|
|||||||
p_timers.Start(AATimerID + pTimerAAStart, timer_base);
|
p_timers.Start(AATimerID + pTimerAAStart, timer_base);
|
||||||
SendAATimer(AATimerID, 0, 0);
|
SendAATimer(AATimerID, 0, 0);
|
||||||
}
|
}
|
||||||
|
HandleAAAction(aaid);
|
||||||
}
|
}
|
||||||
|
|
||||||
//cast the spell, if we have one
|
//cast the spell, if we have one
|
||||||
@ -531,10 +531,14 @@ void Client::HandleAAAction(aaID activate) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//cast the spell, if we have one
|
//cast the spell, if we have one
|
||||||
if(spell_id > 0 && spell_id < SPDAT_RECORDS) {
|
if(IsValidSpell(spell_id)) {
|
||||||
//I dont know when we need to mem and when we do not, if ever...
|
int aatid = GetAATimerID(activate);
|
||||||
//MemorizeSpell(8, spell_id, 3);
|
if(!CastSpell(spell_id, target_id , 10, -1, -1, 0, -1, pTimerAAStart + aatid , CalcAAReuseTimer(caa), 1)) {
|
||||||
CastSpell(spell_id, target_id);
|
SendAATimer(aatid, 0, 0xFFFFFF);
|
||||||
|
Message_StringID(15,ABILITY_FAILED);
|
||||||
|
p_timers.Clear(&database, pTimerAAStart + aatid);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//handle the duration timer if we have one.
|
//handle the duration timer if we have one.
|
||||||
|
|||||||
@ -223,9 +223,7 @@ IF(MINGW)
|
|||||||
ENDIF(MINGW)
|
ENDIF(MINGW)
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
IF(NOT FREEBSD)
|
TARGET_LINK_LIBRARIES(zone "${CMAKE_DL_LIBS}")
|
||||||
TARGET_LINK_LIBRARIES(zone "dl")
|
|
||||||
ENDIF(NOT FREEBSD)
|
|
||||||
TARGET_LINK_LIBRARIES(zone "z")
|
TARGET_LINK_LIBRARIES(zone "z")
|
||||||
TARGET_LINK_LIBRARIES(zone "m")
|
TARGET_LINK_LIBRARIES(zone "m")
|
||||||
TARGET_LINK_LIBRARIES(zone "rt")
|
TARGET_LINK_LIBRARIES(zone "rt")
|
||||||
|
|||||||
@ -9329,7 +9329,7 @@ int32 Bot::GetActSpellCasttime(uint16 spell_id, int32 casttime) {
|
|||||||
|| botclass == PALADIN || botclass == BEASTLORD ))
|
|| botclass == PALADIN || botclass == BEASTLORD ))
|
||||||
cast_reducer += (GetLevel()-50)*3;
|
cast_reducer += (GetLevel()-50)*3;
|
||||||
|
|
||||||
if((casttime >= 4000) && BeneficialSpell(spell_id) && ((CalcBuffDuration(this,this,spell_id)-1) > 0)) {
|
if((casttime >= 4000) && BeneficialSpell(spell_id) && IsBuffSpell(spell_id)) {
|
||||||
switch (GetAA(aaSpellCastingDeftness)) {
|
switch (GetAA(aaSpellCastingDeftness)) {
|
||||||
case 1:
|
case 1:
|
||||||
cast_reducer += 5;
|
cast_reducer += 5;
|
||||||
|
|||||||
@ -43,6 +43,17 @@ EXTERN_C XS(boot_PerlPacket);
|
|||||||
XS(XS_EQEmuIO_PRINT);
|
XS(XS_EQEmuIO_PRINT);
|
||||||
#endif //EMBPERL_IO_CAPTURE
|
#endif //EMBPERL_IO_CAPTURE
|
||||||
|
|
||||||
|
const char *argv_eqemu[] = { "",
|
||||||
|
#ifdef EMBPERL_IO_CAPTURE
|
||||||
|
"-w", "-W",
|
||||||
|
#endif
|
||||||
|
"-e", "0;", nullptr };
|
||||||
|
|
||||||
|
#ifdef EMBPERL_IO_CAPTURE
|
||||||
|
int argc = 5;
|
||||||
|
#else
|
||||||
|
int argc = 3;
|
||||||
|
#endif
|
||||||
//so embedded scripts can use xs extensions (ala 'use socket;')
|
//so embedded scripts can use xs extensions (ala 'use socket;')
|
||||||
EXTERN_C void boot_DynaLoader(pTHX_ CV* cv);
|
EXTERN_C void boot_DynaLoader(pTHX_ CV* cv);
|
||||||
EXTERN_C void xs_init(pTHX)
|
EXTERN_C void xs_init(pTHX)
|
||||||
@ -85,38 +96,25 @@ EXTERN_C void xs_init(pTHX)
|
|||||||
|
|
||||||
Embperl::Embperl()
|
Embperl::Embperl()
|
||||||
{
|
{
|
||||||
|
char **argv = (char **)argv_eqemu;
|
||||||
|
char **env = { nullptr };
|
||||||
in_use = true; //in case one of these files generates an event
|
in_use = true; //in case one of these files generates an event
|
||||||
|
PERL_SYS_INIT3(&argc, &argv, &env);
|
||||||
//setup perl...
|
|
||||||
my_perl = perl_alloc();
|
|
||||||
if(!my_perl)
|
|
||||||
throw "Failed to init Perl (perl_alloc)";
|
|
||||||
DoInit();
|
DoInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Embperl::DoInit() {
|
void Embperl::DoInit() {
|
||||||
const char *argv_eqemu[] = { "",
|
|
||||||
#ifdef EMBPERL_IO_CAPTURE
|
|
||||||
"-w", "-W",
|
|
||||||
#endif
|
|
||||||
"-e", "0;", nullptr };
|
|
||||||
|
|
||||||
int argc = 3;
|
|
||||||
#ifdef EMBPERL_IO_CAPTURE
|
|
||||||
argc = 5;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
char **argv = (char **)argv_eqemu;
|
char **argv = (char **)argv_eqemu;
|
||||||
char **env = { nullptr };
|
char **env = { nullptr };
|
||||||
|
my_perl = perl_alloc();
|
||||||
|
//setup perl...
|
||||||
|
if(!my_perl)
|
||||||
|
throw "Failed to init Perl (perl_alloc)";
|
||||||
|
PERL_SET_CONTEXT(my_perl);
|
||||||
|
PERL_SET_INTERP(my_perl);
|
||||||
PL_perl_destruct_level = 1;
|
PL_perl_destruct_level = 1;
|
||||||
|
|
||||||
perl_construct(my_perl);
|
perl_construct(my_perl);
|
||||||
|
perl_parse(my_perl, xs_init, argc, argv, nullptr);
|
||||||
PERL_SYS_INIT3(&argc, &argv, &env);
|
|
||||||
|
|
||||||
perl_parse(my_perl, xs_init, argc, argv, env);
|
|
||||||
|
|
||||||
perl_run(my_perl);
|
perl_run(my_perl);
|
||||||
|
|
||||||
//a little routine we use a lot.
|
//a little routine we use a lot.
|
||||||
@ -213,12 +211,19 @@ Embperl::~Embperl()
|
|||||||
,FALSE);
|
,FALSE);
|
||||||
#endif
|
#endif
|
||||||
perl_free(my_perl);
|
perl_free(my_perl);
|
||||||
|
PERL_SYS_TERM();
|
||||||
|
my_perl = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Embperl::Reinit() {
|
void Embperl::Reinit() {
|
||||||
in_use = true;
|
in_use = true;
|
||||||
|
PERL_SET_CONTEXT(my_perl);
|
||||||
|
PERL_SET_INTERP(my_perl);
|
||||||
PL_perl_destruct_level = 1;
|
PL_perl_destruct_level = 1;
|
||||||
perl_destruct(my_perl);
|
perl_destruct(my_perl);
|
||||||
|
perl_free(my_perl);
|
||||||
|
my_perl = NULL;
|
||||||
|
//Now reinit...
|
||||||
DoInit();
|
DoInit();
|
||||||
in_use = false;
|
in_use = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3033,15 +3033,6 @@ void Mob::SetDeltas(float dx, float dy, float dz, float dh) {
|
|||||||
delta_heading = static_cast<int>(dh);
|
delta_heading = static_cast<int>(dh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Mob::HasBuffIcon(Mob *caster, Mob *target, uint16 spell_id)
|
|
||||||
{
|
|
||||||
if((caster->CalcBuffDuration(caster, target, spell_id)-1) > 0)
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Mob::SetEntityVariable(const char *id, const char *m_var)
|
void Mob::SetEntityVariable(const char *id, const char *m_var)
|
||||||
{
|
{
|
||||||
std::string n_m_var = m_var;
|
std::string n_m_var = m_var;
|
||||||
|
|||||||
@ -241,7 +241,6 @@ public:
|
|||||||
int16 GetBuffSlotFromType(uint16 type);
|
int16 GetBuffSlotFromType(uint16 type);
|
||||||
uint16 GetSpellIDFromSlot(uint8 slot);
|
uint16 GetSpellIDFromSlot(uint8 slot);
|
||||||
int CountDispellableBuffs();
|
int CountDispellableBuffs();
|
||||||
bool HasBuffIcon(Mob* caster, Mob* target, uint16 spell_id);
|
|
||||||
bool CheckHitsRemaining(uint32 buff_slot, bool when_spell_done=false, bool negate=false,uint16 type=0,
|
bool CheckHitsRemaining(uint32 buff_slot, bool when_spell_done=false, bool negate=false,uint16 type=0,
|
||||||
uint16 spell_id=0, bool use_skill=false,uint16 skill=0);
|
uint16 spell_id=0, bool use_skill=false,uint16 skill=0);
|
||||||
void SpreadVirus(uint16 spell_id, uint16 casterID);
|
void SpreadVirus(uint16 spell_id, uint16 casterID);
|
||||||
|
|||||||
@ -82,7 +82,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
|||||||
if(c_override)
|
if(c_override)
|
||||||
{
|
{
|
||||||
int durat = CalcBuffDuration(caster, this, spell_id, caster_level);
|
int durat = CalcBuffDuration(caster, this, spell_id, caster_level);
|
||||||
if((durat-1) > 0)
|
if(durat > 0)
|
||||||
{
|
{
|
||||||
buffslot = AddBuff(caster, spell_id, durat, caster_level);
|
buffslot = AddBuff(caster, spell_id, durat, caster_level);
|
||||||
if(buffslot == -1) // stacking failure
|
if(buffslot == -1) // stacking failure
|
||||||
@ -95,7 +95,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if((CalcBuffDuration(caster,this,spell_id)-1) > 0){
|
if(IsBuffSpell(spell_id)){
|
||||||
if(IsEffectInSpell(spell_id, SE_BindSight))
|
if(IsEffectInSpell(spell_id, SE_BindSight))
|
||||||
{
|
{
|
||||||
if(caster)
|
if(caster)
|
||||||
|
|||||||
@ -1818,7 +1818,13 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
|
|||||||
if (isproc) {
|
if (isproc) {
|
||||||
SpellOnTarget(spell_id, spell_target, false, true, resist_adjust, true);
|
SpellOnTarget(spell_id, spell_target, false, true, resist_adjust, true);
|
||||||
} else {
|
} else {
|
||||||
SpellOnTarget(spell_id, spell_target, false, true, resist_adjust, false);
|
if(!SpellOnTarget(spell_id, spell_target, false, true, resist_adjust, false)) {
|
||||||
|
if(IsBuffSpell(spell_id) && IsBeneficialSpell(spell_id)) {
|
||||||
|
// Prevent mana usage/timers being set for beneficial buffs
|
||||||
|
InterruptSpell();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(IsPlayerIllusionSpell(spell_id)
|
if(IsPlayerIllusionSpell(spell_id)
|
||||||
&& IsClient()
|
&& IsClient()
|
||||||
@ -2257,7 +2263,7 @@ void Mob::BardPulse(uint16 spell_id, Mob *caster) {
|
|||||||
{
|
{
|
||||||
if(IsClient())
|
if(IsClient())
|
||||||
{
|
{
|
||||||
if(HasBuffIcon(caster, this, spell_id) == false)
|
if(!IsBuffSpell(spell_id))
|
||||||
{
|
{
|
||||||
CastToClient()->SetKnockBackExemption(true);
|
CastToClient()->SetKnockBackExemption(true);
|
||||||
|
|
||||||
@ -3478,7 +3484,8 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
|
|||||||
// if SpellEffect returned false there's a problem applying the
|
// if SpellEffect returned false there's a problem applying the
|
||||||
// spell. It's most likely a buff that can't stack.
|
// spell. It's most likely a buff that can't stack.
|
||||||
mlog(SPELLS__CASTING_ERR, "Spell %d could not apply its effects %s -> %s\n", spell_id, GetName(), spelltar->GetName());
|
mlog(SPELLS__CASTING_ERR, "Spell %d could not apply its effects %s -> %s\n", spell_id, GetName(), spelltar->GetName());
|
||||||
Message_StringID(MT_Shout, SPELL_NO_HOLD);
|
if(casting_spell_type != 1) // AA is handled differently
|
||||||
|
Message_StringID(MT_Shout, SPELL_NO_HOLD);
|
||||||
safe_delete(action_packet);
|
safe_delete(action_packet);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -3497,7 +3504,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
|
|||||||
{
|
{
|
||||||
if(spelltar->IsClient())
|
if(spelltar->IsClient())
|
||||||
{
|
{
|
||||||
if(HasBuffIcon(this, spelltar, spell_id) == false)
|
if(!IsBuffSpell(spell_id))
|
||||||
{
|
{
|
||||||
spelltar->CastToClient()->SetKnockBackExemption(true);
|
spelltar->CastToClient()->SetKnockBackExemption(true);
|
||||||
|
|
||||||
|
|||||||
@ -217,7 +217,7 @@ public:
|
|||||||
bool GetAccountInfoForLogin(uint32 account_id, int16* admin = 0, char* account_name = 0,
|
bool GetAccountInfoForLogin(uint32 account_id, int16* admin = 0, char* account_name = 0,
|
||||||
uint32* lsaccountid = 0, uint8* gmspeed = 0, bool* revoked = 0, bool* gmhideme = 0);
|
uint32* lsaccountid = 0, uint8* gmspeed = 0, bool* revoked = 0, bool* gmhideme = 0);
|
||||||
bool GetAccountInfoForLogin_result(MYSQL_RES* result, int16* admin = 0, char* account_name = 0,
|
bool GetAccountInfoForLogin_result(MYSQL_RES* result, int16* admin = 0, char* account_name = 0,
|
||||||
uint32* lsaccountid = 0, uint8* gmspeed = 0, bool* revoked = 0, bool* gmhideme = false,
|
uint32* lsaccountid = 0, uint8* gmspeed = 0, bool* revoked = 0, bool* gmhideme = nullptr,
|
||||||
uint32* account_creation = 0);
|
uint32* account_creation = 0);
|
||||||
bool GetCharacterInfoForLogin_result(MYSQL_RES* result, uint32* character_id = 0, char* current_zone = 0,
|
bool GetCharacterInfoForLogin_result(MYSQL_RES* result, uint32* character_id = 0, char* current_zone = 0,
|
||||||
PlayerProfile_Struct* pp = 0, Inventory* inv = 0, ExtendedProfile_Struct *ext = 0, uint32* pplen = 0,
|
PlayerProfile_Struct* pp = 0, Inventory* inv = 0, ExtendedProfile_Struct *ext = 0, uint32* pplen = 0,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user