ArcEmu: [Applied][Applied]Scaling mounts - 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

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

[Applied][Applied]Scaling mounts

#1 User is offline   Shauren 

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

Posted 30 August 2009 - 05:09 AM

Patch Title: Scaling mounts fix
What bug does this patch fix: Fixes mounts that should scale with riding skill.
Detailed Explanation: Without this player using one of 3 scaling mounts will get mounted on proper model without any speed increase (and no flying if it was supposed to fly)
How to reproduce: Mount on one of these http://www.wowhead.c...ing+skill;ex=on

Index: src/arcemu-world/SpellAuras.cpp
===================================================================
--- src/arcemu-world/SpellAuras.cpp	(revision 2923)
+++ src/arcemu-world/SpellAuras.cpp	(working copy)
@@ -4286,6 +4286,19 @@
 
 void Aura::SpellAuraModIncreaseMountedSpeed(bool apply)
 {
+	if( GetSpellId() == 68768 || GetSpellId() == 68769 && m_target->GetTypeId() == TYPEID_PLAYER )
+	{
+		int32 newspeed = 0;
+		Player *pPlayer = TO_PLAYER(m_target);
+
+		if( pPlayer->_GetSkillLineCurrent(SKILL_RIDING, true) >= 150 )
+			newspeed = 100;
+		else if( pPlayer->_GetSkillLineCurrent(SKILL_RIDING, true) >= 75 )
+			newspeed = 60;
+
+		mod->m_amount = newspeed; // EffectBasePoints + 1 (59+1 and 99+1)
+	}
+
 	if(apply)
 	{
 		SetPositive();
Index: src/scripts/src/SpellHandlers/ItemSpells_1.cpp
===================================================================
--- src/scripts/src/SpellHandlers/ItemSpells_1.cpp	(revision 2923)
+++ src/scripts/src/SpellHandlers/ItemSpells_1.cpp	(working copy)
@@ -508,7 +508,124 @@
 	return true;
 }
 
+bool BigBlizzardBear(uint32 i, Aura * pAura, bool apply)
+{
+	if( pAura->GetTarget()->GetTypeId() != TYPEID_PLAYER )
+		return true;
 
+	if( apply )
+	{
+	uint32 newspell = 0;
+	Player* pPlayer = TO_PLAYER(pAura->GetTarget());
+
+	if( pPlayer->_GetSkillLineCurrent(SKILL_RIDING, true) >= 150 )
+		newspell = 58999;
+	else
+		newspell = 58997;
+
+	SpellEntry *sp = dbcSpell.LookupEntry(newspell);
+	sEventMgr.AddEvent( pAura->GetTarget() ,&Unit::EventCastSpell , pAura->GetTarget() , sp , EVENT_UNK, 1 , 1, EVENT_FLAG_DO_NOT_EXECUTE_IN_WORLD_CONTEXT );
+	}
+
+	return true;
+}
+
+bool WingedSteed(uint32 i, Aura * pAura, bool apply)
+{
+	if( pAura->GetTarget()->GetTypeId() != TYPEID_PLAYER )
+		return true;
+
+	if( apply )
+	{
+	uint32 newspell = 0;
+	Player* pPlayer = TO_PLAYER(pAura->GetTarget());
+
+	if( pPlayer->_GetSkillLineCurrent(SKILL_RIDING, true) == 300 )
+		newspell = 54727;
+	else
+		newspell = 54726;
+
+	SpellEntry *sp = dbcSpell.LookupEntry(newspell);
+	sEventMgr.AddEvent( pAura->GetTarget() ,&Unit::EventCastSpell , pAura->GetTarget() , sp , EVENT_UNK, 1 , 1, EVENT_FLAG_DO_NOT_EXECUTE_IN_WORLD_CONTEXT );
+	}
+
+	return true;
+}
+
+bool HeadlessHorsemanMount(uint32 i, Aura * pAura, bool apply)
+{
+	if( pAura->GetTarget()->GetTypeId() != TYPEID_PLAYER )
+		return true;
+
+	if( apply )
+	{
+	uint32 newspell = 0;
+	Player* pPlayer = TO_PLAYER(pAura->GetTarget());
+	AreaTable *pArea = dbcArea.LookupEntry(pPlayer->GetAreaID());
+
+	if(pPlayer->_GetSkillLineCurrent(SKILL_RIDING, true) >= 225 && ((pArea->AreaFlags & 1024 && pPlayer->GetMapId() != 571) || (pArea->AreaFlags & 1024 && pPlayer->GetMapId() == 571 && pPlayer->HasSpellwithNameHash(SPELL_HASH_COLD_WEATHER_FLYING))))
+	{
+		if( pPlayer->_GetSkillLineCurrent(SKILL_RIDING, true) == 300 )
+			newspell = 48023;
+		else
+			newspell = 51617;
+	}
+	else if( pPlayer->_GetSkillLineCurrent(SKILL_RIDING, true) >= 150 )
+		newspell = 48024;			
+	else
+		newspell = 51621;
+
+	SpellEntry *sp = dbcSpell.LookupEntry(newspell);
+	sEventMgr.AddEvent( pAura->GetTarget() ,&Unit::EventCastSpell , pAura->GetTarget() , sp , EVENT_UNK, 1 , 1, EVENT_FLAG_DO_NOT_EXECUTE_IN_WORLD_CONTEXT );
+	}
+
+	return true;
+}
+
+bool MagicBroomMount(uint32 i, Aura * pAura, bool apply)
+{
+	if( pAura->GetTarget()->GetTypeId() != TYPEID_PLAYER )
+		return true;
+
+	if( apply )
+	{
+	uint32 newspell = 0;
+	Player* pPlayer = TO_PLAYER(pAura->GetTarget());
+	AreaTable *pArea = dbcArea.LookupEntry(pPlayer->GetAreaID());
+
+	if(pPlayer->_GetSkillLineCurrent(SKILL_RIDING, true) >= 225 && ((pArea->AreaFlags & 1024 && pPlayer->GetMapId() != 571) || (pArea->AreaFlags & 1024 && pPlayer->GetMapId() == 571 && pPlayer->HasSpellwithNameHash(SPELL_HASH_COLD_WEATHER_FLYING))))
+	{
+		if( pPlayer->_GetSkillLineCurrent(SKILL_RIDING, true) == 300 )
+			newspell = 42668;
+		else
+			newspell = 42667;
+	}
+	else if( pPlayer->_GetSkillLineCurrent(SKILL_RIDING, true) >= 150 )
+		newspell = 42683;			
+	else
+		newspell = 42680;
+
+	SpellEntry *sp = dbcSpell.LookupEntry(newspell);
+	sEventMgr.AddEvent( pAura->GetTarget() ,&Unit::EventCastSpell , pAura->GetTarget() , sp , EVENT_UNK, 1 , 1, EVENT_FLAG_DO_NOT_EXECUTE_IN_WORLD_CONTEXT );
+	}
+
+	return true;
+}
+
+bool MagicRoosterMount(uint32 i, Aura * pAura, bool apply)
+{
+	if( pAura->GetTarget()->GetTypeId() != TYPEID_PLAYER )
+		return true;
+
+	if( apply )
+	{
+		SpellEntry *sp = dbcSpell.LookupEntry(66122);
+		sEventMgr.AddEvent( pAura->GetTarget() ,&Unit::EventCastSpell , pAura->GetTarget() , sp , EVENT_UNK, 1 , 1, EVENT_FLAG_DO_NOT_EXECUTE_IN_WORLD_CONTEXT );
+	}
+
+	return true;
+}
+
 // ADD NEW FUNCTIONS ABOVE THIS LINE
 // *****************************************************************************
 
@@ -542,6 +659,11 @@
 	mgr->register_dummy_aura( 46354, &OrbOfTheSindorei);        //Orb of the Sin'dorei
 	mgr->register_dummy_spell(17512, &PiccolooftheFlamingFire); //Piccolo of the flaming fire.
 	mgr->register_dummy_spell(18400, &PiccolooftheFlamingFire); //Piccolo of the flaming fire.
+	mgr->register_dummy_aura( 58983, &BigBlizzardBear);			// Big Blizzard Bear mount
+	mgr->register_dummy_aura( 54729, &WingedSteed);				// DK flying mount
+	mgr->register_dummy_aura( 48025, &HeadlessHorsemanMount);	// Headless Horseman Mount
+	mgr->register_dummy_aura( 47977, &MagicBroomMount);			// Magic Broom Mount
+	mgr->register_dummy_aura( 65917, &MagicRoosterMount);		// Magic Rooster Mount
 
 // REGISTER NEW DUMMY SPELLS ABOVE THIS LINE
 // *****************************************************************************


[attachment=1833:scaling_mounts.patch]


EDIT: List of fixed mounts
http://www.wowhead.com/?spell=58983
http://www.wowhead.com/?spell=54729
http://www.wowhead.com/?spell=48025
http://www.wowhead.com/?item=37011
http://www.wowhead.com/?spell=65917
http://www.wowhead.com/?item=49288
http://www.wowhead.com/?item=49289
0

#2 User is offline   Veluu 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 237
  • Joined: 19-November 08

Posted 30 August 2009 - 05:16 AM

ohhh So you Fixed IT! =] I tried the other one and even to fix it and to no avail.
0

