ArcEmu: Scripting Sholazarbasin - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Scripting Sholazarbasin

#1 User is offline   Artox 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 142
  • Joined: 01-November 08

Posted 05 December 2010 - 07:01 AM

I have been working a bit on 2 quests in SholazarBasin:

12644 - Still At It
involved objects:
involved npcs:
current problems:
Texts are german, I dont play on an english server to get the english ones.
The Fruit Barrels dont work. They dont cast the spells like they should do. Currently you can learn the spells as gm and see that they work. I'm not sure if this is a database or core problem.
On Retail there appears Steam around the pressure valve and on the brazier flames appear.
Random has to be much more "random".
all involved GOs glitter on retail.

12645 - The Taste Test
involved npcs:
current problems:
blizzlike times needed!
npcs do emotes on retail: they drink the brew and then they fall on their backs.

Here follows the current code. I hope someone will be able to contribute to this.

/*
 * ArcScripts for ArcEmu MMORPG Server
 * Copyright (C) 2009 ArcEmu Team <http://www.arcemu.org/>
 * Copyright (C) 2008-2009 Sun++ Team <http://www.sunscripting.com/>
 * Copyright (C) 2005-2007 Ascent Team <http://www.ascentemu.com/>
 * Copyright (C) 2007-2008 Moon++ Team <http://www.moonplusplus.info/>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "Setup.h"

// -----------------------------------------------------------------------------
// Quest 12532 - Flown the Coop!
// Quest 12702 - Chicken Party! (by bartus

class ChickenEscapee : public CreatureAIScript
{
	public:
		ADD_CREATURE_FACTORY_FUNCTION(ChickenEscapee);
		ChickenEscapee(Creature* c) : CreatureAIScript(c) {}

		void OnLoad()
		{
			RegisterAIUpdateEvent(1000);
		}

		void AIUpdate()
		{
			// Let's see if we are netted
			Aura* a = _unit->FindAura(51959);
			if(a != NULL)
			{
				Unit* Caster = a->GetUnitCaster();
				if(Caster->IsPlayer())
				{

					QuestLogEntry* qle = TO_PLAYER(Caster)->GetQuestLogForEntry(12532);
					if(qle == NULL)
						qle = TO_PLAYER(Caster)->GetQuestLogForEntry(12702);

					if(qle != NULL)
					{
						// casting the spell that will create the item for the player
						_unit->CastSpell(Caster, 51037, true);
						_unit->Despawn(1000, 360000);
					}
				}
			}
		}
};

// -----------------------------------------------------------------------------
// Quest 12645 - The Taste Test

#define TASTETEST 12645
#define OFFERJUNGLEPUNCH 51962
#define HEMET 27986
#define HADRIUS 28047
#define TAMARA 28568

bool TasteTestScript(uint32 i, Spell *pSpell)
{
	return true;
}

bool TasteTestDummy(uint32 i, Spell *pSpell)
{
	if(i != 1) // only act on dummy effect which is effect #2
		return true;
	Player *pPlayer = pSpell->p_caster;
	if(!pPlayer)
		return true;
	if(!pPlayer->HasQuest(TASTETEST))
		return true;
	// client expects server to select the spell target so we have to do it manually
	Unit *UnitTarget = pPlayer->GetMapMgr()->GetUnit(pPlayer->GetUInt64Value(UNIT_FIELD_TARGET));
	if(UnitTarget == NULL)
		return true;
	if(!UnitTarget->IsCreature())
		return true;
	Creature *pCreature = TO_CREATURE(UnitTarget);
	pPlayer->SendChatMessage(CHAT_MSG_SAY, LANG_UNIVERSAL, "Care to try Grimbooze Thunderbrew's Jungle punch?");
	switch(pCreature->GetCreatureInfo()->Id)
	{
		case HEMET:
			pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Aye, I'll try it.");
			pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Thats exactly what I needed!", 2000);
			pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "It's got my vote! That'll put hair on your chest like nothing else will.", 4000);
			pPlayer->AddQuestKill(TASTETEST, 0, 7000);
			break;
		case HADRIUS:
			pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "I'm always up for something of Grimbooze's.", 3000);
			// 3000 + 5000  drink
			pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Well, so far, it tastes like something my wife would drink...", 3000 + 5000 + 3000);
			// 3000 + 5000 + 3000 + 4000 fall - the "Kick"
			pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Now, there's the kick I've come to expect from Grimbooze's drinks! I like it!", 3000 + 5000 + 3000 + 4000 + 3000);
			pPlayer->AddQuestKill(TASTETEST, 1, 3000 + 5000 + 3000 + 4000 + 3000 + 1000);
			break;
		case TAMARA:
			pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Sure!");
			pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Oh my...", 2000);
			pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Tastes like I'm drinking... engine degreaser!", 4000);
			pPlayer->AddQuestKill(TASTETEST, 2, 7000);
			break;
		default:
			return true;
	}
	return true;
};

// -----------------------------------------------------------------------------
// Quest 12644 - Still At It

#define STILLATIT 12644
#define TIPSYMCMANUS 28566
#define TOSSORANGE 51931
#define TOSSBANANA 51932
#define TOSSPAPAYA 51933
#define PRESSUREVALVE 190635
#define BRAZIER 190636
#define JUNGLEPUNCH 190643

enum DestillationActions
{
	ACTION_TOSS_ORANGE,
	ACTION_TOSS_BANANA,
	ACTION_TOSS_PAPAYA,
	ACTION_LIGHT_BRAZIER,
	ACTION_OPEN_PRESSURE_VALVE
};

class TipsyMcManusAI : public CreatureAIScript, public EventableObject
{
  private:
	uint8 progress;
	uint8 requested_action;
	bool requested_twice;
	bool in_progress;
  public:
	ADD_CREATURE_FACTORY_FUNCTION( TipsyMcManusAI );
	TipsyMcManusAI( Creature *c ) : CreatureAIScript( c ){}

	void StartDestillation()
	{
		if(in_progress)
			return;
		in_progress = true;
		_unit->SetUInt32Value(UNIT_NPC_FLAGS, 0);
		SendText(0);
		sEventMgr.AddEvent(this, &TipsyMcManusAI::RequestAction, EVENT_UNK, 5000, 1, 0);
	}

	void OnAction(uint8 action)
	{
		if(!in_progress)
			return;
		if(action != requested_action)
			return;
		sEventMgr.RemoveEvents(this);
		progress++;
		
		switch(RandomUInt(7))
		{
			case 0:
			case 1:
			SendText(6);
			break;
			case 2:
			case 3:
			SendText(7);
			break;
			case 4:
			case 5:
			SendText(8);
			break;
			case 6:
			SendText(9);
			break;
		}

		if(progress == 9)
			FinishDestillation();
		else
			sEventMgr.AddEvent(this, &TipsyMcManusAI::RequestAction, EVENT_UNK, 7000, 1, 0);
	}

  private:
	void SendText(uint8 text)
	{
		switch(text)
		{
			case 0:
			_unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Beginne mit der Destillation in 5 Sekunden.");
			break;
			case 1:
			_unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Gebt eine weitere Orange hinzu! Schnell!");
			break;
			case 2:
			_unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Gebt Bananen hinzu!");
			break;
			case 3:
			_unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Gebt eine Papaya in die Destille!");
			break;
			case 4:
			_unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Die Destille braucht Hitze! Entz�ndet die Kohlenpfanne!");
			break;
			case 5:
			_unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Der Druck ist zu hoch! �ffnet das Druckventil!");
			break;
			case 6:
			_unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Das sollte reichen. Man wei� nie, was es als n�chstes ben�tigt...");
			break;
			case 7:
			_unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Klasse Arbeit! Bleibt gewappnet!");
			break;
			case 8:
			_unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Gute Arbeit! Haltet jetzt Eure Augen offen.");
			break;
			case 9:
			_unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Gut gemacht! Seid gegen alles gefeit!");
			break;
			case 10:
			_unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Wir haben es geschafft! Kommt, holt die Buddel.");
			break;
			case 11:
			_unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Das taugt nichts! Ich beende es...");
			break;
		}
	}

	void RequestAction()
	{
		requested_twice = false;
		switch(RandomUInt(17))
		{
			// Orange
			case 0:
			case 1:
			requested_action = ACTION_TOSS_ORANGE;
			break;
			// Banana
			case 2:
			case 3:
			case 4:
			case 5:
			requested_action = ACTION_TOSS_BANANA;
			break;
			// Papaya
			case 6:
			case 7:
			case 8:
			case 9:
			requested_action = ACTION_TOSS_PAPAYA;
			break;
			// Heat
			case 10:
			case 11:
			case 12:
			case 13:
			requested_action = ACTION_LIGHT_BRAZIER;
			break;
			// Pressure
			case 14:
			case 15:
			case 16:
			requested_action = ACTION_OPEN_PRESSURE_VALVE;
			break;
		}
		SendText(requested_action);
		sEventMgr.AddEvent(this, &TipsyMcManusAI::EventUpdateRequest, EVENT_UNK, 5000, 1, 0);
	}

	void EventUpdateRequest()
	{
		if(requested_twice)
		{
			OnDestillationFailed();
			return;
		}
		
		SendText(requested_action);
		sEventMgr.AddEvent(this, &TipsyMcManusAI::EventUpdateRequest, EVENT_UNK, 5000, 1, 0);
		requested_twice = true;
	}

	void FinishDestillation()
	{
		SendText(10);
		// spawn Brew
		_unit->GetMapMgr()->CreateAndSpawnGameObject(JUNGLEPUNCH, 5547.14, 5767.1, -78.0259, 2.25147, 1);

		// walk around
		
		// end the script
		sEventMgr.AddEvent(this, &TipsyMcManusAI::OnDestillationFinished, EVENT_UNK, 10000, 1, 0);
	}

	void OnDestillationFinished()
	{
		_unit->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
		in_progress = false;
	}

	void OnDestillationFailed()
	{
		SendText(11);
		_unit->Despawn(1000, 9000);
		in_progress = false;
	}
};

bool TossIngredient(uint32 i, Spell *pSpell)
{
	Creature *McManus = pSpell->p_caster->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(5545, 5768, -78, 28566);
	if(McManus == NULL)
		return true;
	TipsyMcManusAI *script = ((TipsyMcManusAI *)McManus->GetScript());
	switch(pSpell->GetProto()->Id)
	{
		case TOSSORANGE:
		script->OnAction(ACTION_TOSS_ORANGE);
		break;
		case TOSSBANANA:
		script->OnAction(ACTION_TOSS_BANANA);
		break;
		case TOSSPAPAYA:
		script->OnAction(ACTION_TOSS_PAPAYA);
		break;
	}
	return true;
};

class DestillationObjectAI : public GameObjectAIScript
{
public:
	DestillationObjectAI(GameObject* goinstance) : GameObjectAIScript(goinstance) {}
	static GameObjectAIScript *Create(GameObject* GO) { return new DestillationObjectAI(GO); }

	void OnActivate(Player* pPlayer)
	{
		Creature *McManus = pPlayer->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(5545, 5768, -78, 28566);
		if(McManus == NULL)
			return;
		TipsyMcManusAI *script = ((TipsyMcManusAI *)McManus->GetScript());
		switch(_gameobject->GetInfo()->ID)
		{
			case PRESSUREVALVE:
			script->OnAction(ACTION_OPEN_PRESSURE_VALVE);
			break;
			case BRAZIER:
			script->OnAction(ACTION_LIGHT_BRAZIER);
			break;
		}
	}
};

class TipsyMcManusGossip : public Arcemu::Gossip::Script
{
  public:
	void OnHello(Object *pObject, Player *pPlayer)
	{
		Arcemu::Gossip::Menu menu(pObject, 13288);
		if(pPlayer->HasQuest(STILLATIT))
			menu.AddItem( 0, "Ich bin bereit, mit der Destillation zu beginnen, uh, Schluckspecht.", 0);

		menu.Send(pPlayer);
	}

	void OnSelectOption(Object *pObject, Player *pPlayer, uint32 Id, const char * Code)
	{
		if(!pPlayer->HasQuest(STILLATIT))
			return;
		if(!pObject->IsCreature())
			return;
		Creature *McManus = TO_CREATURE(pObject);
		if(McManus->GetCreatureInfo()->Id != TIPSYMCMANUS)
			return;
		pPlayer->CloseGossip();
		((TipsyMcManusAI *)McManus->GetScript())->StartDestillation();
	}
};

// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
void SetupSholazarBasin(ScriptMgr* mgr)
{
	mgr->register_creature_script(28161, &ChickenEscapee::Create);

	mgr->register_script_effect(OFFERJUNGLEPUNCH, &TasteTestScript);
	mgr->register_dummy_spell(OFFERJUNGLEPUNCH, &TasteTestDummy);

	mgr->register_creature_gossip(TIPSYMCMANUS, new TipsyMcManusGossip());
	mgr->register_creature_script(TIPSYMCMANUS, &TipsyMcManusAI::Create);
	mgr->register_gameobject_script(PRESSUREVALVE, &DestillationObjectAI::Create);
	mgr->register_gameobject_script(BRAZIER, &DestillationObjectAI::Create);
	uint32 tossspellids[] = {TOSSORANGE,TOSSBANANA,TOSSPAPAYA};
	mgr->register_dummy_spell(tossspellids, &TossIngredient);
}
Quest_SholazarBasin.cpp

Attached the patch file for the arcemu source treeAttached File  sholazarbasin.patch (14.67K)
Number of downloads: 0
Posted Image
0

#2 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 05 December 2010 - 08:08 AM

The Taste Test is the same as the other patch? I wanted to review it 2 days ago but then started some Janitoring...
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#3 User is offline   Artox 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 142
  • Joined: 01-November 08

Posted 05 December 2010 - 10:07 AM

View PostSaintJamesApostle, on 05 December 2010 - 08:08 AM, said:

The Taste Test is the same as the other patch? I wanted to review it 2 days ago but then started some Janitoring...


It is no longer identical. I added a note to the other patch that it is not blizzlike. It still works so if you want to commit it, feel free but here is the place where I would like to get The Taste Test and Still At It working blizzlike.
Posted Image
0

#4 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 05 December 2010 - 10:50 AM

oh, ok, write a little msg to that patch with a link to this topic then, so I can decline it without users going "omg wtf why declined? wtf wtf" :D
The "Still At It" quest doesn't work on MaNGOS + ScriptDev2 atm so it would be a nice thing to get something they don't have :D
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#5 User is offline   Dzjhenghiz 

  • حشّاشين
  • Group: Contributor
  • Posts: 1,936
  • Joined: 07-June 08
  • Gender:Male
  • Location:2nd stone after the 3rd oase western sahara
  • Interests:M.C.S.E :- Minesweeper Consultant & Solitaire Expert
  • Server OS:Other

Posted 05 December 2010 - 10:50 AM

Nice,to see you still working on sholarzin xD
Need Help With Arcemu ? ^^
Posted Image
Concordia res parvae crescunt In varietate concordia
Spoiler

0

#6 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 05 December 2010 - 11:02 AM

in TasteTest()
if(!pSpell->m_caster->IsPlayer()) 
    return true; 
Player *pPlayer = TO_PLAYER(pSpell->m_caster); 

use pSpell->p_caster instead
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
1

#7 User is offline   Shauren 

  • Helper
  • Group: Contributor
  • Posts: 808
  • Joined: 04-November 08
  • Gender:Male
  • Location:Poland
  • Interests:hmm, wow?

Posted 06 December 2010 - 11:04 AM

View PostSaintJamesApostle, on 05 December 2010 - 10:50 AM, said:

oh, ok, write a little msg to that patch with a link to this topic then, so I can decline it without users going "omg wtf why declined? wtf wtf" :o
The "Still At It" quest doesn't work on MaNGOS + ScriptDev2 atm so it would be a nice thing to get something they don't have :D

TrinityCore > MaNGOS + ScriptDev2, in case of scripting at least

just saying
0

#8 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 06 December 2010 - 12:01 PM

View PostShauren, on 06 December 2010 - 11:04 AM, said:

TrinityCore > MaNGOS + ScriptDev2, in case of scripting at least

just saying

He plays on a server that runs MANGOS.
"The demand for free goods is infinite."
1

#9 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 06 December 2010 - 12:02 PM

sorry, I don't spend my time checking what all other projects do to compare them (and copypaste the best looking code) :o
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#10 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 06 December 2010 - 12:10 PM

View PostSaintJamesApostle, on 06 December 2010 - 12:02 PM, said:

sorry, I don't spend my time checking what all other projects do to compare them (and copypaste the best looking code) :o

You really should, and then without giving it a thought you should post it on another project's website as a patch ^^
"The demand for free goods is infinite."
0

#11 User is offline   Dzjhenghiz 

  • حشّاشين
  • Group: Contributor
  • Posts: 1,936
  • Joined: 07-June 08
  • Gender:Male
  • Location:2nd stone after the 3rd oase western sahara
  • Interests:M.C.S.E :- Minesweeper Consultant & Solitaire Expert
  • Server OS:Other

Posted 06 December 2010 - 12:22 PM

Well Im happy this is "under construction" :o

Gl coders

If a admin can RE Enable My PM thingie that would be nice, since i cant re enable it somehow ?

TYTYTY Master D. :D

This post has been edited by Dzjhenghiz: 06 December 2010 - 12:58 PM

Need Help With Arcemu ? ^^
Posted Image
Concordia res parvae crescunt In varietate concordia
Spoiler

0

#12 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 06 December 2010 - 12:29 PM

View PostDzjhenghiz, on 06 December 2010 - 12:22 PM, said:

If a admin can RE Enable My PM thingie that would be nice, since i cant re enable it somehow ?

Done. Next time you have some unresolvable issue like this, just send me an SMS and I will fix it if I can :o
"The demand for free goods is infinite."
0

#13 User is offline   Artox 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 142
  • Joined: 01-November 08

Posted 06 December 2010 - 01:02 PM

View PostSaintJamesApostle, on 05 December 2010 - 11:02 AM, said:

in TasteTest()
if(!pSpell->m_caster->IsPlayer()) 
    return true; 
Player *pPlayer = TO_PLAYER(pSpell->m_caster); 

use pSpell->p_caster instead


updated patch.
Posted Image
0

#14 User is offline   Shauren 

  • Helper
  • Group: Contributor
  • Posts: 808
  • Joined: 04-November 08
  • Gender:Male
  • Location:Poland
  • Interests:hmm, wow?

Posted 07 December 2010 - 09:02 AM

View Postdfighter, on 06 December 2010 - 12:10 PM, said:

You really should, and then without giving it a thought you should post it on another project's website as a patch ^^

waaait, isnt that exactly what most people do?
0

#15 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 07 December 2010 - 11:40 AM

View PostShauren, on 07 December 2010 - 09:02 AM, said:

waaait, isnt that exactly what most people do?

I wouldn't know. Aa you might have noticed, I rarely go even close to patches.
I'm afraid to be infected with some form of space madness that overcame Sulu.
"The demand for free goods is infinite."
0

#16 User is offline   Artox 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 142
  • Joined: 01-November 08

Posted 08 December 2010 - 12:51 PM

Now that jackpoz fixed the GOs, I did some research on throwing ingredients. One GO casts this spell. To my eyes there is some conflicting logic in Spell::SpellEffectTriggerSpell(uint32 i)
void Spell::SpellEffectTriggerSpell(uint32 i) // Trigger Spell
{
	SpellEntry *entry = dbcSpell.LookupEntryForced( GetProto()->EffectTriggerSpell[i] );
	if( entry == NULL ) 
		return;

	SpellCastTargets targets = m_targets;
	Spell *sp = new Spell( m_caster, entry, m_triggeredSpell, NULL );
	sp->ProcedOnSpell = GetProto();
	sp->prepare( &targets );
}

According to wowhead effect should be like this: "Trigger Spell from Target with Caster as Target"
this conflicts with the implementation. The implementation looks like this: trigger spell with target as target!
Maybe someone with the required knowledge on spells can shed some light on this?
Posted Image
0

#17 User is offline   Shauren 

  • Helper
  • Group: Contributor
  • Posts: 808
  • Joined: 04-November 08
  • Gender:Male
  • Location:Poland
  • Interests:hmm, wow?

Posted 08 December 2010 - 02:03 PM

you should not base your facts on wowhead spell effect names
0

#18 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 08 December 2010 - 02:07 PM

View PostShauren, on 08 December 2010 - 02:03 PM, said:

you should not base your facts on wowhead spell effect names

Yeah, jsut check other emulators ;)
About our own:
trunk\src\arcemu-world\SpellEffects.cpp(88): &Spell::SpellEffectTriggerSpell, //SPELL_EFFECT_TRIGGER_SPELL - 64
trunk\src\arcemu-world\SpellEffects.cpp(164): &Spell::SpellEffectTriggerSpell, // triggers a spell from target back to caster - used at Malacrass f.e. - 140
trunk\src\arcemu-world\SpellEffects.cpp(175): &Spell::SpellEffectTriggerSpell, // SPELL_EFFECT_TRIGGER_SPELL_2 - 151

looks like Spell Effect 140 needs its own SpellEffect handler instead of Spell::SpellEffectTriggerSpell()
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
1

#19 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 08 December 2010 - 03:52 PM

View PostArtox, on 08 December 2010 - 12:51 PM, said:

According to wowhead effect should be like this: "Trigger Spell from Target with Caster as Target"
this conflicts with the implementation. The implementation looks like this: trigger spell with target as target!
Maybe someone with the required knowledge on spells can shed some light on this?

That probably depends on the target (ever wondered about the purpose of the EffectImplicitTarget fields? ) of the trigger effect.
"The demand for free goods is infinite."
0

#20 User is offline   Shauren 

  • Helper
  • Group: Contributor
  • Posts: 808
  • Joined: 04-November 08
  • Gender:Male
  • Location:Poland
  • Interests:hmm, wow?

Posted 08 December 2010 - 05:13 PM

View PostSaintJamesApostle, on 08 December 2010 - 02:07 PM, said:

Yeah, jsut check other emulators :lol:

not what i meant

spell's target is determined by target fields, not effect type, THEN effect is triggered for every affected target of the spell
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users