Skip to content

Instantly share code, notes, and snippets.

@callmephil
callmephil / Mutli-XP.cpp
Created November 9, 2014 14:51
Mutli-XP System
class LEVEL_NPC : public CreatureScript
{
public: LEVEL_NPC() : CreatureScript("LEVEL_NPC") {}
bool OnGossipHello(Player* player, Creature* creature)
{
if (player->HasItemCount(600000, 1, true) || player->HasItemCount(600001, 1, true))
ChatHandler(player->GetSession()).SendSysMessage("You are no longer able to acces to this npc.");
if (player->getLevel() == 1)
@callmephil
callmephil / ACE.diff
Created November 11, 2014 17:50
Allow Trade etc channel everywhere.
@@ -5525,7 +5534,7 @@ bool Player::CanJoinConstantChannelInZone(ChatChannelsEntry const* channel, Area
if (channel->flags & CHANNEL_DBC_FLAG_ZONE_DEP && zone->flags & AREA_FLAG_ARENA_INSTANCE)
return false;
- if ((channel->flags & CHANNEL_DBC_FLAG_CITY_ONLY) && (!(zone->flags & AREA_FLAG_SLAVE_CAPITAL)))
+ if ((channel->flags & CHANNEL_DBC_FLAG_CITY_ONLY) && (!(zone->mapid == 0 || zone->mapid == 1 || zone->mapid == 571 || zone->mapid == 530)))
return false;
if ((channel->flags & CHANNEL_DBC_FLAG_GUILD_REQ) && GetGuildId())
@callmephil
callmephil / (1) Transmog Vanilla.sql
Last active July 25, 2023 12:08
{Ultimate} Transmogrifcation Mall Vendors 3.3.5
Set @Subname_OS_Vanilla_1 := "Transmog Off-Set Vanilla 'Uncommon'";
Set @Subname_OS_Vanilla_2 := "Transmog Off-Set Vanilla 'Rare & Epics'";
Set @Subname_Wep_Vanilla_1 := "Transmog Weapons Vanilla 'Uncommon'";
Set @Subname_Wep_Vanilla_2 := "Transmog Weapons Vanilla 'Rare'";
Set @Subname_Wep_Vanilla_3 := "Transmog Weapons Vanilla 'Epics'";
Set @M_Cloth := 7;
Set @M_Leather := 8;
Set @M_Mail := 5;
@callmephil
callmephil / custom_rate.cpp
Last active August 29, 2015 14:12
Individual {xp/loot} rate (4.3.4)
/*
SQL : CHARACTERS
DROP TABLE IF EXISTS `character_loot_rate`;
CREATE TABLE `character_loot_rate` (
`guid` int(10) unsigned NOT NULL,
`loot_rate` int(10) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`guid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player Loot Rate System';
@callmephil
callmephil / spelltracelog.diff
Last active October 5, 2015 21:14
spell tracelog
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 768b290..9915fea 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -3690,6 +3690,11 @@ void Spell::cast(bool skipCheck)
}
}
+ if (Player* playercast = m_caster->ToPlayer())
+ if ((playercast->IsAlive() && playercast->IsInCombat()) && player->GetMap()->IsBattlegroundOrArena())
#include "ScriptPCH.h"
class gamble_npc : public CreatureScript
{
public:
gamble_npc() : CreatureScript("gamble_npc") { }
std::string colorstring(int8 type)
{
std::string _color;
@callmephil
callmephil / arena_spectator.patch
Last active September 28, 2015 13:14 — forked from walkline/arena_spectator.patch
arena spectator system
From 7b0fad50ebcb1be886b807c9f8e6374311e6e234 Mon Sep 17 00:00:00 2001
From: EmiliyanKurtseliyanski <[email protected]>
Date: Sun, 30 Mar 2014 22:22:16 -0700
Subject: [PATCH] Proper Spectator
---
sql/Razer/Custom/rbac_permissions_Spectate.sql | 12 +
.../Custom/rbac_role_permissions_Spectate.sql | 12 +
src/server/game/Accounts/RBAC.h | 6 +
src/server/game/Battlegrounds/Battleground.cpp | 34 +-
@callmephil
callmephil / DisableWhoInArena.diff
Created January 25, 2016 17:27
Disable /Who In Arena
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index 758d5af..6f07ff4 100644
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -255,6 +255,10 @@ void WorldSession::HandleWhoOpcode(WorldPacket& recvData)
// player can see member of other team only if CONFIG_ALLOW_TWO_SIDE_WHO_LIST
if (target->GetTeam() != team && !HasPermission(rbac::RBAC_PERM_TWO_SIDE_WHO_LIST))
continue;
+
+ // will not allow player in arena to see other players in who
@callmephil
callmephil / CustomNPC.cpp
Last active December 9, 2016 18:46
Ac-Web Script Request
class Custom_NPC : public CreatureScript
{
public:
Custom_NPC() : CreatureScript("Custom_NPC") { }
bool OnGossipHello(Player* player, Creature* creature)
{
player->ADD_GOSSIP_ITEM(1, "Nevermind", GOSSIP_SENDER_MAIN, 0);
player->ADD_GOSSIP_ITEM(1, "Thing you Want to do", GOSSIP_SENDER_MAIN, 1);
@callmephil
callmephil / Spell_Generic.cpp
Created October 24, 2017 17:20
RetroPortedMountFlyingFix
class spell_gen_mount : public SpellScriptLoader
{
public:
spell_gen_mount(const char* name, uint32 mount0 = 0, uint32 mount60 = 0, uint32 mount100 = 0, uint32 mount150 = 0, uint32 mount280 = 0, uint32 mount310 = 0) : SpellScriptLoader(name),
_mount0(mount0), _mount60(mount60), _mount100(mount100), _mount150(mount150), _mount280(mount280), _mount310(mount310) { }
class spell_gen_mount_SpellScript : public SpellScript
{
PrepareSpellScript(spell_gen_mount_SpellScript);