#3 User is offline   Hoffa 

  • Sup dawg
  • Group: Retired
  • Posts: 1,159
  • Joined: 11-December 08
  • Gender:Male
  • Location:Sweden
  • Interests:Trolling

Posted 30 August 2009 - 05:17 AM

Nice to see that you placed these in a script rather than in the spellcore, someone should apply this.
Posted ImagePosted Image



This person is known for trolling, flaming and extreme ignorance. Respond to at own risk.
0

#4 User is offline   Veluu 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 237
  • Joined: 19-November 08

Posted 30 August 2009 - 05:41 AM

Don't Bother, I tried it and none work =\ We need someone else to test as well though to rule out that it may just be me
0

#5 User is offline   Shauren 

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

Posted 30 August 2009 - 05:46 AM

ok, updated first post with working patch (tested ingame)
0

#6 User is offline   Terrorblade 

  • ArcEmu Lover
  • Group: Banned
  • Posts: 440
  • Joined: 07-June 08
  • Gender:Male
  • Location:Arcemu

Posted 31 August 2009 - 08:19 AM

hmm does the headless horseman mount check if your not in outland or northrend to mount the flying mount? if your not it should mount you on the ground mount.

View PostHasbro, on 14 June 2009 - 01:07 PM, said:

I'm a flaming homosexual.
Do not advertise here by the way.

