aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Level1.cpp2
-rw-r--r--src/game/Level2.cpp9
-rw-r--r--src/game/Player.cpp1
-rw-r--r--src/game/Spell.cpp2
4 files changed, 8 insertions, 6 deletions
diff --git a/src/game/Level1.cpp b/src/game/Level1.cpp
index 0317a6c3e22..9ec47381f61 100644
--- a/src/game/Level1.cpp
+++ b/src/game/Level1.cpp
@@ -846,7 +846,7 @@ bool ChatHandler::HandleNamegoCommand(const char* args)
PSendSysMessage(LANG_SUMMONING, nameLink.c_str(),"");
if (needReportToTarget(target))
- ChatHandler(target).PSendSysMessage(LANG_SUMMONED_BY, nameLink.c_str());
+ ChatHandler(target).PSendSysMessage(LANG_SUMMONED_BY, _player->GetName());
// stop flight if need
if (target->isInFlight())
diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp
index ec38b3c57ac..e7a684a8111 100644
--- a/src/game/Level2.cpp
+++ b/src/game/Level2.cpp
@@ -66,9 +66,10 @@ bool ChatHandler::HandleMuteCommand(const char* args)
return false;
uint32 account_id = target ? target->GetSession()->GetAccountId() : objmgr.GetPlayerAccountIdByGUID(target_guid);
+ std::string mutereasonstr = "No reason.";
char *mutereason = strtok(NULL, " ");
- if(!mutereason)
- strcpy(mutereason, "No reason.");
+ if(mutereason)
+ mutereason = mutereason;
// find only player from same account if any
if(!target)
@@ -91,11 +92,11 @@ bool ChatHandler::HandleMuteCommand(const char* args)
LoginDatabase.PExecute("UPDATE account SET mutetime = " UI64FMTD " WHERE id = '%u'",uint64(mutetime), account_id );
if(target)
- ChatHandler(target).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, notspeaktime, mutereason);
+ ChatHandler(target).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, notspeaktime, mutereasonstr.c_str());
std::string nameLink = playerLink(target_name);
- PSendSysMessage(LANG_YOU_DISABLE_CHAT, nameLink, notspeaktime, mutereason);
+ PSendSysMessage(LANG_YOU_DISABLE_CHAT, nameLink, notspeaktime, mutereasonstr.c_str());
return true;
}
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 9a8345b67e9..7f3d173015f 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -17800,6 +17800,7 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
sLog.outDebug("CHEATING ATTEMPT slot > bagSize in BuyItemFromVendor playerGUID: "I64FMT" name: %s slot: %u", GetGUID(), GetName(), slot);
return false;
}
+ if(slot < pBag->GetBagSlot() && !pBag->GetItemByPos(slot))
bag = i;
break;
}
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 17ff750452a..543c56770bd 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -2571,7 +2571,7 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect* triggeredByAura
{
// stealth must be removed at cast starting (at show channel bar)
// skip triggered spell (item equip spell casting and other not explicit character casts/item uses)
- if(isSpellBreakStealth(m_spellInfo) )
+ if(!m_IsTriggeredSpell && isSpellBreakStealth(m_spellInfo) )
{
m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CAST);
for(uint32 i = 0; i < 3; ++i)