TrinityCore
Loading...
Searching...
No Matches
zone_wintergrasp.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "ScriptMgr.h"
19#include "Battlefield.h"
20#include "BattlefieldMgr.h"
22#include "DBCStores.h"
23#include "GameObject.h"
24#include "GameObjectAI.h"
25#include "GameTime.h"
26#include "ObjectMgr.h"
27#include "Player.h"
28#include "ScriptedCreature.h"
29#include "ScriptedGossip.h"
30#include "ScriptSystem.h"
31#include "SpellAuras.h"
32#include "SpellAuraEffects.h"
33#include "SpellScript.h"
34#include "Vehicle.h"
35#include "WorldSession.h"
36
37#define GOSSIP_HELLO_DEMO1 "Build catapult."
38#define GOSSIP_HELLO_DEMO2 "Build demolisher."
39#define GOSSIP_HELLO_DEMO3 "Build siege engine."
40#define GOSSIP_HELLO_DEMO4 "I cannot build more!"
41
52
68
78
109
111
119
121{
123
146
147 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
148 {
149 uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
150 CloseGossipMenuFor(player);
151
152 if (CanBuild())
153 {
154 switch (action - GOSSIP_ACTION_INFO_DEF)
155 {
156 case 0:
157 DoCast(player, SPELL_BUILD_CATAPULT_FORCE, true);
158 break;
159 case 1:
161 break;
162 case 2:
164 break;
165 }
166 if (Creature* controlArms = me->FindNearestCreature(NPC_WINTERGRASP_CONTROL_ARMS, 30.0f, true))
167 DoCast(controlArms, SPELL_ACTIVATE_CONTROL_ARMS, true);
168 }
169 return true;
170 }
171
172private:
173 bool CanBuild() const
174 {
175 Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
176 if (!wintergrasp)
177 return false;
178
179 switch (me->GetEntry())
180 {
185 default:
186 return false;
187 }
188 }
189};
190
192{
193 npc_wg_spirit_guide(Creature* creature) : ScriptedAI(creature) { }
194
195 void UpdateAI(uint32 /*diff*/) override
196 {
199 }
200
201 bool OnGossipHello(Player* player) override
202 {
203 if (me->IsQuestGiver())
204 player->PrepareQuestMenu(me->GetGUID());
205
206 Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
207 if (!wintergrasp)
208 return true;
209
210 GraveyardVect graveyard = wintergrasp->GetGraveyardVector();
211 for (uint8 i = 0; i < graveyard.size(); i++)
212 if (graveyard[i]->GetControlTeamId() == player->GetTeamId())
214
215 SendGossipMenuFor(player, player->GetGossipTextId(me), me->GetGUID());
216 return true;
217 }
218
219 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
220 {
221 uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
222 CloseGossipMenuFor(player);
223
224 Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
225 if (wintergrasp)
226 {
227 GraveyardVect gy = wintergrasp->GetGraveyardVector();
228 for (uint8 i = 0; i < gy.size(); i++)
229 if (action - GOSSIP_ACTION_INFO_DEF == i && gy[i]->GetControlTeamId() == player->GetTeamId())
230 if (WorldSafeLocsEntry const* safeLoc = sWorldSafeLocsStore.LookupEntry(gy[i]->GetGraveyardId()))
231 player->TeleportTo(safeLoc->Continent, safeLoc->Loc.X, safeLoc->Loc.Y, safeLoc->Loc.Z, 0);
232 }
233 return true;
234 }
235};
236
238{
239 SPELL_FROST_ARMOR = 12544
241
243{
244 npc_wg_queue(Creature* creature) : ScriptedAI(creature)
245 {
247 }
248
250
251 void Reset() override
252 {
254 }
255
256 void JustEngagedWith(Unit* /*who*/) override { }
257
258 void UpdateAI(uint32 diff) override
259 {
260 if (FrostArmor_Timer <= diff)
261 {
263 FrostArmor_Timer = 180000;
264 }
265 else FrostArmor_Timer -= diff;
266
268 }
269
270 bool OnGossipHello(Player* player) override
271 {
272 if (me->IsQuestGiver())
273 player->PrepareQuestMenu(me->GetGUID());
274
275 Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
276 if (!wintergrasp)
277 return true;
278
279 if (wintergrasp->IsWarTime())
280 {
283 }
284 else
285 {
286 uint32 timer = wintergrasp->GetTimer() / 1000;
287 player->SendUpdateWorldState(4354, GameTime::GetGameTime() + timer);
288 if (timer < 15 * MINUTE)
289 {
292 }
293 else
295 }
296 return true;
297 }
298
299 bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override
300 {
301 CloseGossipMenuFor(player);
302
303 Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
304 if (!wintergrasp)
305 return true;
306
307 if (wintergrasp->IsWarTime())
308 wintergrasp->InvitePlayerToWar(player);
309 else
310 {
311 uint32 timer = wintergrasp->GetTimer() / 1000;
312 if (timer < 15 * MINUTE)
313 wintergrasp->InvitePlayerToQueue(player);
314 }
315 return true;
316 }
317};
318
320{
322
323 bool IsFriendly(Unit* passenger)
324 {
325 return ((me->GetFaction() == FACTION_HORDE_GENERIC_WG && passenger->GetFaction() == HORDE) ||
326 (me->GetFaction() == FACTION_ALLIANCE_GENERIC_WG && passenger->GetFaction() == ALLIANCE));
327 }
328
330 {
332 if (Vehicle* vehicle = cVeh->GetVehicleKit())
333 if (Unit* passenger = vehicle->GetPassenger(0))
334 if (IsFriendly(passenger))
335 if (Creature* teleportTrigger = passenger->SummonTrigger(me->GetPositionX()-60.0f, me->GetPositionY(), me->GetPositionZ()+1.0f, cVeh->GetOrientation(), 1s))
336 return teleportTrigger;
337
338 return nullptr;
339 }
340
341 void UpdateAI(uint32 diff) override
342 {
343 _checkTimer += diff;
344 if (_checkTimer >= 1000)
345 {
346 for (uint8 i = 0; i < MAX_WINTERGRASP_VEHICLES; i++)
347 if (Creature* vehicleCreature = me->FindNearestCreature(vehiclesList[i], 3.0f, true))
348 if (Creature* teleportTrigger = GetValidVehicle(vehicleCreature))
349 teleportTrigger->CastSpell(vehicleCreature, SPELL_VEHICLE_TELEPORT, true);
350
351 _checkTimer = 0;
352 }
353 }
354
355private:
357};
358
359/* 49899 - Activate Robotic Arms
360 56659 - Build Demolisher (Force)
361 56662 - Build Siege Vehicle (Force)
362 56664 - Build Catapult (Force)
363 61409 - Build Siege Vehicle (Force) */
390
391// 61178 - Grab Passenger
407
408// 49899 - Activate Robotic Arms
423
425{
426 public:
427 achievement_wg_didnt_stand_a_chance() : AchievementCriteriaScript("achievement_wg_didnt_stand_a_chance") { }
428
429 bool OnCheck(Player* source, Unit* target) override
430 {
431 if (!target)
432 return false;
433
434 if (Player* victim = target->ToPlayer())
435 {
436 if (!victim->IsMounted())
437 return false;
438
439 if (Vehicle* vehicle = source->GetVehicle())
440 if (vehicle->GetVehicleInfo()->ID == 244) // Wintergrasp Tower Cannon
441 return true;
442 }
443
444 return false;
445 }
446};
447
452
453// 54640 - Teleport
455{
457
459 {
460 if (Battlefield* wg = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG))
461 if (Player* target = GetExplTargetUnit()->ToPlayer())
462 // check if we are in Wintergrasp at all, SotA uses same teleport spells
463 if ((target->GetZoneId() == AREA_WINTERGRASP && target->GetTeamId() != wg->GetDefenderTeam()) || target->HasAura(SPELL_WINTERGRASP_TELEPORT_TRIGGER))
465 return SPELL_CAST_OK;
466 }
467
472};
473
474// 54643 - Teleport
493
494// 58549 - Tenacity
495// 59911 - Tenacity
497{
499
500 bool Validate(SpellInfo const* spellInfo) override
501 {
502 uint32 triggeredSpellId = spellInfo->GetEffect(EFFECT_2).CalcValue();
503 return !triggeredSpellId || ValidateSpellInfo({ triggeredSpellId });
504 }
505
506 void Refresh(AuraEffect const* aurEff)
507 {
509
510 if (uint32 triggeredSpellId = aurEff->GetSpellEffectInfo().CalcValue())
511 {
512 int32 bp = 0;
513 if (AuraEffect const* healEffect = GetEffect(EFFECT_0))
514 bp = healEffect->GetAmount();
515
516 CastSpellExtraArgs args(aurEff);
517 args
520 GetTarget()->CastSpell(nullptr, triggeredSpellId, args);
521 }
522
524 }
525
526 void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
527 {
528 if (uint32 triggeredSpellId = aurEff->GetSpellEffectInfo().CalcValue())
529 GetTarget()->RemoveAurasDueToSpell(triggeredSpellId);
530 }
531
537};
538
540{
541 public:
542 condition_is_wintergrasp_horde() : ConditionScript("condition_is_wintergrasp_horde") { }
543
544 bool OnConditionCheck(Condition const* /* condition */, ConditionSourceInfo& /* sourceInfo */) override
545 {
546 Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
547 if (wintergrasp && wintergrasp->IsEnabled() && wintergrasp->GetDefenderTeam() == TEAM_HORDE)
548 return true;
549 return false;
550 }
551};
552
554{
555 public:
556 condition_is_wintergrasp_alliance() : ConditionScript("condition_is_wintergrasp_alliance") { }
557
558 bool OnConditionCheck(Condition const* /* condition */, ConditionSourceInfo& /* sourceInfo */) override
559 {
560 Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
561 if (wintergrasp && wintergrasp->IsEnabled() && wintergrasp->GetDefenderTeam() == TEAM_ALLIANCE)
562 return true;
563 return false;
564 }
565};
566
#define sBattlefieldMgr
@ NPC_WINTERGRASP_SIEGE_ENGINE_HORDE
@ NPC_WINTERGRASP_CATAPULT
@ NPC_WINTERGRASP_DEMOLISHER
@ NPC_WINTERGRASP_SIEGE_ENGINE_ALLIANCE
@ SPELL_CORPORAL
@ SPELL_LIEUTENANT
@ BATTLEFIELD_WG_DATA_VEHICLE_A
@ BATTLEFIELD_WG_DATA_MAX_VEHICLE_A
@ BATTLEFIELD_WG_DATA_VEHICLE_H
@ BATTLEFIELD_WG_DATA_MAX_VEHICLE_H
std::vector< BfGraveyard * > GraveyardVect
Definition Battlefield.h:82
@ BATTLEFIELD_BATTLEID_WG
Definition Battlefield.h:34
@ MINUTE
Definition Common.h:29
DBCStorage< WorldSafeLocsEntry > sWorldSafeLocsStore(WorldSafeLocsEntryfmt)
uint8_t uint8
Definition Define.h:135
int32_t int32
Definition Define.h:129
uint32_t uint32
Definition Define.h:133
@ GOSSIP_ICON_CHAT
Definition GossipDef.h:60
Spells
Definition PlayerAI.cpp:32
#define RegisterCreatureAI(ai_name)
Definition ScriptMgr.h:1139
#define RegisterGameObjectAI(ai_name)
Definition ScriptMgr.h:1157
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
void SendGossipMenuFor(Player *player, uint32 npcTextID, ObjectGuid const &guid)
void AddGossipItemFor(Player *player, GossipOptionIcon icon, std::string const &text, uint32 sender, uint32 action)
void CloseGossipMenuFor(Player *player)
@ GOSSIP_SENDER_MAIN
@ GOSSIP_ACTION_INFO_DEF
SpellEffIndex
@ EFFECT_0
@ EFFECT_2
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ EMOTE_ONESHOT_CUSTOM_SPELL_05
@ TEAM_ALLIANCE
@ TEAM_HORDE
@ ALLIANCE
@ HORDE
@ FACTION_ALLIANCE_GENERIC_WG
@ FACTION_HORDE_GENERIC_WG
@ AREA_WINTERGRASP
SpellCastResult
@ SPELL_FAILED_BAD_TARGETS
@ SPELL_CAST_OK
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELLVALUE_BASE_POINT1
@ SPELLVALUE_BASE_POINT0
#define SpellCheckCastFn(F)
#define SpellEffectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectRemoveFn(F, I, N, M)
@ UNIT_STATE_CASTING
Definition Unit.h:235
SpellEffectInfo const & GetSpellEffectInfo() const
void PreventDefaultAction()
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
AuraEffect * GetEffect(uint8 effIndex) const
Unit * GetTarget() const
void RefreshDuration()
bool IsWarTime() const
Return true if battle is start, false if battle is not started.
GraveyardVect GetGraveyardVector() const
void InvitePlayerToQueue(Player *player)
void InvitePlayerToWar(Player *player)
TeamId GetDefenderTeam() const
uint32 GetTimer() const
virtual uint32 GetData(uint32 dataId) const override
bool IsEnabled() const
Return if battlefield is enable.
Creature *const me
Definition CreatureAI.h:82
GameObject *const me
uint32 GetFaction() const override
Definition GameObject.h:285
uint32 GetEntry() const
Definition Object.h:81
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:78
static Player * ToPlayer(Object *o)
Definition Object.h:180
uint32 GetGossipOptionAction(uint32 selection) const
Definition GossipDef.h:269
void SendUpdateWorldState(uint32 variable, uint32 value) const
Definition Player.cpp:8493
WorldSession * GetSession() const
Definition Player.h:1719
TeamId GetTeamId() const
Definition Player.h:1833
void PrepareQuestMenu(ObjectGuid guid)
Definition Player.cpp:14270
bool TeleportTo(uint32 mapid, float x, float y, float z, float orientation, uint32 options=0)
Definition Player.cpp:1524
uint32 GetGossipTextId(uint32 menuId, WorldObject *source)
Definition Player.cpp:14233
PlayerMenu * PlayerTalkClass
Definition Player.h:1969
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr) const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:483
HookList< CheckCastHandler > OnCheckCast
Player * GetHitPlayer() const
void SetExplTargetDest(WorldLocation &loc)
Unit * GetCaster() const
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Unit * GetHitUnit() const
int32 GetEffectValue() const
HookList< EffectHandler > OnEffectHitTarget
Unit * GetExplTargetUnit() const
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:54
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:106
Definition Unit.h:769
Vehicle * GetVehicle() const
Definition Unit.h:1737
bool IsQuestGiver() const
Definition Unit.h:1103
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:4535
uint32 GetFaction() const override
Definition Unit.h:973
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3784
bool HasUnitState(const uint32 f) const
Definition Unit.h:876
void HandleEmoteCommand(Emote emoteId)
Definition Unit.cpp:1568
Vehicle * GetVehicleKit() const
Definition Unit.h:1735
WorldLocation GetWorldLocation() const
Definition Position.h:188
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
Creature * SummonTrigger(float x, float y, float z, float ang, Milliseconds despawnTime, CreatureAI *(*GetAI)(Creature *)=nullptr)
Definition Object.cpp:2057
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2099
char const * GetTrinityString(uint32 entry) const
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
bool OnCheck(Player *source, Unit *target) override
bool OnConditionCheck(Condition const *, ConditionSourceInfo &) override
bool OnConditionCheck(Condition const *, ConditionSourceInfo &) override
PrepareSpellScript(spell_wintergrasp_activate_robotic_arms)
PrepareSpellScript(spell_wintergrasp_defender_teleport_trigger)
PrepareSpellScript(spell_wintergrasp_defender_teleport)
PrepareSpellScript(spell_wintergrasp_force_building)
void HandleScript(SpellEffIndex effIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_wintergrasp_grab_passenger)
PrepareAuraScript(spell_wintergrasp_tenacity_refresh)
void OnRemove(AuraEffect const *aurEff, AuraEffectHandleModes)
bool Validate(SpellInfo const *spellInfo) override
void Refresh(AuraEffect const *aurEff)
time_t GetGameTime()
Definition GameTime.cpp:42
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
float GetPositionZ() const
Definition Position.h:81
float GetOrientation() const
Definition Position.h:82
float GetPositionX() const
Definition Position.h:79
float GetPositionY() const
Definition Position.h:80
go_wg_vehicle_teleporter(GameObject *gameObject)
Creature * GetValidVehicle(Creature *cVeh)
bool IsFriendly(Unit *passenger)
void UpdateAI(uint32 diff) override
bool OnGossipHello(Player *player) override
npc_wg_demolisher_engineer(Creature *creature)
bool OnGossipSelect(Player *player, uint32, uint32 gossipListId) override
bool OnGossipSelect(Player *player, uint32, uint32) override
npc_wg_queue(Creature *creature)
void UpdateAI(uint32 diff) override
void Reset() override
bool OnGossipHello(Player *player) override
void JustEngagedWith(Unit *) override
bool OnGossipSelect(Player *player, uint32, uint32 gossipListId) override
void UpdateAI(uint32) override
bool OnGossipHello(Player *player) override
npc_wg_spirit_guide(Creature *creature)
uint32 const vehiclesList[MAX_WINTERGRASP_VEHICLES]
#define GOSSIP_HELLO_DEMO4
#define GOSSIP_HELLO_DEMO2
@ SPELL_WINTERGRASP_TELEPORT_TRIGGER
WGqueuenpctext
@ WG_NPCQUEUE_TEXT_H_WAR
@ WG_NPCQUEUE_TEXTOPTION_JOIN
@ WG_NPCQUEUE_TEXT_H_NOWAR
@ WG_NPCQUEUE_TEXT_A_WAR
@ WG_NPCQUEUE_TEXT_A_QUEUE
@ WG_NPCQUEUE_TEXT_H_QUEUE
@ WG_NPCQUEUE_TEXT_A_NOWAR
@ SPELL_BUILD_DEMOLISHER_FORCE
@ SPELL_VEHICLE_TELEPORT
@ SPELL_RIDE_WG_VEHICLE
@ SPELL_ACTIVATE_CONTROL_ARMS
@ SPELL_CHANNEL_SPIRIT_HEAL
@ SPELL_BUILD_SIEGE_VEHICLE_FORCE_ALLIANCE
@ SPELL_BUILD_SIEGE_VEHICLE_FORCE_HORDE
@ SPELL_BUILD_CATAPULT_FORCE
uint8 const MAX_WINTERGRASP_VEHICLES
@ QUEST_HEALING_WITH_ROSES_HORDE_DEF
@ QUEST_DEFEND_THE_SIEGE_HORDE_ATT
@ QUEST_SHOUTHERN_SABOTAGE_ALLIANCE_DEF
@ QUEST_SLAY_THEM_ALL_HORDE_DEF
@ QUEST_FUELING_THE_DEMOLISHERS_HORDE_DEF
@ QUEST_A_RARE_HERB_ALLIANCE_DEF
@ QUEST_FUELING_THE_DEMOLISHERS_HORDE_ATT
@ QUEST_SLAY_THEM_ALL_HORDE_ATT
@ QUEST_STOP_THE_SIEGE_HORDE_DEF
@ QUEST_WARDING_THE_WALLS_HORDE_DEF
@ QUEST_BONES_AND_ARROWS_ALLIANCE_DEF
@ QUEST_A_RARE_HERB_ALLIANCE_ATT
@ QUEST_HEALING_WITH_ROSES_HORDE_ATT
@ QUEST_BONES_AND_ARROWS_ALLIANCE_ATT
@ QUEST_NO_MERCY_FOR_THE_MERCILESS_ALLIANCE_ATT
@ QUEST_STOP_THE_SIEGE_ALLIANCE_DEF
@ QUEST_NO_MERCY_FOR_THE_MERCILESS_ALLIANCE_DEF
@ QUEST_WARDING_THE_WARRIORS_ALLIANCE_ATT
@ QUEST_TOPPLING_THE_TOWERS_HORDE_DEF
@ QUEST_BONES_AND_ARROWS_HORDE_DEF
@ QUEST_WARDING_THE_WARRIORS_ALLIANCE_DEF
@ QUEST_BONES_AND_ARROWS_HORDE_ATT
@ QUEST_DEFEND_THE_SIEGE_ALLIANCE_ATT
@ QUEST_JINXING_THE_WALLS_HORDE_ATT
@ NPC_GOBLIN_MECHANIC
@ NPC_WINTERGRASP_CONTROL_ARMS
@ NPC_WORLD_TRIGGER_LARGE_AOI_NOT_IMMUNE_PC_NPC
@ NPC_GNOMISH_ENGINEER
void AddSC_wintergrasp()
#define GOSSIP_HELLO_DEMO3
@ SPELL_FROST_ARMOR
#define GOSSIP_HELLO_DEMO1