Posted Image
Posted Image

#7 User is offline   heavyathan 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 405
  • Joined: 30-July 08

Posted 31 August 2009 - 09:11 AM

I've applied this patch in my server, prevously adapted to rev 2748, and works like charm. But Headless Horseman doesn't fly. Rest is ok.
0

#8 User is offline   Shauren 

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

Posted 31 August 2009 - 10:03 AM

hmm, for me it flies

are you sure you didnt test that in northrend without having cold weather flying?

screenshot
Posted Image
0

#9 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 31 August 2009 - 01:02 PM

here all work fine, ty shauren.
Need Help With Arcemu ? ^^
Posted Image
Concordia res parvae crescunt In varietate concordia
Spoiler

0

#10 User is offline   heavyathan 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 405
  • Joined: 30-July 08

Posted 02 September 2009 - 12:42 AM

Well, for me doesn't work. I unmounted a gripphon just before, in Northend. . But if it works for you, it's my fault. Or maybe something related to my rev (2748).

So, apply to svn, please.
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 02 September 2009 - 01:04 AM

@ heavyathan : Did You clear your cache too ? and dunno but might want to update to a newer rev then xD
Need Help With Arcemu ? ^^
Posted Image
Concordia res parvae crescunt In varietate concordia
Spoiler

0

#12 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 16 September 2009 - 08:15 PM

well somehow it crashes the server @ REV2892
Need Help With Arcemu ? ^^
Posted Image
Concordia res parvae crescunt In varietate concordia
Spoiler

0

#13 User is offline   Shauren 

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

Posted 17 September 2009 - 01:55 AM

Hmm. didnt do that earlier, will check

edit: looked at the crash dump, it seems it crashed because we didnt have any instance id for the event (whatever it means)

crash was in this function EventableObject::event_Relocate()

ps. Updated my patch, its better now but still crashes :)
0

#14 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 17 September 2009 - 06:12 AM

Yep the magic rooster i made also in your previous patch already and same error in Crashdump, is there no other way to get this to work ? like the "TEMP" other mount fixes were made?
Need Help With Arcemu ? ^^
Posted Image
Concordia res parvae crescunt In varietate concordia
Spoiler

0

#15 User is offline   Shauren 

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

Posted 17 September 2009 - 10:07 AM

maybe core has some problems with instances now?

anyway, i think this can be applied as it was working earlier and someone else broke something else (lol)
0

#16 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 17 September 2009 - 08:43 PM

yeah indeed it seems something not ok in the core, love this mounts though, so i learned myself the "to be casted spell"...

But i guess they're working to get the core back to do it right, other things have same issue also DC in the server.

Jackpoz pinned it to be reproducable in standard svn code with orb of the sindorei, and it is giving me a instant dc on use.

eventobjecttable.cpp

CallSTACK
void EventableObject::event_AddEvent(TimedEvent * ptr)
{
    m_lock.Acquire();

    if(!m_holder)
    {
        m_event_Instanceid = event_GetInstanceID();
        m_holder = sEventMgr.GetEventHolder(m_event_Instanceid);
    }


     000000009c4b1800()    
>    ArcEmu-world.exe!EventableObject::event_AddEvent(TimedEvent * ptr=0x00000000242570f0)  Line 64 + 0x16 bytes    C++


Locals:

-        this    0x0000000024f8fa50 {m_event_Instanceid=??? m_lock=??? m_events=??? ...}    EventableObject * const
-        __vfptr    0x00000001409404f7    *
        [0]    0x0000031993052200    *
        [1]    0x000000009c4b1800    *
        m_event_Instanceid    -1    int
-        m_lock    {m_lock=3848 m_recursiveCount=1 }    FastMutex
        m_lock    3848    volatile long
        m_recursiveCount    1    unsigned long
        m_events    [0]()    std::multimap<unsigned int,TimedEvent *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,TimedEvent *> > >
-        m_holder    0x0000000000000000 {mInstanceId=??? m_lock={...} m_events=[...]() ...}    EventableObjectHolder *
        mInstanceId    CXX0030: Error: expression cannot be evaluated    
+        m_lock    {cs={...} }    Mutex
        m_events    [...]()    std::list<TimedEvent *,std::allocator<TimedEvent *> >
+        m_insertPoolLock    {cs={...} }    Mutex
        m_insertPool    [...]()    std::list<TimedEvent *,std::allocator<TimedEvent *> >
-        ptr    0x00000000242570f0 {obj=0x0000000024f8fa50 cb=0x000000001cfcda60 eventType=47 ...}    TimedEvent *
        obj    0x0000000024f8fa50    void *
+        cb    0x000000001cfcda60 {_obj=0x0000000024f8fa50 _func=0x0000000140001cda }    CallbackBase *
        eventType    47    unsigned int
        eventFlag    3    unsigned short
        msTime    300500    __int64
        currTime    300500    __int64
        repeats    1    unsigned short
        deleted    false    bool
        instanceId    0    int
        ref    0    volatile long
-        p    (513531352,0x000000001e9bddc0 {obj=0x00000001409322c8 cb=0x0000000000000000 eventType=19 ...})    std::pair<unsigned int,TimedEvent *>
        first    513531352    unsigned int
-        second    0x000000001e9bddc0 {obj=0x00000001409322c8 cb=0x0000000000000000 eventType=19 ...}    TimedEvent *
        obj    0x00000001409322c8 const ByteBuffer::`vftable'    void *
-        cb    0x0000000000000000    CallbackBase *
        __vfptr    CXX0030: Error: expression cannot be evaluated    
        eventType    19    unsigned int
        eventFlag    0    unsigned short
        msTime    627870976    __int64
        currTime    -2    __int64
        repeats    0    unsigned short
        deleted    false    bool
        instanceId    0    int
        ref    0    volatile long


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

0

#17 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 18 September 2009 - 07:12 AM

talking about the Orb, it cast spellA that adds auraA that casts spellB that adds auraB and removes auraA, so when the call goes back to auraA it's deleted and, as dfighter would say, KABOOM
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#18 User is offline   Shauren 

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

Posted 18 September 2009 - 08:35 AM

edit: nvm
0

#19 User is offline   Shauren 

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

Posted 18 September 2009 - 01:12 PM

sorry for double post

edited my patch to be like orb of sin'dorei in 2906 (should not crash now)

ps. I removed aura target null check because according to http://arcemu.org/fo...showtopic=18264 it cannot be null
0

#20 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 18 September 2009 - 07:19 PM

What's the different between pAura->GetTarget() and target? pPlayer is not even used in the last function, just assigned (didn't you get any warning about it when you built it?).
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

Share this topic:


  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • 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