aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--COPYING1
-rw-r--r--dep/ACE_wrappers/ace/ACE.cpp8
-rw-r--r--dep/ACE_wrappers/ace/ACE.inl1
-rw-r--r--dep/ACE_wrappers/ace/ACE_crc32.cpp1
-rw-r--r--dep/ACE_wrappers/ace/ATM_Acceptor.cpp2
-rw-r--r--dep/ACE_wrappers/ace/ATM_Acceptor.h2
-rw-r--r--dep/ACE_wrappers/ace/ATM_Addr.cpp1
-rw-r--r--dep/ACE_wrappers/ace/ATM_Addr.h1
-rw-r--r--dep/ACE_wrappers/ace/ATM_Params.h1
-rw-r--r--dep/ACE_wrappers/ace/ATM_QoS.h1
-rw-r--r--dep/ACE_wrappers/ace/ATM_Stream.h1
-rw-r--r--dep/ACE_wrappers/ace/Acceptor.h2
-rw-r--r--dep/ACE_wrappers/ace/Active_Map_Manager.h1
-rw-r--r--dep/ACE_wrappers/ace/Active_Map_Manager_T.h1
-rw-r--r--dep/ACE_wrappers/ace/Addr.cpp3
-rw-r--r--dep/ACE_wrappers/ace/Argv_Type_Converter.cpp2
-rw-r--r--dep/ACE_wrappers/ace/Array_Map.h1
-rw-r--r--dep/ACE_wrappers/ace/Asynch_Connector.h2
-rw-r--r--dep/ACE_wrappers/ace/Asynch_IO.cpp5
-rw-r--r--dep/ACE_wrappers/ace/Asynch_IO.h4
-rw-r--r--dep/ACE_wrappers/ace/Asynch_IO_Impl.h3
-rw-r--r--dep/ACE_wrappers/ace/Asynch_IO_Impl.inl1
-rw-r--r--dep/ACE_wrappers/ace/Asynch_Pseudo_Task.cpp2
-rw-r--r--dep/ACE_wrappers/ace/Atomic_Op.inl1
-rw-r--r--dep/ACE_wrappers/ace/Atomic_Op_T.inl1
-rw-r--r--dep/ACE_wrappers/ace/Auto_IncDec_T.h1
-rw-r--r--dep/ACE_wrappers/ace/Auto_Ptr.h2
-rw-r--r--dep/ACE_wrappers/ace/Base_Thread_Adapter.h3
-rw-r--r--dep/ACE_wrappers/ace/Based_Pointer_Repository.h1
-rw-r--r--dep/ACE_wrappers/ace/Basic_Stats.h1
-rw-r--r--dep/ACE_wrappers/ace/Basic_Types.cpp4
-rw-r--r--dep/ACE_wrappers/ace/Basic_Types.h3
-rw-r--r--dep/ACE_wrappers/ace/Basic_Types.inl2
-rw-r--r--dep/ACE_wrappers/ace/Bound_Ptr.inl2
-rw-r--r--dep/ACE_wrappers/ace/CDR_Base.cpp4
-rw-r--r--dep/ACE_wrappers/ace/CDR_Base.h2
-rw-r--r--dep/ACE_wrappers/ace/CDR_Size.cpp1
-rw-r--r--dep/ACE_wrappers/ace/CDR_Size.h5
-rw-r--r--dep/ACE_wrappers/ace/CDR_Size.inl5
-rw-r--r--dep/ACE_wrappers/ace/CDR_Stream.cpp9
-rw-r--r--dep/ACE_wrappers/ace/CDR_Stream.h5
-rw-r--r--dep/ACE_wrappers/ace/CDR_Stream.inl8
-rw-r--r--dep/ACE_wrappers/ace/CORBA_macros.h1
-rw-r--r--dep/ACE_wrappers/ace/Cache_Map_Manager_T.inl1
-rw-r--r--dep/ACE_wrappers/ace/Caching_Strategies_T.h1
-rw-r--r--dep/ACE_wrappers/ace/Capabilities.cpp3
-rw-r--r--dep/ACE_wrappers/ace/Capabilities.h2
-rw-r--r--dep/ACE_wrappers/ace/Cleanup.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Cleanup_Strategies_T.h1
-rw-r--r--dep/ACE_wrappers/ace/Codecs.h1
-rw-r--r--dep/ACE_wrappers/ace/Codeset_IBM1047.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Codeset_IBM1047.h1
-rw-r--r--dep/ACE_wrappers/ace/Configuration.cpp5
-rw-r--r--dep/ACE_wrappers/ace/Configuration.h2
-rw-r--r--dep/ACE_wrappers/ace/Configuration_Import_Export.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Connection_Recycling_Strategy.cpp2
-rw-r--r--dep/ACE_wrappers/ace/Containers_T.h9
-rw-r--r--dep/ACE_wrappers/ace/Containers_T.inl6
-rw-r--r--dep/ACE_wrappers/ace/Copy_Disabled.cpp2
-rw-r--r--dep/ACE_wrappers/ace/DEV.h1
-rw-r--r--dep/ACE_wrappers/ace/DEV_Connector.cpp2
-rw-r--r--dep/ACE_wrappers/ace/DEV_Connector.h1
-rw-r--r--dep/ACE_wrappers/ace/DEV_IO.cpp1
-rw-r--r--dep/ACE_wrappers/ace/DLL.cpp1
-rw-r--r--dep/ACE_wrappers/ace/DLL.h2
-rw-r--r--dep/ACE_wrappers/ace/DLL_Manager.cpp2
-rw-r--r--dep/ACE_wrappers/ace/DLL_Manager.h1
-rw-r--r--dep/ACE_wrappers/ace/Dev_Poll_Reactor.cpp4
-rw-r--r--dep/ACE_wrappers/ace/Dev_Poll_Reactor.h3
-rw-r--r--dep/ACE_wrappers/ace/Dev_Poll_Reactor.inl1
-rw-r--r--dep/ACE_wrappers/ace/Dump.h1
-rw-r--r--dep/ACE_wrappers/ace/Dump_T.h1
-rw-r--r--dep/ACE_wrappers/ace/Dynamic_Message_Strategy.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Dynamic_Service_Base.cpp5
-rw-r--r--dep/ACE_wrappers/ace/Dynamic_Service_Dependency.cpp4
-rw-r--r--dep/ACE_wrappers/ace/Dynamic_Service_Dependency.h2
-rw-r--r--dep/ACE_wrappers/ace/Event_Handler.cpp1
-rw-r--r--dep/ACE_wrappers/ace/FIFO.h1
-rw-r--r--dep/ACE_wrappers/ace/FIFO_Recv.h1
-rw-r--r--dep/ACE_wrappers/ace/FIFO_Recv_Msg.h1
-rw-r--r--dep/ACE_wrappers/ace/FIFO_Recv_Msg.inl14
-rw-r--r--dep/ACE_wrappers/ace/FIFO_Send.h1
-rw-r--r--dep/ACE_wrappers/ace/FIFO_Send_Msg.h1
-rw-r--r--dep/ACE_wrappers/ace/FILE_Addr.inl1
-rw-r--r--dep/ACE_wrappers/ace/Filecache.cpp3
-rw-r--r--dep/ACE_wrappers/ace/Filecache.h1
-rw-r--r--dep/ACE_wrappers/ace/Functor.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Functor.h1
-rw-r--r--dep/ACE_wrappers/ace/Functor.inl2
-rw-r--r--dep/ACE_wrappers/ace/Functor_String.h4
-rw-r--r--dep/ACE_wrappers/ace/Functor_String.inl3
-rw-r--r--dep/ACE_wrappers/ace/Functor_T.h2
-rw-r--r--dep/ACE_wrappers/ace/Global_Macros.h3
-rw-r--r--dep/ACE_wrappers/ace/Handle_Gobbler.h1
-rw-r--r--dep/ACE_wrappers/ace/Handle_Ops.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Handle_Set.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Hash_Cache_Map_Manager_T.h2
-rw-r--r--dep/ACE_wrappers/ace/Hash_Map_With_Allocator_T.h1
-rw-r--r--dep/ACE_wrappers/ace/Hashable.cpp2
-rw-r--r--dep/ACE_wrappers/ace/Hashable.inl1
-rw-r--r--dep/ACE_wrappers/ace/High_Res_Timer.cpp1
-rw-r--r--dep/ACE_wrappers/ace/High_Res_Timer.inl3
-rw-r--r--dep/ACE_wrappers/ace/ICMP_Socket.cpp3
-rw-r--r--dep/ACE_wrappers/ace/INET_Addr.cpp3
-rw-r--r--dep/ACE_wrappers/ace/INET_Addr.inl1
-rw-r--r--dep/ACE_wrappers/ace/IOStream.cpp2
-rw-r--r--dep/ACE_wrappers/ace/IOStream.h1
-rw-r--r--dep/ACE_wrappers/ace/IO_Cntl_Msg.h1
-rw-r--r--dep/ACE_wrappers/ace/IO_SAP.h2
-rw-r--r--dep/ACE_wrappers/ace/Init_ACE.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Init_ACE.h1
-rw-r--r--dep/ACE_wrappers/ace/Intrusive_Auto_Ptr.h1
-rw-r--r--dep/ACE_wrappers/ace/Intrusive_Auto_Ptr.inl1
-rw-r--r--dep/ACE_wrappers/ace/LOCK_SOCK_Acceptor.h1
-rw-r--r--dep/ACE_wrappers/ace/LSOCK.h1
-rw-r--r--dep/ACE_wrappers/ace/LSOCK_Acceptor.h1
-rw-r--r--dep/ACE_wrappers/ace/LSOCK_CODgram.h1
-rw-r--r--dep/ACE_wrappers/ace/LSOCK_Dgram.h1
-rw-r--r--dep/ACE_wrappers/ace/LSOCK_Stream.h1
-rw-r--r--dep/ACE_wrappers/ace/Lib_Find.cpp4
-rw-r--r--dep/ACE_wrappers/ace/Lib_Find.h1
-rw-r--r--dep/ACE_wrappers/ace/Local_Name_Space_T.h1
-rw-r--r--dep/ACE_wrappers/ace/Local_Tokens.cpp3
-rw-r--r--dep/ACE_wrappers/ace/Local_Tokens.inl1
-rw-r--r--dep/ACE_wrappers/ace/Log_Msg.cpp3
-rw-r--r--dep/ACE_wrappers/ace/Log_Msg.h1
-rw-r--r--dep/ACE_wrappers/ace/Log_Msg.inl2
-rw-r--r--dep/ACE_wrappers/ace/Log_Msg_Backend.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Log_Msg_Backend.h1
-rw-r--r--dep/ACE_wrappers/ace/Log_Msg_Callback.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Log_Record.h1
-rw-r--r--dep/ACE_wrappers/ace/Logging_Strategy.cpp2
-rw-r--r--dep/ACE_wrappers/ace/MEM_Addr.h1
-rw-r--r--dep/ACE_wrappers/ace/MEM_Addr.inl1
-rw-r--r--dep/ACE_wrappers/ace/MEM_Connector.cpp2
-rw-r--r--dep/ACE_wrappers/ace/MEM_IO.cpp1
-rw-r--r--dep/ACE_wrappers/ace/MEM_IO.h3
-rw-r--r--dep/ACE_wrappers/ace/MEM_IO.inl12
-rw-r--r--dep/ACE_wrappers/ace/MEM_SAP.inl1
-rw-r--r--dep/ACE_wrappers/ace/MEM_Stream.h1
-rw-r--r--dep/ACE_wrappers/ace/MEM_Stream.inl1
-rw-r--r--dep/ACE_wrappers/ace/MMAP_Memory_Pool.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Malloc.cpp3
-rw-r--r--dep/ACE_wrappers/ace/Malloc.h3
-rw-r--r--dep/ACE_wrappers/ace/Malloc_Base.h1
-rw-r--r--dep/ACE_wrappers/ace/Malloc_T.inl1
-rw-r--r--dep/ACE_wrappers/ace/Manual_Event.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Manual_Event.h1
-rw-r--r--dep/ACE_wrappers/ace/Map.h1
-rw-r--r--dep/ACE_wrappers/ace/Mem_Map.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Mem_Map.inl1
-rw-r--r--dep/ACE_wrappers/ace/Message_Block.cpp2
-rw-r--r--dep/ACE_wrappers/ace/Message_Block.h1
-rw-r--r--dep/ACE_wrappers/ace/Message_Block.inl1
-rw-r--r--dep/ACE_wrappers/ace/Message_Queue_NT.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Message_Queue_T.h4
-rw-r--r--dep/ACE_wrappers/ace/Message_Queue_Vx.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Method_Object.h1
-rw-r--r--dep/ACE_wrappers/ace/Method_Request.h2
-rw-r--r--dep/ACE_wrappers/ace/Metrics_Cache.h2
-rw-r--r--dep/ACE_wrappers/ace/Metrics_Cache_T.h1
-rw-r--r--dep/ACE_wrappers/ace/Metrics_Cache_T.inl10
-rw-r--r--dep/ACE_wrappers/ace/Monitor_Control_Action.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Monitor_Control_Types.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Msg_WFMO_Reactor.h1
-rw-r--r--dep/ACE_wrappers/ace/Multihomed_INET_Addr.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Mutex.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Mutex.inl1
-rw-r--r--dep/ACE_wrappers/ace/NT_Service.cpp5
-rw-r--r--dep/ACE_wrappers/ace/NT_Service.h1
-rw-r--r--dep/ACE_wrappers/ace/NT_Service.inl3
-rw-r--r--dep/ACE_wrappers/ace/Name_Proxy.h1
-rw-r--r--dep/ACE_wrappers/ace/Name_Request_Reply.h1
-rw-r--r--dep/ACE_wrappers/ace/Name_Space.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Name_Space.h1
-rw-r--r--dep/ACE_wrappers/ace/Netlink_Addr.h2
-rw-r--r--dep/ACE_wrappers/ace/Netlink_Addr.inl1
-rw-r--r--dep/ACE_wrappers/ace/Node.h1
-rw-r--r--dep/ACE_wrappers/ace/Null_Mutex.h1
-rw-r--r--dep/ACE_wrappers/ace/Numeric_Limits.h1
-rw-r--r--dep/ACE_wrappers/ace/OS.h2
-rw-r--r--dep/ACE_wrappers/ace/OS.inl1
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_Thread.cpp8
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_Thread.h4
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_Thread.inl6
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_macros.h2
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_math.h3
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_netdb.cpp2
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_netdb.h1
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_pwd.h1
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_stdio.cpp1
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_stdio.h1
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_stdlib.cpp6
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_stdlib.h1
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_stropts.cpp2
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_sys_resource.h1
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_sys_sendfile.h1
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_sys_socket.h1
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_time.h2
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_time.inl2
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_unistd.h1
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_unistd.inl1
-rw-r--r--dep/ACE_wrappers/ace/OS_NS_wchar.cpp6
-rw-r--r--dep/ACE_wrappers/ace/OS_QoS.h1
-rw-r--r--dep/ACE_wrappers/ace/OS_TLI.h1
-rw-r--r--dep/ACE_wrappers/ace/Obchunk.h1
-rw-r--r--dep/ACE_wrappers/ace/Object_Manager.cpp3
-rw-r--r--dep/ACE_wrappers/ace/Object_Manager.h1
-rw-r--r--dep/ACE_wrappers/ace/Object_Manager_Base.h1
-rw-r--r--dep/ACE_wrappers/ace/POSIX_Asynch_IO.cpp14
-rw-r--r--dep/ACE_wrappers/ace/POSIX_Asynch_IO.h7
-rw-r--r--dep/ACE_wrappers/ace/POSIX_CB_Proactor.cpp3
-rw-r--r--dep/ACE_wrappers/ace/POSIX_CB_Proactor.h1
-rw-r--r--dep/ACE_wrappers/ace/POSIX_Proactor.cpp26
-rw-r--r--dep/ACE_wrappers/ace/POSIX_Proactor.h4
-rw-r--r--dep/ACE_wrappers/ace/Pair.h1
-rw-r--r--dep/ACE_wrappers/ace/Pair_T.h1
-rw-r--r--dep/ACE_wrappers/ace/Parse_Node.cpp9
-rw-r--r--dep/ACE_wrappers/ace/Parse_Node.h2
-rw-r--r--dep/ACE_wrappers/ace/Ping_Socket.cpp3
-rw-r--r--dep/ACE_wrappers/ace/Proactor.cpp8
-rw-r--r--dep/ACE_wrappers/ace/Proactor.h2
-rw-r--r--dep/ACE_wrappers/ace/Proactor_Impl.h1
-rw-r--r--dep/ACE_wrappers/ace/Process.cpp3
-rw-r--r--dep/ACE_wrappers/ace/Process.h1
-rw-r--r--dep/ACE_wrappers/ace/Process_Manager.cpp2
-rw-r--r--dep/ACE_wrappers/ace/Process_Semaphore.h1
-rw-r--r--dep/ACE_wrappers/ace/Profile_Timer.cpp2
-rw-r--r--dep/ACE_wrappers/ace/Profile_Timer.h1
-rw-r--r--dep/ACE_wrappers/ace/RB_Tree.h3
-rw-r--r--dep/ACE_wrappers/ace/RB_Tree.inl66
-rw-r--r--dep/ACE_wrappers/ace/Reactor.cpp2
-rw-r--r--dep/ACE_wrappers/ace/Reactor.h1
-rw-r--r--dep/ACE_wrappers/ace/Reactor_Impl.h1
-rw-r--r--dep/ACE_wrappers/ace/Reactor_Timer_Interface.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Reactor_Token_T.h1
-rw-r--r--dep/ACE_wrappers/ace/Read_Buffer.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Recyclable.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Registry.cpp70
-rw-r--r--dep/ACE_wrappers/ace/Registry.h2
-rw-r--r--dep/ACE_wrappers/ace/Registry_Name_Space.cpp13
-rw-r--r--dep/ACE_wrappers/ace/Registry_Name_Space.h1
-rw-r--r--dep/ACE_wrappers/ace/Remote_Name_Space.h1
-rw-r--r--dep/ACE_wrappers/ace/Remote_Tokens.cpp3
-rw-r--r--dep/ACE_wrappers/ace/Remote_Tokens.h1
-rw-r--r--dep/ACE_wrappers/ace/SOCK_CODgram.h1
-rw-r--r--dep/ACE_wrappers/ace/SOCK_Dgram_Bcast.cpp1
-rw-r--r--dep/ACE_wrappers/ace/SOCK_Dgram_Bcast.h1
-rw-r--r--dep/ACE_wrappers/ace/SOCK_Dgram_Mcast.cpp5
-rw-r--r--dep/ACE_wrappers/ace/SOCK_Dgram_Mcast.h1
-rw-r--r--dep/ACE_wrappers/ace/SOCK_Netlink.cpp1
-rw-r--r--dep/ACE_wrappers/ace/SOCK_SEQPACK_Acceptor.h2
-rw-r--r--dep/ACE_wrappers/ace/SOCK_SEQPACK_Association.cpp1
-rw-r--r--dep/ACE_wrappers/ace/SOCK_SEQPACK_Connector.cpp3
-rw-r--r--dep/ACE_wrappers/ace/SPIPE.h1
-rw-r--r--dep/ACE_wrappers/ace/SPIPE_Acceptor.h1
-rw-r--r--dep/ACE_wrappers/ace/SPIPE_Addr.cpp1
-rw-r--r--dep/ACE_wrappers/ace/SPIPE_Addr.inl1
-rw-r--r--dep/ACE_wrappers/ace/SPIPE_Connector.cpp2
-rw-r--r--dep/ACE_wrappers/ace/SString.cpp6
-rw-r--r--dep/ACE_wrappers/ace/SString.h1
-rw-r--r--dep/ACE_wrappers/ace/SUN_Proactor.cpp2
-rw-r--r--dep/ACE_wrappers/ace/SV_Message.h2
-rw-r--r--dep/ACE_wrappers/ace/Sample_History.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Sample_History.h1
-rw-r--r--dep/ACE_wrappers/ace/Sbrk_Memory_Pool.h1
-rw-r--r--dep/ACE_wrappers/ace/Sched_Params.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Sched_Params.inl1
-rw-r--r--dep/ACE_wrappers/ace/Select_Reactor_Base.cpp7
-rw-r--r--dep/ACE_wrappers/ace/Service_Config.cpp9
-rw-r--r--dep/ACE_wrappers/ace/Service_Config.h4
-rw-r--r--dep/ACE_wrappers/ace/Service_Config.inl2
-rw-r--r--dep/ACE_wrappers/ace/Service_Gestalt.cpp26
-rw-r--r--dep/ACE_wrappers/ace/Service_Gestalt.h5
-rw-r--r--dep/ACE_wrappers/ace/Service_Gestalt.inl2
-rw-r--r--dep/ACE_wrappers/ace/Service_Object.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Service_Repository.cpp4
-rw-r--r--dep/ACE_wrappers/ace/Service_Repository.h1
-rw-r--r--dep/ACE_wrappers/ace/Service_Templates.h1
-rw-r--r--dep/ACE_wrappers/ace/Service_Types.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Shared_Memory.h1
-rw-r--r--dep/ACE_wrappers/ace/Shared_Memory_MM.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Shared_Memory_MM.h1
-rw-r--r--dep/ACE_wrappers/ace/Shared_Memory_SV.cpp2
-rw-r--r--dep/ACE_wrappers/ace/Shared_Memory_SV.h1
-rw-r--r--dep/ACE_wrappers/ace/Sig_Adapter.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Sig_Handler.cpp2
-rw-r--r--dep/ACE_wrappers/ace/Signal.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Signal.h1
-rw-r--r--dep/ACE_wrappers/ace/Sock_Connect.cpp7
-rw-r--r--dep/ACE_wrappers/ace/Stack_Trace.cpp3
-rw-r--r--dep/ACE_wrappers/ace/Stats.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Stats.h1
-rw-r--r--dep/ACE_wrappers/ace/Strategies.h1
-rw-r--r--dep/ACE_wrappers/ace/Strategies_T.h1
-rw-r--r--dep/ACE_wrappers/ace/String_Base.inl1
-rw-r--r--dep/ACE_wrappers/ace/String_Base_Const.h1
-rw-r--r--dep/ACE_wrappers/ace/Svc_Conf.h3
-rw-r--r--dep/ACE_wrappers/ace/Svc_Conf_Lexer.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Svc_Conf_Param.h2
-rw-r--r--dep/ACE_wrappers/ace/Svc_Conf_Token_Table.h2
-rw-r--r--dep/ACE_wrappers/ace/Svc_Conf_Tokens.h1
-rw-r--r--dep/ACE_wrappers/ace/Svc_Conf_y.cpp53
-rw-r--r--dep/ACE_wrappers/ace/TLI.h1
-rw-r--r--dep/ACE_wrappers/ace/TLI.inl1
-rw-r--r--dep/ACE_wrappers/ace/TLI_Acceptor.h1
-rw-r--r--dep/ACE_wrappers/ace/TLI_Connector.h1
-rw-r--r--dep/ACE_wrappers/ace/TLI_Stream.h1
-rw-r--r--dep/ACE_wrappers/ace/TP_Reactor.cpp4
-rw-r--r--dep/ACE_wrappers/ace/TP_Reactor.h2
-rw-r--r--dep/ACE_wrappers/ace/TP_Reactor.inl1
-rw-r--r--dep/ACE_wrappers/ace/TSS_T.inl2
-rw-r--r--dep/ACE_wrappers/ace/Task.cpp2
-rw-r--r--dep/ACE_wrappers/ace/Test_and_Set.h1
-rw-r--r--dep/ACE_wrappers/ace/Thread_Control.h1
-rw-r--r--dep/ACE_wrappers/ace/Thread_Exit.h1
-rw-r--r--dep/ACE_wrappers/ace/Thread_Hook.h1
-rw-r--r--dep/ACE_wrappers/ace/Thread_Manager.cpp2
-rw-r--r--dep/ACE_wrappers/ace/Thread_Semaphore.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Throughput_Stats.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Throughput_Stats.h1
-rw-r--r--dep/ACE_wrappers/ace/Time_Value.cpp2
-rw-r--r--dep/ACE_wrappers/ace/Timeprobe_T.h2
-rw-r--r--dep/ACE_wrappers/ace/Timer_Hash.h2
-rw-r--r--dep/ACE_wrappers/ace/Timer_List.h1
-rw-r--r--dep/ACE_wrappers/ace/Timer_Wheel.h1
-rw-r--r--dep/ACE_wrappers/ace/Token.h1
-rw-r--r--dep/ACE_wrappers/ace/Token_Collection.cpp3
-rw-r--r--dep/ACE_wrappers/ace/Token_Collection.h2
-rw-r--r--dep/ACE_wrappers/ace/Token_Invariants.cpp2
-rw-r--r--dep/ACE_wrappers/ace/Token_Manager.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Token_Request_Reply.h1
-rw-r--r--dep/ACE_wrappers/ace/Trace.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Truncate.h2
-rw-r--r--dep/ACE_wrappers/ace/Typed_SV_Message.h1
-rw-r--r--dep/ACE_wrappers/ace/UNIX_Addr.h1
-rw-r--r--dep/ACE_wrappers/ace/UNIX_Addr.inl2
-rw-r--r--dep/ACE_wrappers/ace/UPIPE_Acceptor.h1
-rw-r--r--dep/ACE_wrappers/ace/UPIPE_Addr.h1
-rw-r--r--dep/ACE_wrappers/ace/UPIPE_Connector.h1
-rw-r--r--dep/ACE_wrappers/ace/UPIPE_Stream.h1
-rw-r--r--dep/ACE_wrappers/ace/UTF16_Encoding_Converter.cpp1
-rw-r--r--dep/ACE_wrappers/ace/UTF8_Encoding_Converter.cpp2
-rw-r--r--dep/ACE_wrappers/ace/UTF8_Encoding_Converter.h1
-rw-r--r--dep/ACE_wrappers/ace/UUID.cpp1
-rw-r--r--dep/ACE_wrappers/ace/Unbounded_Set.inl3
-rw-r--r--dep/ACE_wrappers/ace/Vector_T.h1
-rw-r--r--dep/ACE_wrappers/ace/Versioned_Namespace.h1
-rw-r--r--dep/ACE_wrappers/ace/WFMO_Reactor.cpp5
-rw-r--r--dep/ACE_wrappers/ace/WFMO_Reactor.h1
-rw-r--r--dep/ACE_wrappers/ace/WIN32_Asynch_IO.cpp15
-rw-r--r--dep/ACE_wrappers/ace/WIN32_Asynch_IO.h2
-rw-r--r--dep/ACE_wrappers/ace/WIN32_Proactor.cpp2
-rw-r--r--dep/ACE_wrappers/ace/WIN32_Proactor.h1
-rw-r--r--dep/ACE_wrappers/ace/XML_Svc_Conf.h1
-rw-r--r--dep/ACE_wrappers/ace/XTI_ATM_Mcast.h1
-rw-r--r--dep/ACE_wrappers/ace/config-WinCE.h4
-rw-r--r--dep/ACE_wrappers/ace/config-freebsd.h1
-rw-r--r--dep/ACE_wrappers/ace/config-hpux-11.00.h1
-rw-r--r--dep/ACE_wrappers/ace/config-integritySCA.h3
-rw-r--r--dep/ACE_wrappers/ace/config-irix6.x-common.h1
-rw-r--r--dep/ACE_wrappers/ace/config-lite.h1
-rw-r--r--dep/ACE_wrappers/ace/config-macosx-leopard.h1
-rw-r--r--dep/ACE_wrappers/ace/config-macosx-tiger.h1
-rw-r--r--dep/ACE_wrappers/ace/config-openbsd.h1
-rw-r--r--dep/ACE_wrappers/ace/config-sunos5.5.h1
-rw-r--r--dep/ACE_wrappers/ace/config-sunos5.6.h1
-rw-r--r--dep/ACE_wrappers/ace/config-tandem-nsk-mips-v2.h6
-rw-r--r--dep/ACE_wrappers/ace/config-tandem-nsk-mips-v3.h9
-rw-r--r--dep/ACE_wrappers/ace/config-tandem.h1
-rw-r--r--dep/ACE_wrappers/ace/config-unixware-7.1.0.h1
-rw-r--r--dep/ACE_wrappers/ace/config-unixware-7.1.0.udk.h5
-rw-r--r--dep/ACE_wrappers/ace/config-win32-common.h4
-rw-r--r--dep/ACE_wrappers/ace/config-win32-interix.h1
-rw-r--r--dep/ACE_wrappers/ace/config-win32.h2
-rw-r--r--dep/ACE_wrappers/ace/iosfwd.h1
-rw-r--r--dep/ACE_wrappers/ace/os_include/os_pthread.h1
-rw-r--r--dep/ACE_wrappers/ace/os_include/os_stdint.h1
-rw-r--r--dep/ACE_wrappers/ace/os_include/sys/os_uio.h1
-rw-r--r--dep/ACE_wrappers/ace/os_include/sys/os_un.h1
-rw-r--r--dep/ACE_wrappers/ace/streams.h2
-rw-r--r--dep/include/g3dlite/G3D/AABox.h2
-rw-r--r--dep/include/g3dlite/G3D/Array.h16
-rw-r--r--dep/include/g3dlite/G3D/Box.h2
-rw-r--r--dep/include/g3dlite/G3D/CollisionDetection.h4
-rw-r--r--dep/include/g3dlite/G3D/Crypto.h1
-rw-r--r--dep/include/g3dlite/G3D/GCamera.h4
-rw-r--r--dep/include/g3dlite/G3D/Line.h1
-rw-r--r--dep/include/g3dlite/G3D/Matrix3.h4
-rw-r--r--dep/include/g3dlite/G3D/Quat.h6
-rw-r--r--dep/include/g3dlite/G3D/Quat.inl10
-rw-r--r--dep/include/g3dlite/G3D/Ray.h5
-rw-r--r--dep/include/g3dlite/G3D/System.h2
-rw-r--r--dep/include/g3dlite/G3D/Table.h11
-rw-r--r--dep/include/g3dlite/G3D/Vector2.h55
-rw-r--r--dep/include/g3dlite/G3D/Vector2.inl8
-rw-r--r--dep/include/g3dlite/G3D/Vector2int16.h1
-rw-r--r--dep/include/g3dlite/G3D/Vector3.h4
-rw-r--r--dep/include/g3dlite/G3D/Vector3.inl3
-rw-r--r--dep/include/g3dlite/G3D/Vector4.inl6
-rw-r--r--dep/include/g3dlite/G3D/format.h1
-rw-r--r--dep/include/g3dlite/G3D/g3dmath.h6
-rw-r--r--dep/include/g3dlite/G3D/g3dmath.inl5
-rw-r--r--dep/include/g3dlite/G3D/platform.h5
-rw-r--r--dep/include/mersennetwister/MersenneTwister.h32
-rw-r--r--dep/include/sockets/Base64.h1
-rw-r--r--dep/include/sockets/Exception.h4
-rw-r--r--dep/include/sockets/File.h3
-rw-r--r--dep/include/sockets/IFile.h1
-rw-r--r--dep/include/sockets/ISocketHandler.h2
-rw-r--r--dep/include/sockets/Ipv4Address.h4
-rw-r--r--dep/include/sockets/Ipv6Address.h3
-rw-r--r--dep/include/sockets/ListenSocket.h3
-rw-r--r--dep/include/sockets/Lock.h2
-rw-r--r--dep/include/sockets/Mutex.h1
-rw-r--r--dep/include/sockets/Parse.h2
-rw-r--r--dep/include/sockets/ResolvServer.h2
-rw-r--r--dep/include/sockets/ResolvSocket.h2
-rw-r--r--dep/include/sockets/SctpSocket.h2
-rw-r--r--dep/include/sockets/Socket.h5
-rw-r--r--dep/include/sockets/SocketAddress.h3
-rw-r--r--dep/include/sockets/SocketHandler.h2
-rw-r--r--dep/include/sockets/StdLog.h2
-rw-r--r--dep/include/sockets/StdoutLog.h3
-rw-r--r--dep/include/sockets/StreamSocket.h4
-rw-r--r--dep/include/sockets/TcpSocket.h3
-rw-r--r--dep/include/sockets/Thread.h1
-rw-r--r--dep/include/sockets/UdpSocket.h1
-rw-r--r--dep/include/sockets/Utility.h1
-rw-r--r--dep/include/sockets/socket_include.h24
-rw-r--r--dep/include/sockets/sockets-config.h12
-rw-r--r--dep/src/g3dlite/AABox.cpp12
-rw-r--r--dep/src/g3dlite/Box.cpp23
-rw-r--r--dep/src/g3dlite/Crypto.cpp3
-rw-r--r--dep/src/g3dlite/Matrix3.cpp7
-rw-r--r--dep/src/g3dlite/Plane.cpp7
-rw-r--r--dep/src/g3dlite/System.cpp22
-rw-r--r--dep/src/g3dlite/Triangle.cpp9
-rw-r--r--dep/src/g3dlite/Vector3.cpp9
-rw-r--r--dep/src/g3dlite/Vector4.cpp4
-rw-r--r--dep/src/sockets/Base64.cpp11
-rw-r--r--dep/src/sockets/Exception.cpp4
-rw-r--r--dep/src/sockets/Ipv4Address.cpp23
-rw-r--r--dep/src/sockets/Ipv6Address.cpp24
-rw-r--r--dep/src/sockets/Lock.cpp4
-rw-r--r--dep/src/sockets/Mutex.cpp5
-rw-r--r--dep/src/sockets/Parse.cpp4
-rw-r--r--dep/src/sockets/ResolvServer.cpp6
-rw-r--r--dep/src/sockets/ResolvSocket.cpp11
-rw-r--r--dep/src/sockets/Socket.cpp173
-rw-r--r--dep/src/sockets/SocketHandler.cpp48
-rw-r--r--dep/src/sockets/StdoutLog.cpp4
-rw-r--r--dep/src/sockets/StreamSocket.cpp25
-rw-r--r--dep/src/sockets/TcpSocket.cpp67
-rw-r--r--dep/src/sockets/Thread.cpp13
-rw-r--r--dep/src/sockets/UdpSocket.cpp43
-rw-r--r--dep/src/sockets/Utility.cpp40
-rw-r--r--dep/src/sockets/socket_include.cpp2
-rw-r--r--dep/src/zlib/deflate.c10
-rw-r--r--dep/src/zlib/deflate.h2
-rw-r--r--dep/src/zlib/example.c6
-rw-r--r--dep/src/zlib/gzio.c10
-rw-r--r--dep/src/zlib/infback.c12
-rw-r--r--dep/src/zlib/inflate.c20
-rw-r--r--dep/src/zlib/inftrees.c2
-rw-r--r--dep/src/zlib/trees.c10
-rw-r--r--dep/src/zlib/zlib.h10
-rw-r--r--dep/src/zlib/zutil.c4
-rw-r--r--dep/src/zlib/zutil.h1
-rw-r--r--src/bindings/scripts/ScriptMgr.cpp4
-rw-r--r--src/bindings/scripts/base/escort_ai.cpp4
-rw-r--r--src/bindings/scripts/base/follower_ai.cpp6
-rw-r--r--src/bindings/scripts/include/sc_creature.cpp21
-rw-r--r--src/bindings/scripts/include/sc_creature.h1
-rw-r--r--src/bindings/scripts/scripts/custom/npc_wyrmresttempel_taxi.cpp4
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp4
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp6
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp2
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/eversong_woods.cpp4
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/hinterlands.cpp6
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp2
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp19
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp14
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp22
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp4
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp6
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/karazhan/def_karazhan.h1
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp2
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/karazhan/karazhan.cpp5
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp6
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp20
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp14
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp2
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp2
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp4
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp2
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp4
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter2.cpp3
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter5.cpp62
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp4
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp3
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp1
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp2
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp5
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp2
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp2
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp1
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp2
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp12
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/stratholme/stratholme.cpp4
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp1
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp2
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp4
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp9
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp33
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp8
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp6
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.cpp1
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp9
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp22
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/undercity.cpp2
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/wetlands.cpp2
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp8
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_hexlord.cpp18
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp16
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp3
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp7
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp4
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/zulaman/zulaman.cpp2
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp2
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp2
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp2
-rw-r--r--src/bindings/scripts/scripts/kalimdor/azuremyst_isle.cpp5
-rw-r--r--src/bindings/scripts/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp4
-rw-r--r--src/bindings/scripts/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp2
-rw-r--r--src/bindings/scripts/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp3
-rw-r--r--src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/boss_anetheron.cpp2
-rw-r--r--src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp2
-rw-r--r--src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/boss_kazrogal.cpp2
-rw-r--r--src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp1
-rw-r--r--src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp44
-rw-r--r--src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjal_trash.cpp25
-rw-r--r--src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjal_trash.h2
-rw-r--r--src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp7
-rw-r--r--src/bindings/scripts/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp4
-rw-r--r--src/bindings/scripts/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp3
-rw-r--r--src/bindings/scripts/scripts/kalimdor/moonglade.cpp2
-rw-r--r--src/bindings/scripts/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp6
-rw-r--r--src/bindings/scripts/scripts/kalimdor/razorfen_kraul/def_razorfen_kraul.h2
-rw-r--r--src/bindings/scripts/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp5
-rw-r--r--src/bindings/scripts/scripts/kalimdor/silithus.cpp4
-rw-r--r--src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp2
-rw-r--r--src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp2
-rw-r--r--src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp1
-rw-r--r--src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp2
-rw-r--r--src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp4
-rw-r--r--src/bindings/scripts/scripts/kalimdor/the_barrens.cpp8
-rw-r--r--src/bindings/scripts/scripts/kalimdor/thousand_needles.cpp6
-rw-r--r--src/bindings/scripts/scripts/kalimdor/ungoro_crater.cpp1
-rw-r--r--src/bindings/scripts/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp4
-rw-r--r--src/bindings/scripts/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_elder_nadox.cpp3
-rw-r--r--src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_herald_volazj.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_prince_taldaram.cpp6
-rw-r--r--src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/instance_ahnkahet.cpp7
-rw-r--r--src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp5
-rw-r--r--src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/instance_azjol_nerub.cpp5
-rw-r--r--src/bindings/scripts/scripts/northrend/draktharon_keep/boss_novos.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/draktharon_keep/instance_drak_tharon_keep.cpp4
-rw-r--r--src/bindings/scripts/scripts/northrend/gundrak/boss_moorabi.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/gundrak/boss_slad_ran.cpp4
-rw-r--r--src/bindings/scripts/scripts/northrend/gundrak/instance_gundrak.cpp4
-rw-r--r--src/bindings/scripts/scripts/northrend/howling_fjord.cpp1
-rw-r--r--src/bindings/scripts/scripts/northrend/naxxramas/boss_four_horsemen.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/naxxramas/boss_gluth.cpp4
-rw-r--r--src/bindings/scripts/scripts/northrend/naxxramas/boss_gothik.cpp10
-rw-r--r--src/bindings/scripts/scripts/northrend/naxxramas/boss_kelthuzad.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/naxxramas/boss_maexxna.cpp4
-rw-r--r--src/bindings/scripts/scripts/northrend/naxxramas/boss_noth.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/naxxramas/boss_patchwerk.cpp4
-rw-r--r--src/bindings/scripts/scripts/northrend/naxxramas/boss_sapphiron.cpp14
-rw-r--r--src/bindings/scripts/scripts/northrend/naxxramas/boss_thaddius.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/naxxramas/instance_naxxramas.cpp8
-rw-r--r--src/bindings/scripts/scripts/northrend/nexus/nexus/boss_anomalus.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/nexus/nexus/boss_keristrasza.cpp6
-rw-r--r--src/bindings/scripts/scripts/northrend/nexus/nexus/boss_magus_telestra.cpp3
-rw-r--r--src/bindings/scripts/scripts/northrend/nexus/nexus/instance_nexus.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/nexus/oculus/boss_varos.cpp1
-rw-r--r--src/bindings/scripts/scripts/northrend/sholazar_basin.cpp3
-rw-r--r--src/bindings/scripts/scripts/northrend/storm_peaks.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp4
-rw-r--r--src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp8
-rw-r--r--src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp4
-rw-r--r--src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_assembly_of_iron.cpp6
-rw-r--r--src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp1
-rw-r--r--src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_ignis.cpp1
-rw-r--r--src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp7
-rw-r--r--src/bindings/scripts/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp6
-rw-r--r--src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp1
-rw-r--r--src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp5
-rw-r--r--src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_dalronn.cpp1
-rw-r--r--src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp9
-rw-r--r--src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_pinnacle.cpp6
-rw-r--r--src/bindings/scripts/scripts/northrend/vault_of_archavon/boss_emalon.cpp4
-rw-r--r--src/bindings/scripts/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp6
-rw-r--r--src/bindings/scripts/scripts/northrend/violet_hold/boss_erekem.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/violet_hold/boss_moragg.cpp1
-rw-r--r--src/bindings/scripts/scripts/northrend/violet_hold/instance_violet_hold.cpp4
-rw-r--r--src/bindings/scripts/scripts/northrend/zuldrak.cpp1
-rw-r--r--src/bindings/scripts/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp1
-rw-r--r--src/bindings/scripts/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp2
-rw-r--r--src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp2
-rw-r--r--src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp2
-rw-r--r--src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp6
-rw-r--r--src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp4
-rw-r--r--src/bindings/scripts/scripts/outland/black_temple/boss_bloodboil.cpp6
-rw-r--r--src/bindings/scripts/scripts/outland/black_temple/boss_illidan.cpp44
-rw-r--r--src/bindings/scripts/scripts/outland/black_temple/boss_mother_shahraz.cpp6
-rw-r--r--src/bindings/scripts/scripts/outland/black_temple/boss_reliquary_of_souls.cpp6
-rw-r--r--src/bindings/scripts/scripts/outland/black_temple/boss_shade_of_akama.cpp16
-rw-r--r--src/bindings/scripts/scripts/outland/black_temple/boss_teron_gorefiend.cpp8
-rw-r--r--src/bindings/scripts/scripts/outland/black_temple/boss_warlord_najentus.cpp2
-rw-r--r--src/bindings/scripts/scripts/outland/black_temple/illidari_council.cpp18
-rw-r--r--src/bindings/scripts/scripts/outland/black_temple/instance_black_temple.cpp6
-rw-r--r--src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp8
-rw-r--r--src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp2
-rw-r--r--src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp10
-rw-r--r--src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp19
-rw-r--r--src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp2
-rw-r--r--src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp4
-rw-r--r--src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp4
-rw-r--r--src/bindings/scripts/scripts/outland/coilfang_resevoir/steam_vault/instance_steam_vault.cpp4
-rw-r--r--src/bindings/scripts/scripts/outland/coilfang_resevoir/underbog/boss_the_black_stalker.cpp2
-rw-r--r--src/bindings/scripts/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp8
-rw-r--r--src/bindings/scripts/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp4
-rw-r--r--src/bindings/scripts/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp10
-rw-r--r--src/bindings/scripts/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp1
-rw-r--r--src/bindings/scripts/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp4
-rw-r--r--src/bindings/scripts/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_vazruden_the_herald.cpp1
-rw-r--r--src/bindings/scripts/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp2
-rw-r--r--src/bindings/scripts/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp12
-rw-r--r--src/bindings/scripts/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp2
-rw-r--r--src/bindings/scripts/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp6
-rw-r--r--src/bindings/scripts/scripts/outland/netherstorm.cpp2
-rw-r--r--src/bindings/scripts/scripts/outland/shadowmoon_valley.cpp7
-rw-r--r--src/bindings/scripts/scripts/outland/shattrath_city.cpp1
-rw-r--r--src/bindings/scripts/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp3
-rw-r--r--src/bindings/scripts/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp2
-rw-r--r--src/bindings/scripts/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp2
-rw-r--r--src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_alar.cpp2
-rw-r--r--src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp2
-rw-r--r--src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp4
-rw-r--r--src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp2
-rw-r--r--src/bindings/scripts/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp4
-rw-r--r--src/bindings/scripts/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp2
-rw-r--r--src/bindings/scripts/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp3
-rw-r--r--src/bindings/scripts/scripts/outland/terokkar_forest.cpp4
-rw-r--r--src/bindings/scripts/scripts/world/boss_emeriss.cpp2
-rw-r--r--src/bindings/scripts/scripts/world/boss_taerar.cpp2
-rw-r--r--src/bindings/scripts/scripts/world/boss_ysondre.cpp2
-rw-r--r--src/bindings/scripts/scripts/world/mob_generic_creature.cpp1
-rw-r--r--src/bindings/scripts/scripts/world/npc_professions.cpp4
-rw-r--r--src/bindings/scripts/scripts/world/npcs_special.cpp8
-rw-r--r--src/framework/Dynamic/ObjectRegistry.h4
-rw-r--r--src/framework/GameSystem/NGrid.h10
-rw-r--r--src/framework/Platform/Define.h1
-rw-r--r--src/framework/Utilities/EventProcessor.cpp2
-rw-r--r--src/framework/Utilities/LinkedList.h2
-rw-r--r--src/game/AchievementMgr.cpp60
-rw-r--r--src/game/AchievementMgr.h2
-rw-r--r--src/game/ArenaTeam.cpp18
-rw-r--r--src/game/AuctionHouseBot.cpp11
-rw-r--r--src/game/AuctionHouseBot.h2
-rw-r--r--src/game/AuctionHouseHandler.cpp1
-rw-r--r--src/game/AuctionHouseMgr.cpp7
-rw-r--r--src/game/Bag.cpp14
-rw-r--r--src/game/BattleGround.cpp54
-rw-r--r--src/game/BattleGround.h2
-rw-r--r--src/game/BattleGroundAB.cpp2
-rw-r--r--src/game/BattleGroundAV.cpp100
-rw-r--r--src/game/BattleGroundAV.h12
-rw-r--r--src/game/BattleGroundBE.cpp8
-rw-r--r--src/game/BattleGroundEY.cpp19
-rw-r--r--src/game/BattleGroundHandler.cpp10
-rw-r--r--src/game/BattleGroundMgr.cpp94
-rw-r--r--src/game/BattleGroundNA.cpp6
-rw-r--r--src/game/BattleGroundRL.cpp7
-rw-r--r--src/game/BattleGroundWS.cpp10
-rw-r--r--src/game/CalendarHandler.cpp4
-rw-r--r--src/game/Cell.h9
-rw-r--r--src/game/CellImpl.h54
-rw-r--r--src/game/Channel.cpp32
-rw-r--r--src/game/ChannelHandler.cpp1
-rw-r--r--src/game/ChannelMgr.cpp2
-rw-r--r--src/game/CharacterHandler.cpp12
-rw-r--r--src/game/Chat.cpp4
-rw-r--r--src/game/Chat.h1
-rw-r--r--src/game/ChatHandler.cpp2
-rw-r--r--src/game/CombatAI.cpp13
-rw-r--r--src/game/ConfusedMovementGenerator.cpp6
-rw-r--r--src/game/Corpse.cpp2
-rw-r--r--src/game/Creature.cpp51
-rw-r--r--src/game/CreatureAI.cpp6
-rw-r--r--src/game/CreatureAI.h2
-rw-r--r--src/game/CreatureAIImpl.h9
-rw-r--r--src/game/CreatureAISelector.cpp6
-rw-r--r--src/game/CreatureEventAIMgr.cpp2
-rw-r--r--src/game/CreatureGroups.cpp10
-rw-r--r--src/game/CreatureGroups.h8
-rw-r--r--src/game/DBCStores.cpp38
-rw-r--r--src/game/DBCStructure.h11
-rw-r--r--src/game/Debugcmds.cpp8
-rw-r--r--src/game/DynamicObject.cpp6
-rw-r--r--src/game/FleeingMovementGenerator.cpp2
-rw-r--r--src/game/GameEventMgr.cpp55
-rw-r--r--src/game/GameObject.cpp12
-rw-r--r--src/game/GameObject.h1
-rw-r--r--src/game/GossipDef.cpp14
-rw-r--r--src/game/GridNotifiers.cpp20
-rw-r--r--src/game/GridNotifiers.h24
-rw-r--r--src/game/GridNotifiersImpl.h69
-rw-r--r--src/game/Group.cpp74
-rw-r--r--src/game/Group.h6
-rw-r--r--src/game/GroupHandler.cpp8
-rw-r--r--src/game/GuardAI.cpp1
-rw-r--r--src/game/Guild.cpp10
-rw-r--r--src/game/Guild.h8
-rw-r--r--src/game/GuildHandler.cpp4
-rw-r--r--src/game/HomeMovementGenerator.h2
-rw-r--r--src/game/IdleMovementGenerator.cpp2
-rw-r--r--src/game/InstanceData.cpp24
-rw-r--r--src/game/InstanceSaveMgr.cpp24
-rw-r--r--src/game/Item.cpp42
-rw-r--r--src/game/ItemEnchantmentMgr.cpp4
-rw-r--r--src/game/ItemHandler.cpp30
-rw-r--r--src/game/LFGHandler.cpp12
-rw-r--r--src/game/Language.h1
-rw-r--r--src/game/Level0.cpp4
-rw-r--r--src/game/Level1.cpp22
-rw-r--r--src/game/Level2.cpp34
-rw-r--r--src/game/Level3.cpp58
-rw-r--r--src/game/LootHandler.cpp3
-rw-r--r--src/game/LootMgr.cpp62
-rw-r--r--src/game/Mail.cpp22
-rw-r--r--src/game/Mail.h6
-rw-r--r--src/game/Map.cpp112
-rw-r--r--src/game/Map.h4
-rw-r--r--src/game/MapManager.cpp34
-rw-r--r--src/game/MiscHandler.cpp14
-rw-r--r--src/game/MotionMaster.cpp6
-rw-r--r--src/game/MotionMaster.h2
-rw-r--r--src/game/MovementHandler.cpp2
-rw-r--r--src/game/NPCHandler.cpp2
-rw-r--r--src/game/Object.cpp28
-rw-r--r--src/game/ObjectAccessor.cpp22
-rw-r--r--src/game/ObjectAccessor.h1
-rw-r--r--src/game/ObjectGridLoader.cpp20
-rw-r--r--src/game/ObjectGridLoader.h12
-rw-r--r--src/game/ObjectMgr.cpp219
-rw-r--r--src/game/ObjectMgr.h17
-rw-r--r--src/game/OutdoorPvP.cpp48
-rw-r--r--src/game/OutdoorPvPEP.cpp21
-rw-r--r--src/game/OutdoorPvPHP.cpp6
-rw-r--r--src/game/OutdoorPvPMgr.cpp17
-rw-r--r--src/game/OutdoorPvPMgr.h2
-rw-r--r--src/game/OutdoorPvPNA.cpp10
-rw-r--r--src/game/OutdoorPvPSI.cpp4
-rw-r--r--src/game/OutdoorPvPTF.cpp6
-rw-r--r--src/game/OutdoorPvPZM.cpp4
-rw-r--r--src/game/Path.h4
-rw-r--r--src/game/Pet.cpp31
-rw-r--r--src/game/PetAI.cpp6
-rw-r--r--src/game/PetHandler.cpp20
-rw-r--r--src/game/PetitionsHandler.cpp10
-rw-r--r--src/game/Player.cpp727
-rw-r--r--src/game/Player.h27
-rw-r--r--src/game/PlayerDump.cpp16
-rw-r--r--src/game/PoolHandler.cpp5
-rw-r--r--src/game/QueryHandler.cpp12
-rw-r--r--src/game/QuestHandler.cpp10
-rw-r--r--src/game/RandomMovementGenerator.cpp2
-rw-r--r--src/game/ReputationMgr.cpp20
-rw-r--r--src/game/SharedDefines.h3
-rw-r--r--src/game/SkillDiscovery.cpp12
-rw-r--r--src/game/SkillHandler.cpp2
-rw-r--r--src/game/SocialMgr.cpp6
-rw-r--r--src/game/Spell.cpp218
-rw-r--r--src/game/Spell.h4
-rw-r--r--src/game/SpellAuras.cpp132
-rw-r--r--src/game/SpellAuras.h4
-rw-r--r--src/game/SpellEffects.cpp100
-rw-r--r--src/game/SpellHandler.cpp16
-rw-r--r--src/game/SpellMgr.cpp135
-rw-r--r--src/game/SpellMgr.h16
-rw-r--r--src/game/StatSystem.cpp28
-rw-r--r--src/game/TaxiHandler.cpp2
-rw-r--r--src/game/ThreatManager.cpp8
-rw-r--r--src/game/TicketHandler.cpp2
-rw-r--r--src/game/Totem.cpp6
-rw-r--r--src/game/TradeHandler.cpp18
-rw-r--r--src/game/Transports.cpp8
-rw-r--r--src/game/Traveller.h1
-rw-r--r--src/game/Unit.cpp455
-rw-r--r--src/game/Unit.h10
-rw-r--r--src/game/UnitAI.cpp10
-rw-r--r--src/game/UpdateData.cpp2
-rw-r--r--src/game/Vehicle.cpp18
-rw-r--r--src/game/WaypointManager.cpp2
-rw-r--r--src/game/WaypointMovementGenerator.cpp6
-rw-r--r--src/game/Wintergrasp.cpp2
-rw-r--r--src/game/Wintergrasp.h1
-rw-r--r--src/game/World.cpp13
-rw-r--r--src/game/World.h6
-rw-r--r--src/game/WorldSession.cpp22
-rw-r--r--src/game/WorldSocket.cpp5
-rw-r--r--src/game/WorldSocketMgr.cpp2
-rw-r--r--src/shared/ByteBuffer.h10
-rw-r--r--src/shared/Common.cpp2
-rw-r--r--src/shared/Common.h1
-rw-r--r--src/shared/Config/Config.cpp2
-rw-r--r--src/shared/Config/dotconfpp/dotconfpp.cpp28
-rw-r--r--src/shared/Config/dotconfpp/dotconfpp.h1
-rw-r--r--src/shared/Config/dotconfpp/mempool.cpp7
-rw-r--r--src/shared/Config/dotconfpp/mempool.h1
-rw-r--r--src/shared/Database/DBCFileLoader.cpp14
-rw-r--r--src/shared/Database/DBCStore.h6
-rw-r--r--src/shared/Database/Database.cpp2
-rw-r--r--src/shared/Database/QueryResult.h2
-rw-r--r--src/shared/Database/SQLStorage.cpp4
-rw-r--r--src/shared/Database/SQLStorage.h1
-rw-r--r--src/shared/Database/SQLStorageImpl.h4
-rw-r--r--src/shared/Database/SqlDelayThread.h1
-rw-r--r--src/shared/Database/SqlOperations.cpp4
-rw-r--r--src/shared/Log.cpp4
-rw-r--r--src/shared/Log.h2
-rw-r--r--src/shared/ProgressBar.cpp6
-rw-r--r--src/shared/SystemConfig.h1
-rw-r--r--src/shared/Threading.cpp2
-rw-r--r--src/shared/Util.cpp10
-rw-r--r--src/shared/Util.h12
-rw-r--r--src/shared/WheatyExceptionReport.cpp1
-rw-r--r--src/shared/vmap/AABSPTree.h33
-rw-r--r--src/shared/vmap/BaseModel.cpp2
-rw-r--r--src/shared/vmap/DebugCmdLogger.cpp2
-rw-r--r--src/shared/vmap/ModelContainer.cpp6
-rw-r--r--src/shared/vmap/SubModel.cpp2
-rw-r--r--src/shared/vmap/TileAssembler.cpp21
-rw-r--r--src/shared/vmap/VMapFactory.cpp2
-rw-r--r--src/shared/vmap/VMapManager.cpp6
-rw-r--r--src/tools/genrevision/genrevision.cpp7
-rw-r--r--src/trinitycore/CliRunnable.cpp6
-rw-r--r--src/trinitycore/Main.cpp1
-rw-r--r--src/trinitycore/Master.cpp2
-rw-r--r--src/trinitycore/RASocket.cpp2
862 files changed, 2736 insertions, 4797 deletions
diff --git a/COPYING b/COPYING
index bee9f8d231f..cdfdede6e8c 100644
--- a/COPYING
+++ b/COPYING
@@ -307,7 +307,6 @@ the "copyright" line and a pointer to where the full notice is found.
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
diff --git a/dep/ACE_wrappers/ace/ACE.cpp b/dep/ACE_wrappers/ace/ACE.cpp
index 7ccf15ed341..8897a5c0ea1 100644
--- a/dep/ACE_wrappers/ace/ACE.cpp
+++ b/dep/ACE_wrappers/ace/ACE.cpp
@@ -37,12 +37,10 @@ extern "C" int maxFiles;
# include "ace/OS_NS_poll.h"
#endif /* ACE_HAS_POLL && ACE_HAS_LIMITED_SELECT */
-
ACE_RCSID (ace,
ACE,
"$Id: ACE.cpp 82581 2008-08-11 08:58:24Z johnnyw $")
-
// Open versioned namespace, if enabled by the user.
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -62,7 +60,6 @@ namespace ACE
char debug_;
}
-
int
ACE::out_of_handles (int error)
{
@@ -2306,7 +2303,6 @@ ACE::restore_non_blocking_mode (ACE_HANDLE handle,
}
}
-
// Format buffer into printable format. This is useful for debugging.
// Portions taken from mdump by J.P. Knight (J.P.Knight@lut.ac.uk)
// Modifications by Todd Montgomery.
@@ -2704,7 +2700,7 @@ ACE::handle_timed_accept (ACE_HANDLE listener,
// We need a loop here if <restart> is enabled.
- for (;;)
+ for (; ; )
{
#if defined (ACE_HAS_POLL) && defined (ACE_HAS_LIMITED_SELECT)
@@ -2974,7 +2970,6 @@ ACE::gcd (u_long x, u_long y)
return x;
}
-
// Calculates the minimum enclosing frame size for the given values.
u_long
ACE::minimum_frame_size (u_long period1, u_long period2)
@@ -3018,7 +3013,6 @@ ACE::minimum_frame_size (u_long period1, u_long period2)
}
}
-
u_long
ACE::is_prime (const u_long n,
const u_long min_factor,
diff --git a/dep/ACE_wrappers/ace/ACE.inl b/dep/ACE_wrappers/ace/ACE.inl
index f800ac80a32..8e92cb2bc39 100644
--- a/dep/ACE_wrappers/ace/ACE.inl
+++ b/dep/ACE_wrappers/ace/ACE.inl
@@ -10,7 +10,6 @@
// Open versioned namespace, if enabled by the user.
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-
// Wrappers for methods that have been moved to ACE_OS.
ACE_INLINE ssize_t
diff --git a/dep/ACE_wrappers/ace/ACE_crc32.cpp b/dep/ACE_wrappers/ace/ACE_crc32.cpp
index e29a6426187..40608e8f7bc 100644
--- a/dep/ACE_wrappers/ace/ACE_crc32.cpp
+++ b/dep/ACE_wrappers/ace/ACE_crc32.cpp
@@ -6,7 +6,6 @@ ACE_RCSID (ace,
ACE_crc32,
"$Id: ACE_crc32.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
namespace
{
/*****************************************************************/
diff --git a/dep/ACE_wrappers/ace/ATM_Acceptor.cpp b/dep/ACE_wrappers/ace/ATM_Acceptor.cpp
index 0a58b7f3b1f..af2e0e1f695 100644
--- a/dep/ACE_wrappers/ace/ATM_Acceptor.cpp
+++ b/dep/ACE_wrappers/ace/ATM_Acceptor.cpp
@@ -14,7 +14,6 @@ ACE_RCSID(ace, ATM_Acceptor, "$Id: ATM_Acceptor.cpp 80826 2008-03-04 14:51:23Z w
#include "ace/ATM_Acceptor.inl"
#endif /* __ACE_INLINE__ */
-
// Open versioned namespace, if enabled by the user.
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -305,6 +304,5 @@ ACE_ATM_Acceptor::accept (ACE_ATM_Stream &new_sap,
// Close versioned namespace, if enabled by the user.
ACE_END_VERSIONED_NAMESPACE_DECL
-
#endif /* ACE_HAS_ATM */
diff --git a/dep/ACE_wrappers/ace/ATM_Acceptor.h b/dep/ACE_wrappers/ace/ATM_Acceptor.h
index 900cec098c5..762a8c2122c 100644
--- a/dep/ACE_wrappers/ace/ATM_Acceptor.h
+++ b/dep/ACE_wrappers/ace/ATM_Acceptor.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_ATM_ACCEPTOR_H
#define ACE_ATM_ACCEPTOR_H
#include /**/ "ace/pre.h"
@@ -113,7 +112,6 @@ private:
// Close versioned namespace, if enabled by the user.
ACE_END_VERSIONED_NAMESPACE_DECL
-
#if defined (__ACE_INLINE__)
#include "ace/ATM_Acceptor.inl"
#endif /* __ACE_INLINE__ */
diff --git a/dep/ACE_wrappers/ace/ATM_Addr.cpp b/dep/ACE_wrappers/ace/ATM_Addr.cpp
index 8b4781c5e80..033816743ea 100644
--- a/dep/ACE_wrappers/ace/ATM_Addr.cpp
+++ b/dep/ACE_wrappers/ace/ATM_Addr.cpp
@@ -100,7 +100,6 @@ ACE_ATM_Addr::ACE_ATM_Addr (const ATM_Addr *sap,
this->set (sap, selector);
}
-
ACE_ATM_Addr::ACE_ATM_Addr (const ACE_TCHAR sap[],
u_char selector)
#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
diff --git a/dep/ACE_wrappers/ace/ATM_Addr.h b/dep/ACE_wrappers/ace/ATM_Addr.h
index c111aa44843..3c586f10a11 100644
--- a/dep/ACE_wrappers/ace/ATM_Addr.h
+++ b/dep/ACE_wrappers/ace/ATM_Addr.h
@@ -187,7 +187,6 @@ private:
// Close versioned namespace, if enabled by the user.
ACE_END_VERSIONED_NAMESPACE_DECL
-
#if defined (__ACE_INLINE__)
#include "ace/ATM_Addr.inl"
#endif /* __ACE_INLINE__ */
diff --git a/dep/ACE_wrappers/ace/ATM_Params.h b/dep/ACE_wrappers/ace/ATM_Params.h
index a244644915d..c460afbd3c2 100644
--- a/dep/ACE_wrappers/ace/ATM_Params.h
+++ b/dep/ACE_wrappers/ace/ATM_Params.h
@@ -10,7 +10,6 @@
*/
//==========================================================================
-
#ifndef ACE_ATM_PARAMS_H
#define ACE_ATM_PARAMS_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/ATM_QoS.h b/dep/ACE_wrappers/ace/ATM_QoS.h
index 3e839fb50d1..927005aa68d 100644
--- a/dep/ACE_wrappers/ace/ATM_QoS.h
+++ b/dep/ACE_wrappers/ace/ATM_QoS.h
@@ -10,7 +10,6 @@
*/
//==========================================================================
-
#ifndef ACE_ATM_QoS_H
#define ACE_ATM_QoS_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/ATM_Stream.h b/dep/ACE_wrappers/ace/ATM_Stream.h
index e880f7197d4..2d31c7654d1 100644
--- a/dep/ACE_wrappers/ace/ATM_Stream.h
+++ b/dep/ACE_wrappers/ace/ATM_Stream.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_ATM_STREAM_H
#define ACE_ATM_STREAM_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Acceptor.h b/dep/ACE_wrappers/ace/Acceptor.h
index 855b2f877a3..8f0f16935fb 100644
--- a/dep/ACE_wrappers/ace/Acceptor.h
+++ b/dep/ACE_wrappers/ace/Acceptor.h
@@ -293,8 +293,6 @@ public:
typedef ACE_Concurrency_Strategy<SVC_HANDLER> CONCURRENCY_STRATEGY;
typedef ACE_Scheduling_Strategy<SVC_HANDLER> SCHEDULING_STRATEGY;
-
-
/// Default constructor.
ACE_Strategy_Acceptor (const ACE_TCHAR service_name[] = 0,
const ACE_TCHAR service_description[] = 0,
diff --git a/dep/ACE_wrappers/ace/Active_Map_Manager.h b/dep/ACE_wrappers/ace/Active_Map_Manager.h
index 174009910a6..c72d6dbba4c 100644
--- a/dep/ACE_wrappers/ace/Active_Map_Manager.h
+++ b/dep/ACE_wrappers/ace/Active_Map_Manager.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_ACTIVE_MAP_MANAGER_H
#define ACE_ACTIVE_MAP_MANAGER_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Active_Map_Manager_T.h b/dep/ACE_wrappers/ace/Active_Map_Manager_T.h
index 7930628dc94..660f0bbbec4 100644
--- a/dep/ACE_wrappers/ace/Active_Map_Manager_T.h
+++ b/dep/ACE_wrappers/ace/Active_Map_Manager_T.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_ACTIVE_MAP_MANAGER_T_H
#define ACE_ACTIVE_MAP_MANAGER_T_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Addr.cpp b/dep/ACE_wrappers/ace/Addr.cpp
index db6e29c7273..6944bfea740 100644
--- a/dep/ACE_wrappers/ace/Addr.cpp
+++ b/dep/ACE_wrappers/ace/Addr.cpp
@@ -2,12 +2,10 @@
#include "ace/Addr.h"
-
ACE_RCSID (ace,
Addr,
"$Id: Addr.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
#if !defined (__ACE_INLINE__)
#include "ace/Addr.inl"
#endif /* __ACE_INLINE__ */
@@ -23,7 +21,6 @@ const ACE_Addr ACE_Addr::sap_any (AF_ANY, -1);
ACE_ALLOC_HOOK_DEFINE(ACE_Addr)
-
// Initializes instance variables. Note that 0 is an unspecified
// protocol family type...
diff --git a/dep/ACE_wrappers/ace/Argv_Type_Converter.cpp b/dep/ACE_wrappers/ace/Argv_Type_Converter.cpp
index 6b0860caaee..3679fbc0737 100644
--- a/dep/ACE_wrappers/ace/Argv_Type_Converter.cpp
+++ b/dep/ACE_wrappers/ace/Argv_Type_Converter.cpp
@@ -32,7 +32,6 @@ ACE_Argv_Type_Converter::ACE_Argv_Type_Converter (int &argc, wchar_t** argv)
}
#endif // ACE_USES_WCHAR
-
ACE_Argv_Type_Converter::ACE_Argv_Type_Converter (int &argc, char **argv)
: saved_argc_(argc),
char_argv_(argv)
@@ -104,7 +103,6 @@ ACE_Argv_Type_Converter::initialize (void)
}
}
-
void
ACE_Argv_Type_Converter::align_char_with_wchar (void)
{
diff --git a/dep/ACE_wrappers/ace/Array_Map.h b/dep/ACE_wrappers/ace/Array_Map.h
index 18c0dbe1b39..f7b79a4be39 100644
--- a/dep/ACE_wrappers/ace/Array_Map.h
+++ b/dep/ACE_wrappers/ace/Array_Map.h
@@ -16,7 +16,6 @@
*/
//=============================================================================
-
#ifndef ACE_ARRAY_MAP_H
#define ACE_ARRAY_MAP_H
diff --git a/dep/ACE_wrappers/ace/Asynch_Connector.h b/dep/ACE_wrappers/ace/Asynch_Connector.h
index 64781ad36a5..569242cba22 100644
--- a/dep/ACE_wrappers/ace/Asynch_Connector.h
+++ b/dep/ACE_wrappers/ace/Asynch_Connector.h
@@ -77,7 +77,6 @@ public:
*/
virtual int cancel (void);
-
/**
* Template method to validate peer before service is opened.
* This method is called when the connection attempt completes,
@@ -128,7 +127,6 @@ protected:
/// This is called when an outstanding accept completes.
virtual void handle_connect (const ACE_Asynch_Connect::Result &result);
-
/// This parses the address from read buffer.
void parse_address (const ACE_Asynch_Connect::Result &result,
ACE_INET_Addr &remote_address,
diff --git a/dep/ACE_wrappers/ace/Asynch_IO.cpp b/dep/ACE_wrappers/ace/Asynch_IO.cpp
index f004fb0d234..ad7dedfc671 100644
--- a/dep/ACE_wrappers/ace/Asynch_IO.cpp
+++ b/dep/ACE_wrappers/ace/Asynch_IO.cpp
@@ -710,8 +710,6 @@ ACE_Asynch_Accept::Result::implementation (void) const
return this->implementation_;
}
-
-
// *********************************************************************
ACE_Asynch_Connect::ACE_Asynch_Connect (void)
@@ -795,7 +793,6 @@ ACE_Asynch_Connect::Result::connect_handle (void) const
return this->implementation ()->connect_handle ();
}
-
ACE_Asynch_Connect_Result_Impl *
ACE_Asynch_Connect::Result::implementation (void) const
{
@@ -1191,7 +1188,6 @@ ACE_Service_Handler::open (ACE_HANDLE,
{
}
-
// ************************************************************
ACE_Asynch_Read_Dgram::ACE_Asynch_Read_Dgram (void)
@@ -1305,7 +1301,6 @@ ACE_Asynch_Read_Dgram::Result::implementation (void) const
// ************************************************************
-
ACE_Asynch_Write_Dgram::ACE_Asynch_Write_Dgram (void)
: implementation_ (0)
{
diff --git a/dep/ACE_wrappers/ace/Asynch_IO.h b/dep/ACE_wrappers/ace/Asynch_IO.h
index 3b5004ce46e..00b24b82e74 100644
--- a/dep/ACE_wrappers/ace/Asynch_IO.h
+++ b/dep/ACE_wrappers/ace/Asynch_IO.h
@@ -167,7 +167,6 @@ public:
*/
int signal_number (void) const;
-
/// Destructor.
virtual ~ACE_Asynch_Result (void);
@@ -250,7 +249,6 @@ public:
*/
int cancel (void);
-
// = Access methods.
/// Return the underlying proactor.
@@ -1289,7 +1287,6 @@ public:
};
};
-
// Forward declarations
class ACE_Asynch_Read_Dgram_Result_Impl;
class ACE_Asynch_Read_Dgram_Impl;
@@ -1554,7 +1551,6 @@ public:
};
};
-
/**
* @class ACE_Handler
*
diff --git a/dep/ACE_wrappers/ace/Asynch_IO_Impl.h b/dep/ACE_wrappers/ace/Asynch_IO_Impl.h
index 9e6652e7e8e..087a292f813 100644
--- a/dep/ACE_wrappers/ace/Asynch_IO_Impl.h
+++ b/dep/ACE_wrappers/ace/Asynch_IO_Impl.h
@@ -515,7 +515,6 @@ protected:
ACE_Asynch_Accept_Result_Impl (void);
};
-
/**
* @class ACE_Asynch_Connect_Impl
*
@@ -566,7 +565,6 @@ protected:
ACE_Asynch_Connect_Result_Impl (void);
};
-
/**
* @class ACE_Asynch_Transmit_File_Impl
*
@@ -635,7 +633,6 @@ protected:
ACE_Asynch_Transmit_File_Result_Impl (void);
};
-
/**
* @class ACE_Asynch_Read_Dgram_Impl
*
diff --git a/dep/ACE_wrappers/ace/Asynch_IO_Impl.inl b/dep/ACE_wrappers/ace/Asynch_IO_Impl.inl
index 60dc69dfb31..8e37772f5c9 100644
--- a/dep/ACE_wrappers/ace/Asynch_IO_Impl.inl
+++ b/dep/ACE_wrappers/ace/Asynch_IO_Impl.inl
@@ -90,7 +90,6 @@ ACE_Asynch_Connect_Result_Impl::ACE_Asynch_Connect_Result_Impl (void)
{
}
-
ACE_INLINE
ACE_Asynch_Transmit_File_Impl::ACE_Asynch_Transmit_File_Impl (void)
: ACE_Asynch_Operation_Impl ()
diff --git a/dep/ACE_wrappers/ace/Asynch_Pseudo_Task.cpp b/dep/ACE_wrappers/ace/Asynch_Pseudo_Task.cpp
index 34715c2bba4..891cb0cf4d0 100644
--- a/dep/ACE_wrappers/ace/Asynch_Pseudo_Task.cpp
+++ b/dep/ACE_wrappers/ace/Asynch_Pseudo_Task.cpp
@@ -69,8 +69,6 @@ ACE_Asynch_Pseudo_Task::svc (void)
return 0;
}
-
-
int
ACE_Asynch_Pseudo_Task::register_io_handler (ACE_HANDLE handle,
ACE_Event_Handler *handler,
diff --git a/dep/ACE_wrappers/ace/Atomic_Op.inl b/dep/ACE_wrappers/ace/Atomic_Op.inl
index ed6bfbdbc1b..8735fa8d85a 100644
--- a/dep/ACE_wrappers/ace/Atomic_Op.inl
+++ b/dep/ACE_wrappers/ace/Atomic_Op.inl
@@ -170,7 +170,6 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::value_i (void)
return this->value_;
}
-
ACE_INLINE
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::ACE_Atomic_Op (void)
: value_ (0)
diff --git a/dep/ACE_wrappers/ace/Atomic_Op_T.inl b/dep/ACE_wrappers/ace/Atomic_Op_T.inl
index ff051b0cbce..2ac73d9fd39 100644
--- a/dep/ACE_wrappers/ace/Atomic_Op_T.inl
+++ b/dep/ACE_wrappers/ace/Atomic_Op_T.inl
@@ -195,7 +195,6 @@ ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op (
// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op");
}
-
template <class ACE_LOCK, class TYPE>
ACE_INLINE ACE_Atomic_Op<ACE_LOCK, TYPE> &
ACE_Atomic_Op<ACE_LOCK, TYPE>::operator= (
diff --git a/dep/ACE_wrappers/ace/Auto_IncDec_T.h b/dep/ACE_wrappers/ace/Auto_IncDec_T.h
index bc46b8b2f50..8a8840e84b2 100644
--- a/dep/ACE_wrappers/ace/Auto_IncDec_T.h
+++ b/dep/ACE_wrappers/ace/Auto_IncDec_T.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_AUTO_INCDEC_T_H
#define ACE_AUTO_INCDEC_T_H
diff --git a/dep/ACE_wrappers/ace/Auto_Ptr.h b/dep/ACE_wrappers/ace/Auto_Ptr.h
index d7547c440e2..ce52100609b 100644
--- a/dep/ACE_wrappers/ace/Auto_Ptr.h
+++ b/dep/ACE_wrappers/ace/Auto_Ptr.h
@@ -32,7 +32,6 @@
# pragma warning(disable: 4284)
#endif /* _MSC_VER */
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
/**
@@ -179,7 +178,6 @@ public:
X *operator-> () const;
};
-
/**
* @brief Reset given @c auto_ptr element to new element.
*
diff --git a/dep/ACE_wrappers/ace/Base_Thread_Adapter.h b/dep/ACE_wrappers/ace/Base_Thread_Adapter.h
index beee7210f42..968535917d2 100644
--- a/dep/ACE_wrappers/ace/Base_Thread_Adapter.h
+++ b/dep/ACE_wrappers/ace/Base_Thread_Adapter.h
@@ -67,11 +67,8 @@ protected:
long flags_;
};
-
-
class ACE_Service_Gestalt;
-
/**
* @class ACE_Base_Thread_Adapter
*
diff --git a/dep/ACE_wrappers/ace/Based_Pointer_Repository.h b/dep/ACE_wrappers/ace/Based_Pointer_Repository.h
index 047e34dca28..4cb49cb078b 100644
--- a/dep/ACE_wrappers/ace/Based_Pointer_Repository.h
+++ b/dep/ACE_wrappers/ace/Based_Pointer_Repository.h
@@ -26,7 +26,6 @@
#include "ace/Synch_Traits.h"
#include "ace/os_include/os_stddef.h"
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
// Forward decl., using the "Cheshire Cat" technique.
diff --git a/dep/ACE_wrappers/ace/Basic_Stats.h b/dep/ACE_wrappers/ace/Basic_Stats.h
index fcc9996d8ba..2bf96a61c06 100644
--- a/dep/ACE_wrappers/ace/Basic_Stats.h
+++ b/dep/ACE_wrappers/ace/Basic_Stats.h
@@ -9,7 +9,6 @@
*/
//=============================================================================
-
#ifndef ACE_BASIC_STATS_H
#define ACE_BASIC_STATS_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Basic_Types.cpp b/dep/ACE_wrappers/ace/Basic_Types.cpp
index f7c87cdb9ce..2aebf729b64 100644
--- a/dep/ACE_wrappers/ace/Basic_Types.cpp
+++ b/dep/ACE_wrappers/ace/Basic_Types.cpp
@@ -4,12 +4,10 @@
# include "ace/Basic_Types.inl"
#endif /* ! __ACE_INLINE__ */
-
ACE_RCSID (ace,
Basic_Types,
"$Id: Basic_Types.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
#if defined (ACE_LACKS_LONGLONG_T) && !defined (ACE_LACKS_UNSIGNEDLONGLONG_T)
# include "ace/Log_Msg.h"
# include "ace/OS_NS_stdio.h"
@@ -30,7 +28,6 @@ ACE_U_LongLong::output (FILE *file) const
ACE_OS::fprintf (file, "0x%lx", l_ ());
}
-
ACE_TCHAR *
ACE_U_LongLong::as_string (ACE_TCHAR *output,
unsigned int base,
@@ -111,7 +108,6 @@ ACE_U_LongLong::as_string (ACE_TCHAR *output,
return output;
}
-
# if !defined (ACE_LACKS_IOSTREAM_TOTALLY)
ostream&
operator<< (ostream& os, const ACE_U_LongLong& ll)
diff --git a/dep/ACE_wrappers/ace/Basic_Types.h b/dep/ACE_wrappers/ace/Basic_Types.h
index 9b57fd81c43..eb080e4975e 100644
--- a/dep/ACE_wrappers/ace/Basic_Types.h
+++ b/dep/ACE_wrappers/ace/Basic_Types.h
@@ -220,7 +220,6 @@ typedef ACE::If_Then_Else<
# endif
# endif /* !defined (ACE_SIZEOF_LONG_LONG) */
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
// The sizes of the commonly implemented types are now known. Set up
@@ -327,7 +326,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
# endif /* defined (ACE_UINT64_TYPE) */
#endif /* !(ACE_LACKS_LONGLONG_T || ACE_LACKS_UNSIGNEDLONGLONG_T) */
-
typedef ACE_UINT16 ACE_USHORT16; // @@ Backward compatibility.
// Define a generic byte for use in codecs
@@ -805,7 +803,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# define ACE_UINT64_DBLCAST_ADAPTER(n) (n)
# endif /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */
-
// The number of bytes in a float.
# ifndef ACE_SIZEOF_FLOAT
# if FLT_MAX_EXP == 128
diff --git a/dep/ACE_wrappers/ace/Basic_Types.inl b/dep/ACE_wrappers/ace/Basic_Types.inl
index c6f0013d45e..19cc7579b82 100644
--- a/dep/ACE_wrappers/ace/Basic_Types.inl
+++ b/dep/ACE_wrappers/ace/Basic_Types.inl
@@ -187,7 +187,6 @@ ACE_U_LongLong::operator= (const ACE_UINT32 &rhs)
return *this;
}
-
ACE_INLINE ACE_U_LongLong
ACE_U_LongLong::operator+ (const ACE_U_LongLong &n) const
{
@@ -589,7 +588,6 @@ ACE_U_LongLong::operator= (const ACE_UINT32 &rhs)
return *this;
}
-
ACE_INLINE ACE_U_LongLong
ACE_U_LongLong::operator+ (const ACE_U_LongLong &n) const
{
diff --git a/dep/ACE_wrappers/ace/Bound_Ptr.inl b/dep/ACE_wrappers/ace/Bound_Ptr.inl
index 540a5516eab..3165f6f5acc 100644
--- a/dep/ACE_wrappers/ace/Bound_Ptr.inl
+++ b/dep/ACE_wrappers/ace/Bound_Ptr.inl
@@ -34,8 +34,6 @@ ACE_Bound_Ptr_Counter<ACE_LOCK>::create_strong (void)
return temp;
}
-
-
template <class ACE_LOCK> inline long
ACE_Bound_Ptr_Counter<ACE_LOCK>::attach_strong (ACE_Bound_Ptr_Counter<ACE_LOCK>* counter)
{
diff --git a/dep/ACE_wrappers/ace/CDR_Base.cpp b/dep/ACE_wrappers/ace/CDR_Base.cpp
index e7647006b65..7b271280886 100644
--- a/dep/ACE_wrappers/ace/CDR_Base.cpp
+++ b/dep/ACE_wrappers/ace/CDR_Base.cpp
@@ -647,7 +647,7 @@ ACE_CDR::LongDouble::assign (const ACE_CDR::LongDouble::NativeImpl& rhs)
// we have to shift and or the rhs to get the right bytes.
size_t li = 2;
bool direction = true;
- for (size_t ri = 1; ri < sizeof (rhs);)
+ for (size_t ri = 1; ri < sizeof (rhs); )
{
if (direction)
{
@@ -740,7 +740,7 @@ ACE_CDR::LongDouble::operator ACE_CDR::LongDouble::NativeImpl () const
// we have to shift and or the rhs to get the right bytes.
size_t li = 1;
bool direction = true;
- for (size_t ri = 2; li < sizeof (ret);) {
+ for (size_t ri = 2; li < sizeof (ret); ) {
if (direction)
{
lhs_ptr[li] |= ((copy[ri] >> 4) & 0xf);
diff --git a/dep/ACE_wrappers/ace/CDR_Base.h b/dep/ACE_wrappers/ace/CDR_Base.h
index c3b2e368514..47db56002ee 100644
--- a/dep/ACE_wrappers/ace/CDR_Base.h
+++ b/dep/ACE_wrappers/ace/CDR_Base.h
@@ -24,7 +24,6 @@
*/
//=============================================================================
-
#ifndef ACE_CDR_BASE_H
#define ACE_CDR_BASE_H
@@ -373,7 +372,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# include "ace/CDR_Base.inl"
#endif /* __ACE_INLINE__ */
-
#include /**/ "ace/post.h"
#endif /* ACE_CDR_BASE_H */
diff --git a/dep/ACE_wrappers/ace/CDR_Size.cpp b/dep/ACE_wrappers/ace/CDR_Size.cpp
index 074631080c4..f3c72df2734 100644
--- a/dep/ACE_wrappers/ace/CDR_Size.cpp
+++ b/dep/ACE_wrappers/ace/CDR_Size.cpp
@@ -213,7 +213,6 @@ ACE_SizeCDR::write_wchar_array_i (const ACE_CDR::WChar *,
return true;
}
-
ACE_CDR::Boolean
ACE_SizeCDR::write_array (const void *,
size_t size,
diff --git a/dep/ACE_wrappers/ace/CDR_Size.h b/dep/ACE_wrappers/ace/CDR_Size.h
index 777c29acc4d..3803310c7f2 100644
--- a/dep/ACE_wrappers/ace/CDR_Size.h
+++ b/dep/ACE_wrappers/ace/CDR_Size.h
@@ -54,15 +54,12 @@ public:
/// Returns @c false if an error has ocurred.
bool good_bit (void) const;
-
/// Reset current size.
void reset (void);
-
/// Return current size.
size_t total_length (void) const;
-
// Return 0 on failure and 1 on success.
//@{ @name Size-calculating pseudo-write operations
ACE_CDR::Boolean write_boolean (ACE_CDR::Boolean x);
@@ -157,7 +154,6 @@ private:
size_t align,
ACE_CDR::ULong length);
-
ACE_CDR::Boolean write_wchar_array_i (const ACE_CDR::WChar* x,
ACE_CDR::ULong length);
@@ -235,7 +231,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
#endif /* __ACE_INLINE__ */
-
#include /**/ "ace/post.h"
#endif /* ACE_CDR_SIZE_H */
diff --git a/dep/ACE_wrappers/ace/CDR_Size.inl b/dep/ACE_wrappers/ace/CDR_Size.inl
index 4ea81523faf..5d65ab94c09 100644
--- a/dep/ACE_wrappers/ace/CDR_Size.inl
+++ b/dep/ACE_wrappers/ace/CDR_Size.inl
@@ -34,7 +34,6 @@ ACE_SizeCDR::total_length (void) const
return this->size_;
}
-
// Encode the CDR stream.
ACE_INLINE ACE_CDR::Boolean
@@ -252,7 +251,6 @@ ACE_SizeCDR::write_float_array (const ACE_CDR::Float *x,
length);
}
-
ACE_INLINE ACE_CDR::Boolean
ACE_SizeCDR::write_double_array (const ACE_CDR::Double *x,
ACE_CDR::ULong length)
@@ -273,10 +271,8 @@ ACE_SizeCDR::write_longdouble_array (const ACE_CDR::LongDouble* x,
length);
}
-
// ****************************************************************
-
ACE_INLINE ACE_CDR::Boolean
operator<< (ACE_SizeCDR &ss, ACE_CDR::Char x)
{
@@ -420,5 +416,4 @@ operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_wstring x)
(ACE_CDR::Boolean) (ss.good_bit () && (!x.bound_ || len <= x.bound_));
}
-
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/dep/ACE_wrappers/ace/CDR_Stream.cpp b/dep/ACE_wrappers/ace/CDR_Stream.cpp
index 1282f75358a..aa313cdff75 100644
--- a/dep/ACE_wrappers/ace/CDR_Stream.cpp
+++ b/dep/ACE_wrappers/ace/CDR_Stream.cpp
@@ -633,7 +633,6 @@ ACE_OutputCDR::write_wchar_array_i (const ACE_CDR::WChar *x,
return false;
}
-
ACE_CDR::Boolean
ACE_OutputCDR::write_array (const void *x,
size_t size,
@@ -683,7 +682,6 @@ ACE_OutputCDR::write_array (const void *x,
return false;
}
-
ACE_CDR::Boolean
ACE_OutputCDR::write_boolean_array (const ACE_CDR::Boolean* x,
ACE_CDR::ULong length)
@@ -703,7 +701,6 @@ ACE_OutputCDR::write_boolean_array (const ACE_CDR::Boolean* x,
return this->good_bit ();
}
-
char *
ACE_OutputCDR::write_long_placeholder (void)
{
@@ -715,7 +712,6 @@ ACE_OutputCDR::write_long_placeholder (void)
return buf;
}
-
char *
ACE_OutputCDR::write_short_placeholder (void)
{
@@ -727,7 +723,6 @@ ACE_OutputCDR::write_short_placeholder (void)
return buf;
}
-
ACE_CDR::Boolean
ACE_OutputCDR::replace (ACE_CDR::Long x, char* loc)
{
@@ -750,7 +745,6 @@ ACE_OutputCDR::replace (ACE_CDR::Long x, char* loc)
return true;
}
-
ACE_CDR::Boolean
ACE_OutputCDR::replace (ACE_CDR::Short x, char* loc)
{
@@ -773,7 +767,6 @@ ACE_OutputCDR::replace (ACE_CDR::Short x, char* loc)
return true;
}
-
int
ACE_OutputCDR::consolidate (void)
{
@@ -818,7 +811,6 @@ ACE_OutputCDR::consolidate (void)
return 0;
}
-
ACE_Message_Block*
ACE_OutputCDR::find (char* loc)
{
@@ -1529,7 +1521,6 @@ ACE_InputCDR::read_wchar_array_i (ACE_CDR::WChar* x,
return false;
}
-
ACE_CDR::Boolean
ACE_InputCDR::read_boolean_array (ACE_CDR::Boolean *x,
ACE_CDR::ULong length)
diff --git a/dep/ACE_wrappers/ace/CDR_Stream.h b/dep/ACE_wrappers/ace/CDR_Stream.h
index 348433a0de4..c49a0006266 100644
--- a/dep/ACE_wrappers/ace/CDR_Stream.h
+++ b/dep/ACE_wrappers/ace/CDR_Stream.h
@@ -59,7 +59,6 @@
#include "Monitor_Size.h"
#endif /* ACE_HAS_MONITOR_POINTS==1 */
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Char_Codeset_Translator;
@@ -518,11 +517,9 @@ private:
size_t align,
ACE_CDR::ULong length);
-
ACE_CDR::Boolean write_wchar_array_i (const ACE_CDR::WChar* x,
ACE_CDR::ULong length);
-
/**
* Grow the CDR stream. When it returns @a buf contains a pointer to
* memory in the CDR stream, with at least @a size bytes ahead of it
@@ -602,7 +599,6 @@ protected:
static size_t wchar_maxbytes_;
};
-
// ****************************************************************
/**
@@ -1274,7 +1270,6 @@ extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
ACE_CString &x);
-
ACE_END_VERSIONED_NAMESPACE_DECL
#if defined (__ACE_INLINE__)
diff --git a/dep/ACE_wrappers/ace/CDR_Stream.inl b/dep/ACE_wrappers/ace/CDR_Stream.inl
index 9fef2d8fab0..bf5a6e25cb2 100644
--- a/dep/ACE_wrappers/ace/CDR_Stream.inl
+++ b/dep/ACE_wrappers/ace/CDR_Stream.inl
@@ -411,7 +411,6 @@ ACE_OutputCDR::write_float_array (const ACE_CDR::Float *x,
length);
}
-
ACE_INLINE ACE_CDR::Boolean
ACE_OutputCDR::write_double_array (const ACE_CDR::Double *x,
ACE_CDR::ULong length)
@@ -496,7 +495,6 @@ ACE_OutputCDR::get_version (ACE_CDR::Octet &major, ACE_CDR::Octet &minor)
minor = this->minor_version_;
}
-
ACE_INLINE const ACE_Message_Block*
ACE_OutputCDR::begin (void) const
{
@@ -650,7 +648,6 @@ ACE_InputCDR::read_char (ACE_CDR::Char &x)
return this->char_translator_->read_char (*this, x);
}
-
ACE_INLINE ACE_CDR::Boolean
ACE_InputCDR::read_short (ACE_CDR::Short &x)
{
@@ -664,7 +661,6 @@ ACE_InputCDR::read_ushort (ACE_CDR::UShort &x)
return this->read_2 (&x);
}
-
ACE_INLINE ACE_CDR::Boolean
ACE_InputCDR::read_long (ACE_CDR::Long &x)
{
@@ -672,14 +668,12 @@ ACE_InputCDR::read_long (ACE_CDR::Long &x)
return this->read_4 (reinterpret_cast<ACE_CDR::ULong*> (temp));
}
-
ACE_INLINE ACE_CDR::Boolean
ACE_InputCDR::read_ulong (ACE_CDR::ULong &x)
{
return this->read_4 (&x);
}
-
ACE_INLINE ACE_CDR::Boolean
ACE_InputCDR::read_longlong (ACE_CDR::LongLong &x)
{
@@ -907,7 +901,6 @@ ACE_InputCDR::read_float_array (ACE_CDR::Float *x,
length);
}
-
ACE_INLINE ACE_CDR::Boolean
ACE_InputCDR::read_double_array (ACE_CDR::Double *x,
ACE_CDR::ULong length)
@@ -1534,7 +1527,6 @@ ACE_InputCDR::wchar_translator (void) const
return this->wchar_translator_;
}
-
ACE_INLINE void
ACE_InputCDR::char_translator (ACE_Char_Codeset_Translator * ctran)
{
diff --git a/dep/ACE_wrappers/ace/CORBA_macros.h b/dep/ACE_wrappers/ace/CORBA_macros.h
index ce45893b0a2..7284e9ae8e3 100644
--- a/dep/ACE_wrappers/ace/CORBA_macros.h
+++ b/dep/ACE_wrappers/ace/CORBA_macros.h
@@ -82,7 +82,6 @@
// the macros should still work if you defined your adapter class as
// ACE_EXCEPTION_TYPE.
-
// The following macros assume that an environment variable is passed
// in/out of each function that can throw an exception. The type of the
// environment variable is defined by ACE_ENV_TYPE.
diff --git a/dep/ACE_wrappers/ace/Cache_Map_Manager_T.inl b/dep/ACE_wrappers/ace/Cache_Map_Manager_T.inl
index bcd48bd33e9..5c5c4eb593e 100644
--- a/dep/ACE_wrappers/ace/Cache_Map_Manager_T.inl
+++ b/dep/ACE_wrappers/ace/Cache_Map_Manager_T.inl
@@ -221,7 +221,6 @@ ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_IMPLEMENTATION, CACHING_STRAT
return retn;
}
-
template <class KEY, class VALUE, class REVERSE_IMPLEMENTATION, class CACHING_STRATEGY, class ATTRIBUTES> ACE_INLINE void
ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES>::dump (void) const
{
diff --git a/dep/ACE_wrappers/ace/Caching_Strategies_T.h b/dep/ACE_wrappers/ace/Caching_Strategies_T.h
index d78332e41f5..e2fa428c3b7 100644
--- a/dep/ACE_wrappers/ace/Caching_Strategies_T.h
+++ b/dep/ACE_wrappers/ace/Caching_Strategies_T.h
@@ -242,7 +242,6 @@ public:
int notify_unbind (int result,
const ATTRIBUTES &attr);
-
/// This method acts as a notification about the CONTAINERs trybind
/// method call
int notify_trybind (int result,
diff --git a/dep/ACE_wrappers/ace/Capabilities.cpp b/dep/ACE_wrappers/ace/Capabilities.cpp
index 4f8151d1bc6..a42ff448844 100644
--- a/dep/ACE_wrappers/ace/Capabilities.cpp
+++ b/dep/ACE_wrappers/ace/Capabilities.cpp
@@ -13,7 +13,6 @@ ACE_RCSID (ace,
Capabilities,
"$Id: Capabilities.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
#define ACE_ESC ((ACE_TCHAR)0x1b)
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -199,7 +198,7 @@ ACE_Capabilities::fillent (const ACE_TCHAR *buf)
int
ACE_Capabilities::is_entry (const ACE_TCHAR *name, const ACE_TCHAR *line)
{
- for (;;)
+ for (; ; )
{
// Skip blanks or irrelevant characters
while (*line && ACE_OS::ace_isspace(*line))
diff --git a/dep/ACE_wrappers/ace/Capabilities.h b/dep/ACE_wrappers/ace/Capabilities.h
index 459afd1c681..8c239825e7d 100644
--- a/dep/ACE_wrappers/ace/Capabilities.h
+++ b/dep/ACE_wrappers/ace/Capabilities.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_CAPABILITIES_H
#define ACE_CAPABILITIES_H
#include /**/ "ace/pre.h"
@@ -31,7 +30,6 @@
# include "ace/OS_NS_ctype.h"
#endif /* ACE_IS_SPLITTING */
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
/**
diff --git a/dep/ACE_wrappers/ace/Cleanup.cpp b/dep/ACE_wrappers/ace/Cleanup.cpp
index 960e74fffa4..e7736972678 100644
--- a/dep/ACE_wrappers/ace/Cleanup.cpp
+++ b/dep/ACE_wrappers/ace/Cleanup.cpp
@@ -20,7 +20,6 @@ ACE_Cleanup::cleanup (void *)
delete this;
}
-
ACE_Cleanup::~ACE_Cleanup (void)
{
}
diff --git a/dep/ACE_wrappers/ace/Cleanup_Strategies_T.h b/dep/ACE_wrappers/ace/Cleanup_Strategies_T.h
index 776ae28441b..89775562f6e 100644
--- a/dep/ACE_wrappers/ace/Cleanup_Strategies_T.h
+++ b/dep/ACE_wrappers/ace/Cleanup_Strategies_T.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef CLEANUP_STRATEGIES_H
#define CLEANUP_STRATEGIES_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Codecs.h b/dep/ACE_wrappers/ace/Codecs.h
index 0e0f13ac319..5b1b8bbde70 100644
--- a/dep/ACE_wrappers/ace/Codecs.h
+++ b/dep/ACE_wrappers/ace/Codecs.h
@@ -30,7 +30,6 @@
#include "ace/Basic_Types.h"
#include "ace/Global_Macros.h"
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
/**
diff --git a/dep/ACE_wrappers/ace/Codeset_IBM1047.cpp b/dep/ACE_wrappers/ace/Codeset_IBM1047.cpp
index 62488c8927c..dde4eafb42c 100644
--- a/dep/ACE_wrappers/ace/Codeset_IBM1047.cpp
+++ b/dep/ACE_wrappers/ace/Codeset_IBM1047.cpp
@@ -13,7 +13,6 @@
*/
//=============================================================================
-
#include "ace/Codeset_IBM1047.h"
#if defined (ACE_HAS_EBCDIC)
diff --git a/dep/ACE_wrappers/ace/Codeset_IBM1047.h b/dep/ACE_wrappers/ace/Codeset_IBM1047.h
index 7e0df2b5c08..5e19763f94c 100644
--- a/dep/ACE_wrappers/ace/Codeset_IBM1047.h
+++ b/dep/ACE_wrappers/ace/Codeset_IBM1047.h
@@ -13,7 +13,6 @@
*/
//=============================================================================
-
#ifndef ACE_CODESET_IMB1047_H
#define ACE_CODESET_IMB1047_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Configuration.cpp b/dep/ACE_wrappers/ace/Configuration.cpp
index fd8548d9e8d..9c7f1d278b5 100644
--- a/dep/ACE_wrappers/ace/Configuration.cpp
+++ b/dep/ACE_wrappers/ace/Configuration.cpp
@@ -478,7 +478,6 @@ ACE_Configuration_Win32Registry::ACE_Configuration_Win32Registry (HKEY hKey)
root_ = ACE_Configuration_Section_Key (temp);
}
-
ACE_Configuration_Win32Registry::~ACE_Configuration_Win32Registry (void)
{
}
@@ -979,7 +978,6 @@ ACE_Configuration_Win32Registry::remove_value (const ACE_Configuration_Section_K
return 0;
}
-
int
ACE_Configuration_Win32Registry::load_key (const ACE_Configuration_Section_Key& key,
HKEY& hKey)
@@ -1277,7 +1275,6 @@ ACE_Configuration_Heap::open (size_t default_map_size)
return create_index ();
}
-
int
ACE_Configuration_Heap::open (const ACE_TCHAR* file_name,
void* base_address,
@@ -1373,7 +1370,6 @@ ACE_Configuration_Heap::load_key (const ACE_Configuration_Section_Key& key,
return 0;
}
-
int
ACE_Configuration_Heap::add_section (const ACE_Configuration_Section_Key& base,
const ACE_TCHAR* sub_section,
@@ -2012,7 +2008,6 @@ ACE_Configuration_Heap::get_integer_value (const ACE_Configuration_Section_Key&
return -1; // section does not exist
}
-
// See if it exists first
ACE_Configuration_ExtId VExtId (t_name);
ACE_Configuration_Value_IntId VIntId;
diff --git a/dep/ACE_wrappers/ace/Configuration.h b/dep/ACE_wrappers/ace/Configuration.h
index 55bd705bf64..14972e1eca3 100644
--- a/dep/ACE_wrappers/ace/Configuration.h
+++ b/dep/ACE_wrappers/ace/Configuration.h
@@ -37,7 +37,6 @@
#include "ace/Local_Memory_Pool.h"
#include "ace/Synch_Traits.h"
-
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
@@ -423,7 +422,6 @@ protected:
ACE_Configuration (const ACE_Configuration& rhs);
ACE_Configuration& operator= (const ACE_Configuration& rhs);
-
ACE_Configuration_Section_Key root_;
};
diff --git a/dep/ACE_wrappers/ace/Configuration_Import_Export.cpp b/dep/ACE_wrappers/ace/Configuration_Import_Export.cpp
index bd5a79b143a..5225ec48331 100644
--- a/dep/ACE_wrappers/ace/Configuration_Import_Export.cpp
+++ b/dep/ACE_wrappers/ace/Configuration_Import_Export.cpp
@@ -388,7 +388,6 @@ ACE_Registry_ImpExp::process_previous_line_format (ACE_TCHAR* buffer,
return 0;
} // end read_previous_line_format
-
ACE_Ini_ImpExp::ACE_Ini_ImpExp (ACE_Configuration& config)
: ACE_Config_ImpExp_Base (config)
{
diff --git a/dep/ACE_wrappers/ace/Connection_Recycling_Strategy.cpp b/dep/ACE_wrappers/ace/Connection_Recycling_Strategy.cpp
index 6f32c9a2de2..752b2220bb3 100644
--- a/dep/ACE_wrappers/ace/Connection_Recycling_Strategy.cpp
+++ b/dep/ACE_wrappers/ace/Connection_Recycling_Strategy.cpp
@@ -1,9 +1,7 @@
#include "ace/Connection_Recycling_Strategy.h"
-
ACE_RCSID(ace, Connection_Recycling_Strategy, "$Id: Connection_Recycling_Strategy.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_Connection_Recycling_Strategy::~ACE_Connection_Recycling_Strategy (void)
diff --git a/dep/ACE_wrappers/ace/Containers_T.h b/dep/ACE_wrappers/ace/Containers_T.h
index 8969d3cf969..d8ba71c64a6 100644
--- a/dep/ACE_wrappers/ace/Containers_T.h
+++ b/dep/ACE_wrappers/ace/Containers_T.h
@@ -40,7 +40,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Allocator;
-
/**
* @class ACE_Bounded_Stack
*
@@ -173,7 +172,6 @@ private:
//----------------------------------------
-
/**
* @class ACE_Fixed_Stack
*
@@ -333,8 +331,6 @@ private:
T item_;
};
-
-
/**
* @class ACE_Unbounded_Stack
*
@@ -408,7 +404,6 @@ public:
// = Classic Stack operations.
-
///Push an element onto the top of stack.
/**
* Place a new item on top of the stack. Returns -1 if the stack
@@ -774,7 +769,6 @@ public:
ACE_ALLOC_HOOK_DECLARE;
};
-
/**
* @class ACE_Double_Linked_List
*
@@ -992,7 +986,6 @@ protected:
ACE_Allocator *allocator_;
};
-
template <class T> class ACE_DLList;
template <class T> class ACE_DLList_Iterator;
template <class T> class ACE_DLList_Reverse_Iterator;
@@ -1553,7 +1546,6 @@ private:
ssize_t next_;
};
-
/**
* @class ACE_Bounded_Set
*
@@ -1776,7 +1768,6 @@ private:
ACE_Ordered_MultiSet<T> &set_;
};
-
/**
* @class ACE_Ordered_MultiSet
*
diff --git a/dep/ACE_wrappers/ace/Containers_T.inl b/dep/ACE_wrappers/ace/Containers_T.inl
index 912c9df8bb8..b387061ac80 100644
--- a/dep/ACE_wrappers/ace/Containers_T.inl
+++ b/dep/ACE_wrappers/ace/Containers_T.inl
@@ -159,7 +159,6 @@ ACE_Unbounded_Stack<T>::size (void) const
// ---
-
// ---
template <class T, size_t ACE_SIZE> ACE_INLINE int
@@ -248,8 +247,6 @@ ACE_Ordered_MultiSet_Iterator<T>::dump (void) const
#endif /* ACE_HAS_DUMP */
}
-
-
// --
template <class T> ACE_INLINE int
@@ -312,7 +309,6 @@ ACE_Array<T>::operator!= (const ACE_Array<T> &s) const
// ****************************************************************
-
// ****************************************************************
template <class T> ACE_INLINE void
@@ -420,7 +416,6 @@ ACE_DLList_Iterator<T>::dump (void) const
#endif /* ACE_HAS_DUMP */
}
-
template <class T> ACE_INLINE int
ACE_DLList_Reverse_Iterator<T>::remove (void)
{
@@ -467,7 +462,6 @@ ACE_DLList_Reverse_Iterator<T>::next (void) const
return (T *) (temp ? temp->item_ : 0);
}
-
template <class T> ACE_INLINE void
ACE_DLList_Reverse_Iterator<T>::dump (void) const
{
diff --git a/dep/ACE_wrappers/ace/Copy_Disabled.cpp b/dep/ACE_wrappers/ace/Copy_Disabled.cpp
index 92cc98cd1ef..8fa35ddb02f 100644
--- a/dep/ACE_wrappers/ace/Copy_Disabled.cpp
+++ b/dep/ACE_wrappers/ace/Copy_Disabled.cpp
@@ -8,12 +8,10 @@
#include "ace/Copy_Disabled.h"
-
ACE_RCSID (ace,
Copy_Disabled,
"$Id: Copy_Disabled.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_Copy_Disabled::ACE_Copy_Disabled (void)
diff --git a/dep/ACE_wrappers/ace/DEV.h b/dep/ACE_wrappers/ace/DEV.h
index 6a6a7419e37..21b4783ca4a 100644
--- a/dep/ACE_wrappers/ace/DEV.h
+++ b/dep/ACE_wrappers/ace/DEV.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_DEV_H
#define ACE_DEV_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/DEV_Connector.cpp b/dep/ACE_wrappers/ace/DEV_Connector.cpp
index 02763c95296..9f4c985b1d4 100644
--- a/dep/ACE_wrappers/ace/DEV_Connector.cpp
+++ b/dep/ACE_wrappers/ace/DEV_Connector.cpp
@@ -8,12 +8,10 @@
#include "ace/DEV_Connector.inl"
#endif /* __ACE_INLINE__ */
-
ACE_RCSID (ace,
DEV_Connector,
"$Id: DEV_Connector.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE(ACE_DEV_Connector)
diff --git a/dep/ACE_wrappers/ace/DEV_Connector.h b/dep/ACE_wrappers/ace/DEV_Connector.h
index 565d7ae024a..9a949ed92d7 100644
--- a/dep/ACE_wrappers/ace/DEV_Connector.h
+++ b/dep/ACE_wrappers/ace/DEV_Connector.h
@@ -22,7 +22,6 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
/**
diff --git a/dep/ACE_wrappers/ace/DEV_IO.cpp b/dep/ACE_wrappers/ace/DEV_IO.cpp
index e3c92041f28..82dd891b661 100644
--- a/dep/ACE_wrappers/ace/DEV_IO.cpp
+++ b/dep/ACE_wrappers/ace/DEV_IO.cpp
@@ -9,7 +9,6 @@
ACE_RCSID(ace, DEV_IO, "$Id: DEV_IO.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE(ACE_DEV_IO)
diff --git a/dep/ACE_wrappers/ace/DLL.cpp b/dep/ACE_wrappers/ace/DLL.cpp
index 43cfa2efa84..7ed04b942c8 100644
--- a/dep/ACE_wrappers/ace/DLL.cpp
+++ b/dep/ACE_wrappers/ace/DLL.cpp
@@ -67,7 +67,6 @@ ACE_DLL::operator= (const ACE_DLL &rhs)
return *this;
}
-
// If the library name and the opening mode are specified than on
// object creation the library is implicitly opened.
diff --git a/dep/ACE_wrappers/ace/DLL.h b/dep/ACE_wrappers/ace/DLL.h
index a9700daafc0..afd309d02c4 100644
--- a/dep/ACE_wrappers/ace/DLL.h
+++ b/dep/ACE_wrappers/ace/DLL.h
@@ -59,7 +59,6 @@ public:
/// Allow assignment
ACE_DLL& operator= (const ACE_DLL &rhs);
-
/**
* This constructor performs the actions of open() during construction.
* @param dll_name The name or path of the DLL to load.
@@ -167,7 +166,6 @@ private:
bool close_handle_on_destruction = true,
ACE_SHLIB_HANDLE handle = 0);
-
//private:
public:
diff --git a/dep/ACE_wrappers/ace/DLL_Manager.cpp b/dep/ACE_wrappers/ace/DLL_Manager.cpp
index 9463aa5e1bc..997c4e13471 100644
--- a/dep/ACE_wrappers/ace/DLL_Manager.cpp
+++ b/dep/ACE_wrappers/ace/DLL_Manager.cpp
@@ -233,7 +233,6 @@ ACE_DLL_Handle::open (const ACE_TCHAR *dll_name,
return 0;
}
-
int
ACE_DLL_Handle::close (int unload)
{
@@ -493,7 +492,6 @@ ACE_DLL_Handle::get_dll_names (const ACE_TCHAR *dll_name,
// Pointer to the Singleton instance.
ACE_DLL_Manager *ACE_DLL_Manager::instance_ = 0;
-
ACE_DLL_Manager *
ACE_DLL_Manager::instance (int size)
{
diff --git a/dep/ACE_wrappers/ace/DLL_Manager.h b/dep/ACE_wrappers/ace/DLL_Manager.h
index 0e571b6c03a..9b63c7ead5b 100644
--- a/dep/ACE_wrappers/ace/DLL_Manager.h
+++ b/dep/ACE_wrappers/ace/DLL_Manager.h
@@ -31,7 +31,6 @@
#define ACE_DEFAULT_DLL_MANAGER_SIZE 1024
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
/**
diff --git a/dep/ACE_wrappers/ace/Dev_Poll_Reactor.cpp b/dep/ACE_wrappers/ace/Dev_Poll_Reactor.cpp
index 2cd90d17738..bcc3127003e 100644
--- a/dep/ACE_wrappers/ace/Dev_Poll_Reactor.cpp
+++ b/dep/ACE_wrappers/ace/Dev_Poll_Reactor.cpp
@@ -31,7 +31,6 @@ ACE_RCSID (ace,
# include "ace/Dev_Poll_Reactor.inl"
#endif /* __ACE_INLINE__ */
-
#include "ace/Handle_Set.h"
#include "ace/Reactor.h"
#include "ace/Timer_Heap.h"
@@ -278,7 +277,6 @@ ACE_Dev_Poll_Reactor_Notify::read_notify_pipe (ACE_HANDLE handle,
return have_one ? 1 : 0;
}
-
int
ACE_Dev_Poll_Reactor_Notify::handle_input (ACE_HANDLE handle)
{
@@ -811,7 +809,6 @@ ACE_Dev_Poll_Reactor::current_info (ACE_HANDLE, size_t & /* size */)
ACE_NOTSUP_RETURN (-1);
}
-
int
ACE_Dev_Poll_Reactor::set_sig_handler (ACE_Sig_Handler *signal_handler)
{
@@ -1005,7 +1002,6 @@ ACE_Dev_Poll_Reactor::work_pending_i (ACE_Time_Value * max_wait_time)
return (nfds == 0 && timers_pending != 0 ? 1 : nfds);
}
-
int
ACE_Dev_Poll_Reactor::handle_events (ACE_Time_Value *max_wait_time)
{
diff --git a/dep/ACE_wrappers/ace/Dev_Poll_Reactor.h b/dep/ACE_wrappers/ace/Dev_Poll_Reactor.h
index c675999bb4c..6118d8e0a38 100644
--- a/dep/ACE_wrappers/ace/Dev_Poll_Reactor.h
+++ b/dep/ACE_wrappers/ace/Dev_Poll_Reactor.h
@@ -12,7 +12,6 @@
*/
// =========================================================================
-
#ifndef ACE_DEV_POLL_REACTOR_H
#define ACE_DEV_POLL_REACTOR_H
@@ -1071,7 +1070,6 @@ protected:
/// The pollfd array that `/dev/poll' will feed its results to.
struct pollfd *dp_fds_;
-
/// Pointer to the next pollfd array element that contains the next
/// event to be dispatched.
struct pollfd *start_pfds_;
@@ -1191,7 +1189,6 @@ protected:
};
-
/**
* @class ACE_Dev_Poll_Handler_Guard
*
diff --git a/dep/ACE_wrappers/ace/Dev_Poll_Reactor.inl b/dep/ACE_wrappers/ace/Dev_Poll_Reactor.inl
index 96e71f2dea5..98761f63220 100644
--- a/dep/ACE_wrappers/ace/Dev_Poll_Reactor.inl
+++ b/dep/ACE_wrappers/ace/Dev_Poll_Reactor.inl
@@ -184,7 +184,6 @@ ACE_Dev_Poll_Reactor::upcall (ACE_Event_Handler *event_handler,
return status;
}
-
/************************************************************************/
// Methods for ACE_Dev_Poll_Reactor::Token_Guard
/************************************************************************/
diff --git a/dep/ACE_wrappers/ace/Dump.h b/dep/ACE_wrappers/ace/Dump.h
index 354b162cfb6..d94a740bce7 100644
--- a/dep/ACE_wrappers/ace/Dump.h
+++ b/dep/ACE_wrappers/ace/Dump.h
@@ -47,7 +47,6 @@
*/
//=============================================================================
-
#ifndef ACE_DUMP_H
#define ACE_DUMP_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Dump_T.h b/dep/ACE_wrappers/ace/Dump_T.h
index 4134df75392..fe18af0cdcf 100644
--- a/dep/ACE_wrappers/ace/Dump_T.h
+++ b/dep/ACE_wrappers/ace/Dump_T.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_DUMP_T_H
#define ACE_DUMP_T_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Dynamic_Message_Strategy.cpp b/dep/ACE_wrappers/ace/Dynamic_Message_Strategy.cpp
index e6c89e5238e..1fa3320d5ae 100644
--- a/dep/ACE_wrappers/ace/Dynamic_Message_Strategy.cpp
+++ b/dep/ACE_wrappers/ace/Dynamic_Message_Strategy.cpp
@@ -82,7 +82,6 @@ ACE_Dynamic_Message_Strategy::priority_status (ACE_Message_Block & mb,
return status;
}
-
// Dump the state of the strategy.
void
diff --git a/dep/ACE_wrappers/ace/Dynamic_Service_Base.cpp b/dep/ACE_wrappers/ace/Dynamic_Service_Base.cpp
index 174b009d7b6..474c485b6ff 100644
--- a/dep/ACE_wrappers/ace/Dynamic_Service_Base.cpp
+++ b/dep/ACE_wrappers/ace/Dynamic_Service_Base.cpp
@@ -5,14 +5,12 @@
#include "ace/Service_Types.h"
#include "ace/Log_Msg.h"
-
ACE_RCSID (ace,
Dynamic_Service_Base,
"$Id: Dynamic_Service_Base.cpp 80826 2008-03-04 14:51:23Z wotte $")
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-
void
ACE_Dynamic_Service_Base::dump (void) const
{
@@ -47,7 +45,7 @@ ACE_Dynamic_Service_Base::find_i (const ACE_Service_Gestalt* &repo,
ACE_Service_Gestalt* global = ACE_Service_Config::global ();
- for ( ; (repo->find (name, &svc_rec) == -1) && !no_global; repo = global)
+ for (; (repo->find (name, &svc_rec) == -1) && !no_global; repo = global)
{
// Check the static repo, too if different
if (repo == global)
@@ -57,7 +55,6 @@ ACE_Dynamic_Service_Base::find_i (const ACE_Service_Gestalt* &repo,
return svc_rec;
}
-
// Get the instance using <name> for specific configuration repository.
void *
ACE_Dynamic_Service_Base::instance (const ACE_Service_Gestalt* repo,
diff --git a/dep/ACE_wrappers/ace/Dynamic_Service_Dependency.cpp b/dep/ACE_wrappers/ace/Dynamic_Service_Dependency.cpp
index 9a371ff3c16..8e814af86a7 100644
--- a/dep/ACE_wrappers/ace/Dynamic_Service_Dependency.cpp
+++ b/dep/ACE_wrappers/ace/Dynamic_Service_Dependency.cpp
@@ -8,10 +8,8 @@ ACE_RCSID (ace,
Dynamic_Service_Dependency,
"$Id: Dynamic_Service_Dependency.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-
ACE_Dynamic_Service_Dependency::ACE_Dynamic_Service_Dependency (const ACE_TCHAR *principal)
{
this->init (ACE_Service_Config::current (), principal);
@@ -23,7 +21,6 @@ ACE_Dynamic_Service_Dependency::ACE_Dynamic_Service_Dependency (const ACE_Servic
this->init (cfg, principal);
}
-
ACE_Dynamic_Service_Dependency::~ACE_Dynamic_Service_Dependency (void)
{
if (ACE::debug ())
@@ -47,6 +44,5 @@ ACE_Dynamic_Service_Dependency::init (const ACE_Service_Gestalt *cfg,
this->tracker_ = st->dll ();
}
-
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/dep/ACE_wrappers/ace/Dynamic_Service_Dependency.h b/dep/ACE_wrappers/ace/Dynamic_Service_Dependency.h
index ce4c1d3e7cd..21e63bb9411 100644
--- a/dep/ACE_wrappers/ace/Dynamic_Service_Dependency.h
+++ b/dep/ACE_wrappers/ace/Dynamic_Service_Dependency.h
@@ -15,7 +15,6 @@
#include /**/ "ace/pre.h"
-
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
@@ -64,7 +63,6 @@ private:
ACE_END_VERSIONED_NAMESPACE_DECL
-
#include /**/ "ace/post.h"
#endif /* ACE_DYNAMIC_SERVICE_DEPENDENCY_H */
diff --git a/dep/ACE_wrappers/ace/Event_Handler.cpp b/dep/ACE_wrappers/ace/Event_Handler.cpp
index 916998eea52..52aa92f99fe 100644
--- a/dep/ACE_wrappers/ace/Event_Handler.cpp
+++ b/dep/ACE_wrappers/ace/Event_Handler.cpp
@@ -145,7 +145,6 @@ ACE_Event_Handler::resume_handler (void)
return ACE_Event_Handler::ACE_REACTOR_RESUMES_HANDLER;
}
-
int
ACE_Event_Handler::handle_qos (ACE_HANDLE)
{
diff --git a/dep/ACE_wrappers/ace/FIFO.h b/dep/ACE_wrappers/ace/FIFO.h
index a1ef6038e35..76090778e8f 100644
--- a/dep/ACE_wrappers/ace/FIFO.h
+++ b/dep/ACE_wrappers/ace/FIFO.h
@@ -10,7 +10,6 @@
*/
//==========================================================================
-
#ifndef ACE_FIFO_H
#define ACE_FIFO_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/FIFO_Recv.h b/dep/ACE_wrappers/ace/FIFO_Recv.h
index 7c9ffbec84e..482b9a1f283 100644
--- a/dep/ACE_wrappers/ace/FIFO_Recv.h
+++ b/dep/ACE_wrappers/ace/FIFO_Recv.h
@@ -10,7 +10,6 @@
*/
//==========================================================================
-
#ifndef ACE_FIFO_RECV_H
#define ACE_FIFO_RECV_H
diff --git a/dep/ACE_wrappers/ace/FIFO_Recv_Msg.h b/dep/ACE_wrappers/ace/FIFO_Recv_Msg.h
index 5490814c56b..c9ce36a1523 100644
--- a/dep/ACE_wrappers/ace/FIFO_Recv_Msg.h
+++ b/dep/ACE_wrappers/ace/FIFO_Recv_Msg.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_FIFO_RECV_MSG_H
#define ACE_FIFO_RECV_MSG_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/FIFO_Recv_Msg.inl b/dep/ACE_wrappers/ace/FIFO_Recv_Msg.inl
index 0a0b0673d38..3055892172b 100644
--- a/dep/ACE_wrappers/ace/FIFO_Recv_Msg.inl
+++ b/dep/ACE_wrappers/ace/FIFO_Recv_Msg.inl
@@ -43,12 +43,12 @@ ACE_FIFO_Recv_Msg::recv (ACE_Str_Buf &recv_msg)
ssize_t recv_len = ACE_OS::read (this->get_handle (),
(char *) recv_msg.buf,
ACE_MIN (remaining, requested));
-
+
if (recv_len == -1)
{
return -1;
}
-
+
// Tell caller what's really in the buffer.
recv_msg.len = static_cast<int> (recv_len);
@@ -60,7 +60,7 @@ ACE_FIFO_Recv_Msg::recv (ACE_Str_Buf &recv_msg)
// saving the indication here either to read the remainder later.
size_t total_msg_size = remaining;
remaining -= recv_len;
-
+
while (remaining > 0)
{
const size_t throw_away = 1024;
@@ -68,15 +68,15 @@ ACE_FIFO_Recv_Msg::recv (ACE_Str_Buf &recv_msg)
recv_len = ACE_OS::read (this->get_handle (),
dev_null,
ACE_MIN (remaining, throw_away));
-
+
if (recv_len == -1)
{
break;
}
-
+
remaining -= recv_len;
}
-
+
return ACE_Utils::truncate_cast<ssize_t> (total_msg_size);
}
#endif /* ACE_HAS_STREAM_PIPES */
@@ -118,7 +118,7 @@ ACE_FIFO_Recv_Msg::recv (int *band,
int *flags)
{
ACE_TRACE ("ACE_FIFO_Recv_Msg::recv");
-
+
if (ACE_OS::getpmsg (this->get_handle (),
(strbuf *) cntl,
(strbuf *) data,
diff --git a/dep/ACE_wrappers/ace/FIFO_Send.h b/dep/ACE_wrappers/ace/FIFO_Send.h
index 7c0928cceaf..414569325d9 100644
--- a/dep/ACE_wrappers/ace/FIFO_Send.h
+++ b/dep/ACE_wrappers/ace/FIFO_Send.h
@@ -10,7 +10,6 @@
*/
//==========================================================================
-
#ifndef ACE_FIFO_SEND_H
#define ACE_FIFO_SEND_H
diff --git a/dep/ACE_wrappers/ace/FIFO_Send_Msg.h b/dep/ACE_wrappers/ace/FIFO_Send_Msg.h
index ff746969156..79314a89ad5 100644
--- a/dep/ACE_wrappers/ace/FIFO_Send_Msg.h
+++ b/dep/ACE_wrappers/ace/FIFO_Send_Msg.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_FIFO_SEND_MSG_H
#define ACE_FIFO_SEND_MSG_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/FILE_Addr.inl b/dep/ACE_wrappers/ace/FILE_Addr.inl
index 0ae7d31d278..b323911e516 100644
--- a/dep/ACE_wrappers/ace/FILE_Addr.inl
+++ b/dep/ACE_wrappers/ace/FILE_Addr.inl
@@ -2,7 +2,6 @@
//
// $Id: FILE_Addr.inl 80826 2008-03-04 14:51:23Z wotte $
-
#include "ace/SString.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
diff --git a/dep/ACE_wrappers/ace/Filecache.cpp b/dep/ACE_wrappers/ace/Filecache.cpp
index cfb70f94f68..b57581e5668 100644
--- a/dep/ACE_wrappers/ace/Filecache.cpp
+++ b/dep/ACE_wrappers/ace/Filecache.cpp
@@ -200,7 +200,6 @@ ACE_Filecache_Hash::equal (const ACE_TCHAR *const &id1,
#undef ACE_Filecache_Hash
#undef ACE_Filecache_Hash_Entry
-
// -------------
// ACE_Filecache
// -------------
@@ -307,7 +306,6 @@ ACE_Filecache::find (const ACE_TCHAR *filename)
return this->hash_.find (filename);
}
-
ACE_Filecache_Object *
ACE_Filecache::remove (const ACE_TCHAR *filename)
{
@@ -330,7 +328,6 @@ ACE_Filecache::remove (const ACE_TCHAR *filename)
return 0;
}
-
ACE_Filecache_Object *
ACE_Filecache::fetch (const ACE_TCHAR *filename, int mapit)
{
diff --git a/dep/ACE_wrappers/ace/Filecache.h b/dep/ACE_wrappers/ace/Filecache.h
index c6dba10f339..126082adc12 100644
--- a/dep/ACE_wrappers/ace/Filecache.h
+++ b/dep/ACE_wrappers/ace/Filecache.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_FILECACHE_H
#define ACE_FILECACHE_H
diff --git a/dep/ACE_wrappers/ace/Functor.cpp b/dep/ACE_wrappers/ace/Functor.cpp
index 618adcf5a61..29db0244aac 100644
--- a/dep/ACE_wrappers/ace/Functor.cpp
+++ b/dep/ACE_wrappers/ace/Functor.cpp
@@ -24,7 +24,6 @@
*/
//=============================================================================
-
#include "ace/Functor_T.h"
#include "ace/Functor.h"
diff --git a/dep/ACE_wrappers/ace/Functor.h b/dep/ACE_wrappers/ace/Functor.h
index d8f393c68b6..bff4cf375b1 100644
--- a/dep/ACE_wrappers/ace/Functor.h
+++ b/dep/ACE_wrappers/ace/Functor.h
@@ -27,7 +27,6 @@
*/
//==========================================================================
-
#ifndef ACE_FUNCTOR_H
#define ACE_FUNCTOR_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Functor.inl b/dep/ACE_wrappers/ace/Functor.inl
index 30e539459a8..c8477c2b8eb 100644
--- a/dep/ACE_wrappers/ace/Functor.inl
+++ b/dep/ACE_wrappers/ace/Functor.inl
@@ -24,7 +24,6 @@
*/
//=============================================================================
-
#include "ace/ACE.h"
#include "ace/OS_NS_string.h"
@@ -238,7 +237,6 @@ ACE_Less_Than<char *>::operator () (const char *lhs, const char *rhs) const
return (ACE_OS::strcmp (lhs, rhs) < 0) ? 1 : 0;
}
-
#if defined (ACE_HAS_WCHAR)
ACE_INLINE unsigned long
diff --git a/dep/ACE_wrappers/ace/Functor_String.h b/dep/ACE_wrappers/ace/Functor_String.h
index 5fabef1f625..6167bd5b5b2 100644
--- a/dep/ACE_wrappers/ace/Functor_String.h
+++ b/dep/ACE_wrappers/ace/Functor_String.h
@@ -53,7 +53,6 @@ public:
const ACE_CString &rhs) const;
};
-
/**
* @class ACE_Hash<ACE_CString>
*
@@ -67,7 +66,6 @@ public:
unsigned long operator () (const ACE_CString &lhs) const;
};
-
/**
* @class ACE_Less_Than<ACE_CString>
*
@@ -83,7 +81,6 @@ public:
const ACE_CString &rhs) const;
};
-
#if defined (ACE_USES_WCHAR)
/**
@@ -100,7 +97,6 @@ public:
const ACE_WString &rhs) const;
};
-
/**
* @class ACE_Hash<ACE_WString>
*
diff --git a/dep/ACE_wrappers/ace/Functor_String.inl b/dep/ACE_wrappers/ace/Functor_String.inl
index bdac96386f8..f4155044fce 100644
--- a/dep/ACE_wrappers/ace/Functor_String.inl
+++ b/dep/ACE_wrappers/ace/Functor_String.inl
@@ -13,7 +13,6 @@ ACE_Hash<ACE_CString>::operator () (const ACE_CString &t) const
return t.hash ();
}
-
ACE_INLINE int
ACE_Equal_To<ACE_CString>::operator () (const ACE_CString &lhs,
const ACE_CString &rhs) const
@@ -28,7 +27,6 @@ ACE_Less_Than<ACE_CString>::operator () (const ACE_CString &lhs,
return (lhs < rhs);
}
-
#if defined (ACE_USES_WCHAR)
ACE_INLINE unsigned long
ACE_Hash<ACE_WString>::operator () (const ACE_WString &t) const
@@ -36,7 +34,6 @@ ACE_Hash<ACE_WString>::operator () (const ACE_WString &t) const
return t.hash ();
}
-
ACE_INLINE int
ACE_Equal_To<ACE_WString>::operator () (const ACE_WString &lhs,
const ACE_WString &rhs) const
diff --git a/dep/ACE_wrappers/ace/Functor_T.h b/dep/ACE_wrappers/ace/Functor_T.h
index 4a3a621366c..13387119f53 100644
--- a/dep/ACE_wrappers/ace/Functor_T.h
+++ b/dep/ACE_wrappers/ace/Functor_T.h
@@ -25,7 +25,6 @@
*/
//=============================================================================
-
#ifndef ACE_FUNCTOR_T_H
#define ACE_FUNCTOR_T_H
#include /**/ "ace/pre.h"
@@ -145,7 +144,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
#include "ace/Functor_T.inl"
#endif /* __ACE_INLINE__ */
-
#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
#include "ace/Functor_T.cpp"
#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
diff --git a/dep/ACE_wrappers/ace/Global_Macros.h b/dep/ACE_wrappers/ace/Global_Macros.h
index 12f6a2465c6..4d8bb016842 100644
--- a/dep/ACE_wrappers/ace/Global_Macros.h
+++ b/dep/ACE_wrappers/ace/Global_Macros.h
@@ -462,7 +462,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
while (0)
# endif /* defined ! ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR */
-
/*******************************************************************/
/// Service Objects, i.e., objects dynamically loaded via the service
@@ -621,7 +620,6 @@ static ACE_Static_Svc_##SERVICE_CLASS ace_static_svc_##SERVICE_CLASS;
#define ACE_MAKE_SVC_CONFIG_FACTORY_NAME(VERSIONED_NAMESPACE,SERVICE_CLASS) ACE_MAKE_SVC_CONFIG_FUNCTION_NAME(_make,VERSIONED_NAMESPACE,SERVICE_CLASS)
#define ACE_MAKE_SVC_CONFIG_GOBBLER_NAME(VERSIONED_NAMESPACE,SERVICE_CLASS) ACE_MAKE_SVC_CONFIG_FUNCTION_NAME(_gobble,VERSIONED_NAMESPACE,SERVICE_CLASS)
-
/// Declare the factory method used to create dynamically loadable
/// services.
/**
@@ -838,7 +836,6 @@ ACE_MAKE_SVC_CONFIG_FACTORY_NAME(ACE_VERSIONED_NAMESPACE_NAME,SERVICE_CLASS) (AC
# endif /* !defined PIPE_TYPE_MESSAGE */
#endif /* ACE_WIN32 */
-
// Some useful abstrations for expressions involving
// ACE_Allocator.malloc (). The difference between ACE_NEW_MALLOC*
// with ACE_ALLOCATOR* is that they call constructors also.
diff --git a/dep/ACE_wrappers/ace/Handle_Gobbler.h b/dep/ACE_wrappers/ace/Handle_Gobbler.h
index 9e9805a676f..ed7107a6302 100644
--- a/dep/ACE_wrappers/ace/Handle_Gobbler.h
+++ b/dep/ACE_wrappers/ace/Handle_Gobbler.h
@@ -11,7 +11,6 @@
*/
//=============================================================================
-
#ifndef ACE_HANDLE_GOBBLER_H
#define ACE_HANDLE_GOBBLER_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Handle_Ops.cpp b/dep/ACE_wrappers/ace/Handle_Ops.cpp
index 213fa933d7a..ed19109b445 100644
--- a/dep/ACE_wrappers/ace/Handle_Ops.cpp
+++ b/dep/ACE_wrappers/ace/Handle_Ops.cpp
@@ -10,7 +10,6 @@ ACE_RCSID (ace,
Handle_Ops,
"$Id: Handle_Ops.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_HANDLE
diff --git a/dep/ACE_wrappers/ace/Handle_Set.cpp b/dep/ACE_wrappers/ace/Handle_Set.cpp
index 288d0010169..cb460dcb798 100644
--- a/dep/ACE_wrappers/ace/Handle_Set.cpp
+++ b/dep/ACE_wrappers/ace/Handle_Set.cpp
@@ -499,7 +499,6 @@ ACE_Handle_Set_Iterator::ACE_Handle_Set_Iterator (const ACE_Handle_Set &hs)
#endif /* !ACE_WIN32 && !ACE_HAS_BIG_FD_SET */
}
-
void
ACE_Handle_Set_Iterator::reset_state (void)
{
diff --git a/dep/ACE_wrappers/ace/Hash_Cache_Map_Manager_T.h b/dep/ACE_wrappers/ace/Hash_Cache_Map_Manager_T.h
index 5326c97d33f..8fa9703d5b4 100644
--- a/dep/ACE_wrappers/ace/Hash_Cache_Map_Manager_T.h
+++ b/dep/ACE_wrappers/ace/Hash_Cache_Map_Manager_T.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef HASH_CACHE_MAP_MANAGER_T_H
#define HASH_CACHE_MAP_MANAGER_T_H
@@ -196,7 +195,6 @@ protected:
ACE_END_VERSIONED_NAMESPACE_DECL
-
#if defined (__ACE_INLINE__)
#include "ace/Hash_Cache_Map_Manager_T.inl"
#endif /* __ACE_INLINE__ */
diff --git a/dep/ACE_wrappers/ace/Hash_Map_With_Allocator_T.h b/dep/ACE_wrappers/ace/Hash_Map_With_Allocator_T.h
index cb42eee5929..2bc68aede25 100644
--- a/dep/ACE_wrappers/ace/Hash_Map_With_Allocator_T.h
+++ b/dep/ACE_wrappers/ace/Hash_Map_With_Allocator_T.h
@@ -107,7 +107,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
#pragma implementation ("Hash_Map_With_Allocator_T.cpp")
#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
#include /**/ "ace/post.h"
#endif /* ACE_HASH_MAP_WITH_ALLOCATOR_T_H */
diff --git a/dep/ACE_wrappers/ace/Hashable.cpp b/dep/ACE_wrappers/ace/Hashable.cpp
index c3c9bc43a1a..07723697b28 100644
--- a/dep/ACE_wrappers/ace/Hashable.cpp
+++ b/dep/ACE_wrappers/ace/Hashable.cpp
@@ -6,12 +6,10 @@
#include "ace/Hashable.inl"
#endif /* __ACE_INLINE __ */
-
ACE_RCSID (ace,
Hashable,
"$Id: Hashable.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_Hashable::~ACE_Hashable (void)
diff --git a/dep/ACE_wrappers/ace/Hashable.inl b/dep/ACE_wrappers/ace/Hashable.inl
index 352b7794eb9..c279e515f32 100644
--- a/dep/ACE_wrappers/ace/Hashable.inl
+++ b/dep/ACE_wrappers/ace/Hashable.inl
@@ -2,7 +2,6 @@
//
// $Id: Hashable.inl 80826 2008-03-04 14:51:23Z wotte $
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE
diff --git a/dep/ACE_wrappers/ace/High_Res_Timer.cpp b/dep/ACE_wrappers/ace/High_Res_Timer.cpp
index 181c1da5682..03b9d643418 100644
--- a/dep/ACE_wrappers/ace/High_Res_Timer.cpp
+++ b/dep/ACE_wrappers/ace/High_Res_Timer.cpp
@@ -74,7 +74,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
/* static */
int ACE_High_Res_Timer::global_scale_factor_status_ = 0;
-
#if defined (linux)
// Determine the apparent CPU clock speed from /proc/cpuinfo
ACE_UINT32
diff --git a/dep/ACE_wrappers/ace/High_Res_Timer.inl b/dep/ACE_wrappers/ace/High_Res_Timer.inl
index 85df18abe8b..7a20845e496 100644
--- a/dep/ACE_wrappers/ace/High_Res_Timer.inl
+++ b/dep/ACE_wrappers/ace/High_Res_Timer.inl
@@ -38,7 +38,6 @@ ACE_High_Res_Timer::hrtime_to_tv (ACE_Time_Value &tv,
tv.usec ((long) ((hrt - tmp) / global_scale_factor ()));
}
-
ACE_INLINE ACE_Time_Value
ACE_High_Res_Timer::gettimeofday (const ACE_OS::ACE_HRTimer_Op op)
{
@@ -57,7 +56,6 @@ ACE_High_Res_Timer::gettimeofday (const ACE_OS::ACE_HRTimer_Op op)
return tv;
}
-
// Get the current high res timer as the time of day. This is intended
// to be used for a gettimeofday replacement in ACE_Timer_Queue and
// derived classes so the timers will bebased on high res timers rather
@@ -70,7 +68,6 @@ ACE_High_Res_Timer::gettimeofday_hr (void)
return ACE_High_Res_Timer::gettimeofday ();
}
-
ACE_INLINE ACE_hrtime_t
ACE_High_Res_Timer::gettime (const ACE_OS::ACE_HRTimer_Op op)
{
diff --git a/dep/ACE_wrappers/ace/ICMP_Socket.cpp b/dep/ACE_wrappers/ace/ICMP_Socket.cpp
index 51f8a9b2064..8274805d4ec 100644
--- a/dep/ACE_wrappers/ace/ICMP_Socket.cpp
+++ b/dep/ACE_wrappers/ace/ICMP_Socket.cpp
@@ -9,17 +9,14 @@
#include "ace/OS_NS_netdb.h"
#include "ace/OS_NS_sys_socket.h"
-
ACE_RCSID (ace,
ICMP_Socket,
"$Id: ICMP_Socket.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE (ACE_ICMP_Socket)
-
void
ACE_ICMP_Socket::dump (void) const
{
diff --git a/dep/ACE_wrappers/ace/INET_Addr.cpp b/dep/ACE_wrappers/ace/INET_Addr.cpp
index 6da4417f08e..20b7bbb382f 100644
--- a/dep/ACE_wrappers/ace/INET_Addr.cpp
+++ b/dep/ACE_wrappers/ace/INET_Addr.cpp
@@ -142,7 +142,6 @@ ACE_INET_Addr::is_ip_equal (const ACE_INET_Addr &sap) const
return this->get_ip_address () == sap.get_ip_address();
}
-
u_long
ACE_INET_Addr::hash (void) const
{
@@ -314,7 +313,6 @@ ACE_INET_Addr::set (u_short port_number,
return 0;
}
-
// Initializes a ACE_INET_Addr from a PORT_NUMBER and the remote
// HOST_NAME.
@@ -947,7 +945,6 @@ int ACE_INET_Addr::set_address (const char *ip_addr,
if (encode)
ip4 = ACE_HTONL (ip4);
-
if (this->get_type () == AF_INET && map == 0) {
this->base_set (AF_INET, sizeof (this->inet_addr_.in4_));
#ifdef ACE_HAS_SOCKADDR_IN_SIN_LEN
diff --git a/dep/ACE_wrappers/ace/INET_Addr.inl b/dep/ACE_wrappers/ace/INET_Addr.inl
index 4cd9d404b82..e17048e0142 100644
--- a/dep/ACE_wrappers/ace/INET_Addr.inl
+++ b/dep/ACE_wrappers/ace/INET_Addr.inl
@@ -2,7 +2,6 @@
//
// $Id: INET_Addr.inl 80826 2008-03-04 14:51:23Z wotte $
-
#include "ace/OS_NS_string.h"
#include "ace/Global_Macros.h"
#include "ace/OS_NS_arpa_inet.h"
diff --git a/dep/ACE_wrappers/ace/IOStream.cpp b/dep/ACE_wrappers/ace/IOStream.cpp
index 0b6ac17ca6f..4fc8e851212 100644
--- a/dep/ACE_wrappers/ace/IOStream.cpp
+++ b/dep/ACE_wrappers/ace/IOStream.cpp
@@ -48,7 +48,6 @@ ACE_RCSID(ace, IOStream, "$Id: IOStream.cpp 80826 2008-03-04 14:51:23Z wotte $")
// a reference to iostream. The second >> has no idea of the ACE_IOStream and
// gets invoked on iostream. Probably NOT what you wanted!
-
// In order to make all of this work the way you want, you have to do this:
class myiostream : public iostream
@@ -79,7 +78,6 @@ ACE_RCSID(ace, IOStream, "$Id: IOStream.cpp 80826 2008-03-04 14:51:23Z wotte $")
// OK
// invokes myiostream::operator>> (int&) returning myiostream&
-
foo >> i >> s;
// OK
// Because you provided operator>> (int&) in class myiostream, that
diff --git a/dep/ACE_wrappers/ace/IOStream.h b/dep/ACE_wrappers/ace/IOStream.h
index d7995a8e4f6..be66c857962 100644
--- a/dep/ACE_wrappers/ace/IOStream.h
+++ b/dep/ACE_wrappers/ace/IOStream.h
@@ -427,7 +427,6 @@ typedef ostream& (*__omanip_)(ostream&);
#define PUT_PROT(MT,DT,CODE) PUT_SIG(MT,DT) CODE
#define PUT_FUNC(MT,DT) PUT_PROT(MT,DT,PUT_CODE)
-
// These are necessary in case somebody wants to derive from us and
// override one of these with a custom approach.
diff --git a/dep/ACE_wrappers/ace/IO_Cntl_Msg.h b/dep/ACE_wrappers/ace/IO_Cntl_Msg.h
index e99d0189620..fafc1fc7e1a 100644
--- a/dep/ACE_wrappers/ace/IO_Cntl_Msg.h
+++ b/dep/ACE_wrappers/ace/IO_Cntl_Msg.h
@@ -10,7 +10,6 @@
*/
//==========================================================================
-
#ifndef ACE_IO_CNTL_MSG_H
#define ACE_IO_CNTL_MSG_H
diff --git a/dep/ACE_wrappers/ace/IO_SAP.h b/dep/ACE_wrappers/ace/IO_SAP.h
index 94f717c7981..a9826995195 100644
--- a/dep/ACE_wrappers/ace/IO_SAP.h
+++ b/dep/ACE_wrappers/ace/IO_SAP.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_IO_SAP_H
#define ACE_IO_SAP_H
#include /**/ "ace/pre.h"
@@ -22,7 +21,6 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
/**
diff --git a/dep/ACE_wrappers/ace/Init_ACE.cpp b/dep/ACE_wrappers/ace/Init_ACE.cpp
index 655ef539d6f..a71f73b5992 100644
--- a/dep/ACE_wrappers/ace/Init_ACE.cpp
+++ b/dep/ACE_wrappers/ace/Init_ACE.cpp
@@ -6,7 +6,6 @@ ACE_RCSID (ace,
Init_ACE,
"$Id: Init_ACE.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
unsigned int ACE::init_fini_count_ = 0;
diff --git a/dep/ACE_wrappers/ace/Init_ACE.h b/dep/ACE_wrappers/ace/Init_ACE.h
index 9f2afa34669..cc3f5aa6b66 100644
--- a/dep/ACE_wrappers/ace/Init_ACE.h
+++ b/dep/ACE_wrappers/ace/Init_ACE.h
@@ -11,7 +11,6 @@
*/
//=============================================================================
-
#ifndef ACE_INIT_ACE_H
#define ACE_INIT_ACE_H
diff --git a/dep/ACE_wrappers/ace/Intrusive_Auto_Ptr.h b/dep/ACE_wrappers/ace/Intrusive_Auto_Ptr.h
index 85d52f7f1c5..375ec292527 100644
--- a/dep/ACE_wrappers/ace/Intrusive_Auto_Ptr.h
+++ b/dep/ACE_wrappers/ace/Intrusive_Auto_Ptr.h
@@ -63,7 +63,6 @@ public:
return rep_ == 0 ? 0: unspecified_bool;
}
-
// = Initialization and termination methods.
/// Constructor that initializes an ACE_Intrusive_Auto_Ptr to
diff --git a/dep/ACE_wrappers/ace/Intrusive_Auto_Ptr.inl b/dep/ACE_wrappers/ace/Intrusive_Auto_Ptr.inl
index 4feb83db7b1..aa3e2659930 100644
--- a/dep/ACE_wrappers/ace/Intrusive_Auto_Ptr.inl
+++ b/dep/ACE_wrappers/ace/Intrusive_Auto_Ptr.inl
@@ -143,5 +143,4 @@ template<class T, class U> ACE_INLINE bool operator==(ACE_Intrusive_Auto_Ptr<T>
return a != b.get();
}
-
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/dep/ACE_wrappers/ace/LOCK_SOCK_Acceptor.h b/dep/ACE_wrappers/ace/LOCK_SOCK_Acceptor.h
index 6429a2888c8..1271b1d9060 100644
--- a/dep/ACE_wrappers/ace/LOCK_SOCK_Acceptor.h
+++ b/dep/ACE_wrappers/ace/LOCK_SOCK_Acceptor.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_LOCK_SOCK_ACCEPTOR_H
#define ACE_LOCK_SOCK_ACCEPTOR_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/LSOCK.h b/dep/ACE_wrappers/ace/LSOCK.h
index 250362cdaef..caec4362e0c 100644
--- a/dep/ACE_wrappers/ace/LSOCK.h
+++ b/dep/ACE_wrappers/ace/LSOCK.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_LOCAL_SOCK_H
#define ACE_LOCAL_SOCK_H
diff --git a/dep/ACE_wrappers/ace/LSOCK_Acceptor.h b/dep/ACE_wrappers/ace/LSOCK_Acceptor.h
index 1168c389ab6..625f8f72853 100644
--- a/dep/ACE_wrappers/ace/LSOCK_Acceptor.h
+++ b/dep/ACE_wrappers/ace/LSOCK_Acceptor.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_LOCAL_SOCK_ACCEPTOR_H
#define ACE_LOCAL_SOCK_ACCEPTOR_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/LSOCK_CODgram.h b/dep/ACE_wrappers/ace/LSOCK_CODgram.h
index 1ea5ba00386..48fb9c63bcf 100644
--- a/dep/ACE_wrappers/ace/LSOCK_CODgram.h
+++ b/dep/ACE_wrappers/ace/LSOCK_CODgram.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_LOCAL_SOCK_CODGRAM_H
#define ACE_LOCAL_SOCK_CODGRAM_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/LSOCK_Dgram.h b/dep/ACE_wrappers/ace/LSOCK_Dgram.h
index 17fad2b7b43..26a3950a726 100644
--- a/dep/ACE_wrappers/ace/LSOCK_Dgram.h
+++ b/dep/ACE_wrappers/ace/LSOCK_Dgram.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_LOCAL_SOCK_DGRAM_H
#define ACE_LOCAL_SOCK_DGRAM_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/LSOCK_Stream.h b/dep/ACE_wrappers/ace/LSOCK_Stream.h
index e95641ba725..41bb5311d94 100644
--- a/dep/ACE_wrappers/ace/LSOCK_Stream.h
+++ b/dep/ACE_wrappers/ace/LSOCK_Stream.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_LOCAL_SOCK_STREAM_H
#define ACE_LOCAL_SOCK_STREAM_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Lib_Find.cpp b/dep/ACE_wrappers/ace/Lib_Find.cpp
index 3654751bb58..e39b27c6c9d 100644
--- a/dep/ACE_wrappers/ace/Lib_Find.cpp
+++ b/dep/ACE_wrappers/ace/Lib_Find.cpp
@@ -165,7 +165,6 @@ ACE::ldfind (const ACE_TCHAR* filename,
return -1;
}
-
ACE_OS::strcpy(pathname, ACE_DLL_PREFIX);
ACE_OS::strcat(pathname, filename);
nameDsc.dsc$w_length = ACE_OS::strlen(pathname);
@@ -438,7 +437,7 @@ ACE::ldfind (const ACE_TCHAR* filename,
nextholder);
int result = 0;
- for (;;)
+ for (; ; )
{
// Check if at end of search path.
if (path_entry == 0)
@@ -677,7 +676,6 @@ ACE::strrepl (char *s, char search, char replace)
return replaced;
}
-
// Split a string up into 'token'-delimited pieces, ala Perl's
// "split".
diff --git a/dep/ACE_wrappers/ace/Lib_Find.h b/dep/ACE_wrappers/ace/Lib_Find.h
index 1651eb77f43..05bd068fdb3 100644
--- a/dep/ACE_wrappers/ace/Lib_Find.h
+++ b/dep/ACE_wrappers/ace/Lib_Find.h
@@ -59,7 +59,6 @@ namespace ACE
*/
extern ACE_Export ACE_TCHAR *ldname (const ACE_TCHAR *entry_point);
-
#if defined (ACE_OPENVMS)
/**
* Registers an @a entry_point and its address for later retrieval
diff --git a/dep/ACE_wrappers/ace/Local_Name_Space_T.h b/dep/ACE_wrappers/ace/Local_Name_Space_T.h
index 1263cebd5ab..a8d556a4eb1 100644
--- a/dep/ACE_wrappers/ace/Local_Name_Space_T.h
+++ b/dep/ACE_wrappers/ace/Local_Name_Space_T.h
@@ -54,7 +54,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
typedef MAP_MANAGER::ITERATOR MAP_ITERATOR;
typedef MAP_MANAGER::ENTRY MAP_ENTRY;
-
/**
* @class ACE_Name_Space_Map
*
diff --git a/dep/ACE_wrappers/ace/Local_Tokens.cpp b/dep/ACE_wrappers/ace/Local_Tokens.cpp
index 2fc6eed1acf..248f7dee9c0 100644
--- a/dep/ACE_wrappers/ace/Local_Tokens.cpp
+++ b/dep/ACE_wrappers/ace/Local_Tokens.cpp
@@ -12,7 +12,6 @@
#include "ace/Local_Tokens.inl"
#endif /* __ACE_INLINE__ */
-
ACE_RCSID (ace,
Local_Tokens,
"$Id: Local_Tokens.cpp 80826 2008-03-04 14:51:23Z wotte $")
@@ -869,7 +868,6 @@ ACE_RW_Token::tryacquire (ACE_TPQ_Entry *caller)
this->num_writers_--;
}
-
errno = EWOULDBLOCK;
ACE_RETURN (-1);
@@ -986,7 +984,6 @@ ACE_RW_Token::notify_new_owner (ACE_TPQ_Entry *old_owner)
this->owner ()->proxy ()->token_acquired (this->owner ());
}
-
int
ACE_RW_Token::owners (OWNER_STACK &stack,
const ACE_TCHAR *id)
diff --git a/dep/ACE_wrappers/ace/Local_Tokens.inl b/dep/ACE_wrappers/ace/Local_Tokens.inl
index 56b3cb764e2..3d59893f3cf 100644
--- a/dep/ACE_wrappers/ace/Local_Tokens.inl
+++ b/dep/ACE_wrappers/ace/Local_Tokens.inl
@@ -264,7 +264,6 @@ ACE_Local_WLock::ACE_Local_WLock (const ACE_TCHAR *token_name,
// ************************************************************
-
ACE_INLINE void
ACE_Token_Name::operator= (const ACE_Token_Name &rhs)
{
diff --git a/dep/ACE_wrappers/ace/Log_Msg.cpp b/dep/ACE_wrappers/ace/Log_Msg.cpp
index 1fe455c56c3..4040a4b1978 100644
--- a/dep/ACE_wrappers/ace/Log_Msg.cpp
+++ b/dep/ACE_wrappers/ace/Log_Msg.cpp
@@ -2005,7 +2005,6 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str,
break;
}
-
default:
// So, it's not a legit format specifier after all...
// Copy from the original % to where we are now, then
@@ -2175,7 +2174,6 @@ ACE_Log_Msg::log (ACE_Log_Record &log_record,
ACE_MT (ACE_Log_Msg_Manager::init_backend ());
}
-
if (ACE_BIT_ENABLED (ACE_Log_Msg::flags_, ACE_Log_Msg::LOGGER) ||
ACE_BIT_ENABLED (ACE_Log_Msg::flags_, ACE_Log_Msg::SYSLOG))
{
@@ -2190,7 +2188,6 @@ ACE_Log_Msg::log (ACE_Log_Record &log_record,
ACE_Log_Msg_Manager::custom_backend_->log (log_record);
}
-
// This must come last, after the other two print operations
// (see the <ACE_Log_Record::print> method for details).
if (ACE_BIT_ENABLED (ACE_Log_Msg::flags_,
diff --git a/dep/ACE_wrappers/ace/Log_Msg.h b/dep/ACE_wrappers/ace/Log_Msg.h
index f799a6500ae..3c5eb5e2f23 100644
--- a/dep/ACE_wrappers/ace/Log_Msg.h
+++ b/dep/ACE_wrappers/ace/Log_Msg.h
@@ -728,7 +728,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# define ACE_TSS_CLEANUP_NAME ACE_TSS_cleanup
#endif /* ACE_HAS_VERSIONED_NAMESPACE == 1 */
-
LOCAL_EXTERN_PREFIX
void
ACE_TSS_CLEANUP_NAME (void *ptr);
diff --git a/dep/ACE_wrappers/ace/Log_Msg.inl b/dep/ACE_wrappers/ace/Log_Msg.inl
index 2af6a376b35..e69b59140c7 100644
--- a/dep/ACE_wrappers/ace/Log_Msg.inl
+++ b/dep/ACE_wrappers/ace/Log_Msg.inl
@@ -229,7 +229,5 @@ ACE_Log_Msg::getpid (void) const
return ACE_Log_Msg::pid_;
}
-
-
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/dep/ACE_wrappers/ace/Log_Msg_Backend.cpp b/dep/ACE_wrappers/ace/Log_Msg_Backend.cpp
index f8ed295fec5..8f7e930ae0d 100644
--- a/dep/ACE_wrappers/ace/Log_Msg_Backend.cpp
+++ b/dep/ACE_wrappers/ace/Log_Msg_Backend.cpp
@@ -4,7 +4,6 @@
ACE_RCSID(ace, Log_Msg_Backend, "$Id: Log_Msg_Backend.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_Log_Msg_Backend::~ACE_Log_Msg_Backend (void)
diff --git a/dep/ACE_wrappers/ace/Log_Msg_Backend.h b/dep/ACE_wrappers/ace/Log_Msg_Backend.h
index f9de2b8bf5b..84e4956f36b 100644
--- a/dep/ACE_wrappers/ace/Log_Msg_Backend.h
+++ b/dep/ACE_wrappers/ace/Log_Msg_Backend.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_LOG_MSG_BACKEND_H
#define ACE_LOG_MSG_BACKEND_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Log_Msg_Callback.cpp b/dep/ACE_wrappers/ace/Log_Msg_Callback.cpp
index b227843733d..7d1a57d5f4a 100644
--- a/dep/ACE_wrappers/ace/Log_Msg_Callback.cpp
+++ b/dep/ACE_wrappers/ace/Log_Msg_Callback.cpp
@@ -4,7 +4,6 @@
ACE_RCSID(ace, Log_Msg_Callback, "$Id: Log_Msg_Callback.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_Log_Msg_Callback::~ACE_Log_Msg_Callback (void)
diff --git a/dep/ACE_wrappers/ace/Log_Record.h b/dep/ACE_wrappers/ace/Log_Record.h
index be3e0b29e1e..0a19e1f57c4 100644
--- a/dep/ACE_wrappers/ace/Log_Record.h
+++ b/dep/ACE_wrappers/ace/Log_Record.h
@@ -70,7 +70,6 @@ public:
/// Default dtor.
~ACE_Log_Record (void);
-
/// Write the contents of the logging record to the appropriate
/// <FILE> iff the corresponding type is enabled.
int print (const ACE_TCHAR host_name[],
diff --git a/dep/ACE_wrappers/ace/Logging_Strategy.cpp b/dep/ACE_wrappers/ace/Logging_Strategy.cpp
index 36f2726db51..01c3cd5bc40 100644
--- a/dep/ACE_wrappers/ace/Logging_Strategy.cpp
+++ b/dep/ACE_wrappers/ace/Logging_Strategy.cpp
@@ -484,7 +484,7 @@ ACE_Logging_Strategy::handle_timeout (const ACE_Time_Value &,
else
max_num = count_;
- for (int i = max_num ; i > 1 ;i--)
+ for (int i = max_num ; i > 1 ; i--)
{
ACE_OS::sprintf (backup,
ACE_TEXT ("%s.%d"),
diff --git a/dep/ACE_wrappers/ace/MEM_Addr.h b/dep/ACE_wrappers/ace/MEM_Addr.h
index be67b507982..fa7da740f5d 100644
--- a/dep/ACE_wrappers/ace/MEM_Addr.h
+++ b/dep/ACE_wrappers/ace/MEM_Addr.h
@@ -10,7 +10,6 @@
*/
//==========================================================================
-
#ifndef ACE_MEM_ADDR_H
#define ACE_MEM_ADDR_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/MEM_Addr.inl b/dep/ACE_wrappers/ace/MEM_Addr.inl
index ef19536dfe9..3d7a4235f07 100644
--- a/dep/ACE_wrappers/ace/MEM_Addr.inl
+++ b/dep/ACE_wrappers/ace/MEM_Addr.inl
@@ -2,7 +2,6 @@
//
// $Id: MEM_Addr.inl 80826 2008-03-04 14:51:23Z wotte $
-
#include "ace/Global_Macros.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
diff --git a/dep/ACE_wrappers/ace/MEM_Connector.cpp b/dep/ACE_wrappers/ace/MEM_Connector.cpp
index 21b8d94fa3a..7a8d94e7b2b 100644
--- a/dep/ACE_wrappers/ace/MEM_Connector.cpp
+++ b/dep/ACE_wrappers/ace/MEM_Connector.cpp
@@ -81,7 +81,6 @@ ACE_MEM_Connector::connect (ACE_MEM_Stream &new_stream,
else
this->address_.set_port_number (remote_sap.get_port_number ());
-
ACE_SOCK_Stream temp_stream;
if (ACE_SOCK_Connector::connect (temp_stream,
@@ -93,7 +92,6 @@ ACE_MEM_Connector::connect (ACE_MEM_Stream &new_stream,
ACE_TEXT ("ACE_MEM_Connector::connect")),
-1);
-
ACE_HANDLE new_handle = temp_stream.get_handle ();
new_stream.set_handle (new_handle);
new_stream.disable (ACE_NONBLOCK);
diff --git a/dep/ACE_wrappers/ace/MEM_IO.cpp b/dep/ACE_wrappers/ace/MEM_IO.cpp
index b1c31619354..8c4db2871c7 100644
--- a/dep/ACE_wrappers/ace/MEM_IO.cpp
+++ b/dep/ACE_wrappers/ace/MEM_IO.cpp
@@ -433,7 +433,6 @@ ACE_MEM_IO::send (const ACE_Message_Block *message_block,
return 0;
}
-
#if 0
ssize_t
ACE_MEM_IO::recvv (iovec *io_vec,
diff --git a/dep/ACE_wrappers/ace/MEM_IO.h b/dep/ACE_wrappers/ace/MEM_IO.h
index bbea3b3936d..5c05bdc444c 100644
--- a/dep/ACE_wrappers/ace/MEM_IO.h
+++ b/dep/ACE_wrappers/ace/MEM_IO.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_MEM_IO_H
#define ACE_MEM_IO_H
#include /**/ "ace/pre.h"
@@ -29,7 +28,6 @@
#include "ace/Process_Semaphore.h"
#include "ace/Process_Mutex.h"
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Export ACE_Reactive_MEM_IO : public ACE_MEM_SAP
@@ -266,7 +264,6 @@ public:
int flags,
const ACE_Time_Value *timeout);
-
/// Dump the state of an object.
void dump (void) const;
diff --git a/dep/ACE_wrappers/ace/MEM_IO.inl b/dep/ACE_wrappers/ace/MEM_IO.inl
index e3ec07fc5ce..7e24f74a1eb 100644
--- a/dep/ACE_wrappers/ace/MEM_IO.inl
+++ b/dep/ACE_wrappers/ace/MEM_IO.inl
@@ -129,7 +129,7 @@ ACE_MEM_IO::send (const void *buf,
const ACE_Time_Value *timeout)
{
ACE_TRACE ("ACE_MEM_IO::send");
-
+
if (this->deliver_strategy_ == 0)
{
return 0;
@@ -138,12 +138,12 @@ ACE_MEM_IO::send (const void *buf,
ACE_MEM_SAP_Node *sbuf =
this->deliver_strategy_->acquire_buffer (
ACE_Utils::truncate_cast<ssize_t> (len));
-
+
if (sbuf == 0)
{
return -1; // Memory buffer not initialized.
}
-
+
ACE_OS::memcpy (sbuf->data (), buf, len);
///
@@ -166,17 +166,17 @@ ACE_MEM_IO::recv (void *buf,
size_t count = 0;
size_t buf_len = this->buf_size_ - this->cur_offset_;
-
+
if (buf_len == 0)
{
ssize_t blen = // Buffer length
this->fetch_recv_buf (flags, timeout);
-
+
if (blen <= 0)
{
return blen;
}
-
+
buf_len = this->buf_size_;
}
diff --git a/dep/ACE_wrappers/ace/MEM_SAP.inl b/dep/ACE_wrappers/ace/MEM_SAP.inl
index a006fdc1179..94339ac2d78 100644
--- a/dep/ACE_wrappers/ace/MEM_SAP.inl
+++ b/dep/ACE_wrappers/ace/MEM_SAP.inl
@@ -32,7 +32,6 @@ ACE_MEM_SAP_Node::data (void)
return this + 1;
}
-
ACE_INLINE ACE_MEM_SAP_Node *
ACE_MEM_SAP::acquire_buffer (const ssize_t size)
{
diff --git a/dep/ACE_wrappers/ace/MEM_Stream.h b/dep/ACE_wrappers/ace/MEM_Stream.h
index 7148e9f15ad..0a50cabfe94 100644
--- a/dep/ACE_wrappers/ace/MEM_Stream.h
+++ b/dep/ACE_wrappers/ace/MEM_Stream.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_MEM_STREAM_H
#define ACE_MEM_STREAM_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/MEM_Stream.inl b/dep/ACE_wrappers/ace/MEM_Stream.inl
index e995db5c5f9..1e965aff1b5 100644
--- a/dep/ACE_wrappers/ace/MEM_Stream.inl
+++ b/dep/ACE_wrappers/ace/MEM_Stream.inl
@@ -54,7 +54,6 @@ ACE_MEM_Stream::send_n (const void *buf, size_t n)
return this->send (buf, n);
}
-
ACE_INLINE ssize_t
ACE_MEM_Stream::recv_n (void *buf, size_t n)
{
diff --git a/dep/ACE_wrappers/ace/MMAP_Memory_Pool.cpp b/dep/ACE_wrappers/ace/MMAP_Memory_Pool.cpp
index f323d111a1b..772bb538bc7 100644
--- a/dep/ACE_wrappers/ace/MMAP_Memory_Pool.cpp
+++ b/dep/ACE_wrappers/ace/MMAP_Memory_Pool.cpp
@@ -102,7 +102,6 @@ ACE_MMAP_Memory_Pool::protect (int prot)
return this->mmap_.protect (len, prot);
}
-
// Change the protection of the pages of the mapped region to <prot>
// starting at <addr> up to <len> bytes.
diff --git a/dep/ACE_wrappers/ace/Malloc.cpp b/dep/ACE_wrappers/ace/Malloc.cpp
index b9684654c10..1d6fb1fd83b 100644
--- a/dep/ACE_wrappers/ace/Malloc.cpp
+++ b/dep/ACE_wrappers/ace/Malloc.cpp
@@ -10,12 +10,10 @@
#include "ace/Malloc_Base.h"
#include "ace/OS_NS_string.h"
-
ACE_RCSID (ace,
Malloc,
"$Id: Malloc.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
// Process-wide ACE_Allocator.
@@ -153,7 +151,6 @@ ACE_Control_Block::ACE_Name_Node::dump (void) const
#endif /* ACE_HAS_DUMP */
}
-
#if defined (ACE_HAS_MALLOC_STATS)
ACE_Malloc_Stats::ACE_Malloc_Stats (void)
: nchunks_ (0),
diff --git a/dep/ACE_wrappers/ace/Malloc.h b/dep/ACE_wrappers/ace/Malloc.h
index 5974f012652..4fd88802933 100644
--- a/dep/ACE_wrappers/ace/Malloc.h
+++ b/dep/ACE_wrappers/ace/Malloc.h
@@ -33,7 +33,6 @@
# define ACE_PROCESS_MUTEX ACE_SV_Semaphore_Simple
# endif /* ACE_HAS_THREADS */
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
typedef ACE_Atomic_Op<ACE_PROCESS_MUTEX, int> ACE_INT;
@@ -96,7 +95,6 @@ typedef ACE_Atomic_Op<ACE_PROCESS_MUTEX, int> ACE_INT;
| // Name Node linked list pointers. |
+-----------------------------------------+
-
* Control_Block
Only the first ACE_Malloc instance that uses
@@ -147,7 +145,6 @@ typedef ACE_Atomic_Op<ACE_PROCESS_MUTEX, int> ACE_INT;
than the sizeof Control_Block, the control block is initialized to
the following diagram:
-
+-------------------------------------
|name_head_; |
+-------------------------------------+
diff --git a/dep/ACE_wrappers/ace/Malloc_Base.h b/dep/ACE_wrappers/ace/Malloc_Base.h
index 7cd204064bb..42feebbc41f 100644
--- a/dep/ACE_wrappers/ace/Malloc_Base.h
+++ b/dep/ACE_wrappers/ace/Malloc_Base.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_MALLOC_BASE_H
#define ACE_MALLOC_BASE_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Malloc_T.inl b/dep/ACE_wrappers/ace/Malloc_T.inl
index 46f6c0c146b..ffc20dfbe51 100644
--- a/dep/ACE_wrappers/ace/Malloc_T.inl
+++ b/dep/ACE_wrappers/ace/Malloc_T.inl
@@ -168,7 +168,6 @@ ACE_Malloc_FIFO_Iterator<ACE_MEM_POOL_2, ACE_LOCK>::ACE_Malloc_FIFO_Iterator (AC
{
}
-
#if 0
template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> ACE_INLINE void
ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::init_malloc_header_ptr (void* ptr)
diff --git a/dep/ACE_wrappers/ace/Manual_Event.cpp b/dep/ACE_wrappers/ace/Manual_Event.cpp
index 33183c53f4d..504b061a8e9 100644
--- a/dep/ACE_wrappers/ace/Manual_Event.cpp
+++ b/dep/ACE_wrappers/ace/Manual_Event.cpp
@@ -6,7 +6,6 @@
#include "ace/Manual_Event.inl"
#endif /* __ACE_INLINE__ */
-
ACE_RCSID(ace, Manual_Event, "$Id: Manual_Event.cpp 80826 2008-03-04 14:51:23Z wotte $")
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
diff --git a/dep/ACE_wrappers/ace/Manual_Event.h b/dep/ACE_wrappers/ace/Manual_Event.h
index 6a46535e6c5..ff7774f59fc 100644
--- a/dep/ACE_wrappers/ace/Manual_Event.h
+++ b/dep/ACE_wrappers/ace/Manual_Event.h
@@ -69,7 +69,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
#include "ace/Manual_Event.inl"
#endif /* __ACE_INLINE__ */
-
#include /**/ "ace/post.h"
#endif /* ACE_MANUAL_EVENT_H */
diff --git a/dep/ACE_wrappers/ace/Map.h b/dep/ACE_wrappers/ace/Map.h
index 2ea515fd2dc..2095d833528 100644
--- a/dep/ACE_wrappers/ace/Map.h
+++ b/dep/ACE_wrappers/ace/Map.h
@@ -12,7 +12,6 @@
*/
//=============================================================================
-
#ifndef ACE_MAP_H
#define ACE_MAP_H
diff --git a/dep/ACE_wrappers/ace/Mem_Map.cpp b/dep/ACE_wrappers/ace/Mem_Map.cpp
index 1c79d93f33c..692839b580b 100644
--- a/dep/ACE_wrappers/ace/Mem_Map.cpp
+++ b/dep/ACE_wrappers/ace/Mem_Map.cpp
@@ -19,7 +19,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE(ACE_Mem_Map)
-
void
ACE_Mem_Map::dump (void) const
{
diff --git a/dep/ACE_wrappers/ace/Mem_Map.inl b/dep/ACE_wrappers/ace/Mem_Map.inl
index 3fd3235db9b..263847253ab 100644
--- a/dep/ACE_wrappers/ace/Mem_Map.inl
+++ b/dep/ACE_wrappers/ace/Mem_Map.inl
@@ -185,7 +185,6 @@ ACE_Mem_Map::protect (size_t len, int prot)
return ACE_OS::mprotect (this->base_addr_, len, prot);
}
-
// Change the protection of all the pages of the mapped region to <prot>
// starting at <this->base_addr_>.
diff --git a/dep/ACE_wrappers/ace/Message_Block.cpp b/dep/ACE_wrappers/ace/Message_Block.cpp
index 072693613ea..426622cbc24 100644
--- a/dep/ACE_wrappers/ace/Message_Block.cpp
+++ b/dep/ACE_wrappers/ace/Message_Block.cpp
@@ -50,7 +50,6 @@ enum
ACE_DATA_BLOCK_CLONE_LEAVE
};
-
// Setup Timeprobes
ACE_TIMEPROBE_EVENT_DESCRIPTIONS (ACE_MB_Timeprobe_Description,
ACE_MESSAGE_BLOCK_INIT_I_ENTER);
@@ -1160,7 +1159,6 @@ ACE_Data_Block::clone_nocopy (ACE_Message_Block::Message_Flags mask,
return 0;
}
-
// Set new flags minus the mask...
nb->clr_flags (mask | always_clear);
return nb;
diff --git a/dep/ACE_wrappers/ace/Message_Block.h b/dep/ACE_wrappers/ace/Message_Block.h
index ea039a386a4..00b130968e3 100644
--- a/dep/ACE_wrappers/ace/Message_Block.h
+++ b/dep/ACE_wrappers/ace/Message_Block.h
@@ -33,7 +33,6 @@ class ACE_Allocator;
class ACE_Data_Block;
class ACE_Lock;
-
/**
* @class ACE_Message_Block
*
diff --git a/dep/ACE_wrappers/ace/Message_Block.inl b/dep/ACE_wrappers/ace/Message_Block.inl
index bf756e4dddb..b47b0b552b2 100644
--- a/dep/ACE_wrappers/ace/Message_Block.inl
+++ b/dep/ACE_wrappers/ace/Message_Block.inl
@@ -343,7 +343,6 @@ ACE_Message_Block::end (void) const
return this->data_block ()->end ();
}
-
ACE_INLINE void
ACE_Message_Block::rd_ptr (char *new_ptr)
{
diff --git a/dep/ACE_wrappers/ace/Message_Queue_NT.cpp b/dep/ACE_wrappers/ace/Message_Queue_NT.cpp
index a8c9c8859b7..57155a4dccf 100644
--- a/dep/ACE_wrappers/ace/Message_Queue_NT.cpp
+++ b/dep/ACE_wrappers/ace/Message_Queue_NT.cpp
@@ -11,7 +11,6 @@ ACE_RCSID (ace,
Message_Queue_NT,
"$Id: Message_Queue_NT.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
#if defined (ACE_HAS_WIN32_OVERLAPPED_IO)
diff --git a/dep/ACE_wrappers/ace/Message_Queue_T.h b/dep/ACE_wrappers/ace/Message_Queue_T.h
index b4c764b4de8..8f5f0217108 100644
--- a/dep/ACE_wrappers/ace/Message_Queue_T.h
+++ b/dep/ACE_wrappers/ace/Message_Queue_T.h
@@ -388,7 +388,6 @@ public:
//@}
-
/** @name Water mark (flow control) methods
*/
//@{
@@ -619,7 +618,6 @@ private:
// This typedef is used to get around a compiler bug in g++/vxworks.
typedef ACE_Message_Queue<ACE_SYNCH> ACE_DEFAULT_MESSAGE_QUEUE_TYPE;
-
/**
* @class ACE_Message_Queue_Iterator
*
@@ -818,7 +816,6 @@ public:
virtual int enqueue_head (ACE_Message_Block *new_item,
ACE_Time_Value *timeout = 0);
-
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
@@ -941,7 +938,6 @@ public:
u_long dynamic_priority_max = 0x3FFFFFUL, // 2^(22)-1
u_long dynamic_priority_offset = 0x200000UL); // 2^(22-1)
-
#if defined (ACE_VXWORKS)
/// Factory method for a wrapped VxWorks message queue
diff --git a/dep/ACE_wrappers/ace/Message_Queue_Vx.cpp b/dep/ACE_wrappers/ace/Message_Queue_Vx.cpp
index e224f5078e9..7ffdb1cd0af 100644
--- a/dep/ACE_wrappers/ace/Message_Queue_Vx.cpp
+++ b/dep/ACE_wrappers/ace/Message_Queue_Vx.cpp
@@ -11,7 +11,6 @@ ACE_RCSID (ace,
Message_Queue_Vx,
"$Id: Message_Queue_Vx.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
#if defined (ACE_VXWORKS)
diff --git a/dep/ACE_wrappers/ace/Method_Object.h b/dep/ACE_wrappers/ace/Method_Object.h
index cb330d4ae2b..2c75bec61f3 100644
--- a/dep/ACE_wrappers/ace/Method_Object.h
+++ b/dep/ACE_wrappers/ace/Method_Object.h
@@ -15,7 +15,6 @@
*/
//=============================================================================
-
#ifndef ACE_METHOD_OBJECT_H
#define ACE_METHOD_OBJECT_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Method_Request.h b/dep/ACE_wrappers/ace/Method_Request.h
index 56548a71e92..2aab2ef3491 100644
--- a/dep/ACE_wrappers/ace/Method_Request.h
+++ b/dep/ACE_wrappers/ace/Method_Request.h
@@ -11,7 +11,6 @@
*/
//=============================================================================
-
#ifndef ACE_METHOD_REQUEST_H
#define ACE_METHOD_REQUEST_H
@@ -95,7 +94,6 @@ protected:
ACE_END_VERSIONED_NAMESPACE_DECL
-
#include /**/ "ace/post.h"
#endif /* ACE_METHOD_REQUEST_H */
diff --git a/dep/ACE_wrappers/ace/Metrics_Cache.h b/dep/ACE_wrappers/ace/Metrics_Cache.h
index b318ab028de..1fe84b0f17d 100644
--- a/dep/ACE_wrappers/ace/Metrics_Cache.h
+++ b/dep/ACE_wrappers/ace/Metrics_Cache.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_METRICS_CACHE_H
#define ACE_METRICS_CACHE_H
@@ -92,7 +91,6 @@ do { if((METRICS_PTR->metrics_enabled())) { \
METRICS_PTR->report_##NAME##_resume(X); \
} } while (0)
-
/**
* Mystery macros. I could not find where there were functions like 'report_base_metrics_start ()'. All the
* start and stop functions had an argument to find the probe in the cache
diff --git a/dep/ACE_wrappers/ace/Metrics_Cache_T.h b/dep/ACE_wrappers/ace/Metrics_Cache_T.h
index 5785163c413..4625603357e 100644
--- a/dep/ACE_wrappers/ace/Metrics_Cache_T.h
+++ b/dep/ACE_wrappers/ace/Metrics_Cache_T.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_METRICS_CACHE_T_H
#define ACE_METRICS_CACHE_T_H
diff --git a/dep/ACE_wrappers/ace/Metrics_Cache_T.inl b/dep/ACE_wrappers/ace/Metrics_Cache_T.inl
index e3cc3b8cc66..98bc73e7243 100644
--- a/dep/ACE_wrappers/ace/Metrics_Cache_T.inl
+++ b/dep/ACE_wrappers/ace/Metrics_Cache_T.inl
@@ -11,7 +11,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
// Class ACE_Metrics_Cache //
/////////////////////////////
-
template <class ACE_LOCK, class ALLOCATOR>
ACE_INLINE void
ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_enqueue_start (u_long i)
@@ -41,7 +40,6 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_enqueue_start (u_long i)
}
}
-
template <class ACE_LOCK, class ALLOCATOR>
ACE_INLINE void
ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_enqueue_stop (u_long i)
@@ -65,7 +63,6 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_enqueue_stop (u_long i)
}
-
template <class ACE_LOCK, class ALLOCATOR>
ACE_INLINE void
ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_enqueue_suspend (u_long i)
@@ -82,7 +79,6 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_enqueue_suspend (u_long i)
}
}
-
template <class ACE_LOCK, class ALLOCATOR>
ACE_INLINE void
ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_enqueue_resume (u_long i)
@@ -99,7 +95,6 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_enqueue_resume (u_long i)
}
}
-
template <class ACE_LOCK, class ALLOCATOR>
ACE_INLINE void
ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_dequeue_start (u_long i)
@@ -129,7 +124,6 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_dequeue_start (u_long i)
}
}
-
template <class ACE_LOCK, class ALLOCATOR>
ACE_INLINE void
ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_dequeue_stop (u_long i)
@@ -152,7 +146,6 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_dequeue_stop (u_long i)
}
}
-
template <class ACE_LOCK, class ALLOCATOR>
ACE_INLINE void
ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_dequeue_suspend (u_long i)
@@ -169,7 +162,6 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_dequeue_suspend (u_long i)
}
}
-
template <class ACE_LOCK, class ALLOCATOR>
ACE_INLINE void
ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_dequeue_resume (u_long i)
@@ -186,7 +178,6 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::report_dequeue_resume (u_long i)
}
}
-
template <class ACE_LOCK, class ALLOCATOR>
ACE_INLINE void
ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::reset_base_statistics ()
@@ -209,7 +200,6 @@ ACE_Metrics_Cache<ACE_LOCK, ALLOCATOR>::reset_base_statistics ()
}
}
-
// Flips the supplier and consumer positions.
template <class ACE_LOCK, class ALLOCATOR>
diff --git a/dep/ACE_wrappers/ace/Monitor_Control_Action.cpp b/dep/ACE_wrappers/ace/Monitor_Control_Action.cpp
index 4a4757a5111..5ab52b36941 100644
--- a/dep/ACE_wrappers/ace/Monitor_Control_Action.cpp
+++ b/dep/ACE_wrappers/ace/Monitor_Control_Action.cpp
@@ -43,4 +43,3 @@ ACE_END_VERSIONED_NAMESPACE_DECL
#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */
-
diff --git a/dep/ACE_wrappers/ace/Monitor_Control_Types.cpp b/dep/ACE_wrappers/ace/Monitor_Control_Types.cpp
index e9934a96f74..782227c5684 100644
--- a/dep/ACE_wrappers/ace/Monitor_Control_Types.cpp
+++ b/dep/ACE_wrappers/ace/Monitor_Control_Types.cpp
@@ -76,4 +76,3 @@ ACE_END_VERSIONED_NAMESPACE_DECL
#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */
-
diff --git a/dep/ACE_wrappers/ace/Msg_WFMO_Reactor.h b/dep/ACE_wrappers/ace/Msg_WFMO_Reactor.h
index 714f4ce7a26..879dcef9c8b 100644
--- a/dep/ACE_wrappers/ace/Msg_WFMO_Reactor.h
+++ b/dep/ACE_wrappers/ace/Msg_WFMO_Reactor.h
@@ -11,7 +11,6 @@
*/
//=============================================================================
-
#ifndef ACE_MSG_WFMO_REACTOR_H
#define ACE_MSG_WFMO_REACTOR_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Multihomed_INET_Addr.cpp b/dep/ACE_wrappers/ace/Multihomed_INET_Addr.cpp
index f5c50a6c278..37a50b84d02 100644
--- a/dep/ACE_wrappers/ace/Multihomed_INET_Addr.cpp
+++ b/dep/ACE_wrappers/ace/Multihomed_INET_Addr.cpp
@@ -291,7 +291,6 @@ ACE_Multihomed_INET_Addr::get_addresses(sockaddr_in6 *addrs,
}
#endif /* ACE_HAS_IPV6 */
-
ACE_Multihomed_INET_Addr::~ACE_Multihomed_INET_Addr (void)
{
diff --git a/dep/ACE_wrappers/ace/Mutex.cpp b/dep/ACE_wrappers/ace/Mutex.cpp
index 8203a1c4ced..6f0ab0683a9 100644
--- a/dep/ACE_wrappers/ace/Mutex.cpp
+++ b/dep/ACE_wrappers/ace/Mutex.cpp
@@ -10,7 +10,6 @@
#include "ace/OS_NS_string.h"
#include "ace/os_include/sys/os_mman.h"
-
ACE_RCSID (ace,
Mutex,
"$Id: Mutex.cpp 80826 2008-03-04 14:51:23Z wotte $")
diff --git a/dep/ACE_wrappers/ace/Mutex.inl b/dep/ACE_wrappers/ace/Mutex.inl
index 8c6c73c8667..10432e9ede8 100644
--- a/dep/ACE_wrappers/ace/Mutex.inl
+++ b/dep/ACE_wrappers/ace/Mutex.inl
@@ -2,7 +2,6 @@
//
// $Id: Mutex.inl 80826 2008-03-04 14:51:23Z wotte $
-
#include "ace/OS_NS_sys_mman.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
diff --git a/dep/ACE_wrappers/ace/NT_Service.cpp b/dep/ACE_wrappers/ace/NT_Service.cpp
index 2cd94793c52..c38bd3b7239 100644
--- a/dep/ACE_wrappers/ace/NT_Service.cpp
+++ b/dep/ACE_wrappers/ace/NT_Service.cpp
@@ -86,7 +86,6 @@ ACE_NT_Service::fini (void)
return this->report_status (SERVICE_STOPPED, 0);
}
-
void
ACE_NT_Service::handle_control (DWORD control_code)
{
@@ -305,7 +304,6 @@ ACE_NT_Service::startup (void)
}
-
void
ACE_NT_Service::capture_log_msg_attributes (void)
{
@@ -320,7 +318,6 @@ ACE_NT_Service::inherit_log_msg_attributes (void)
ACE_Log_Msg::inherit_hook (0, this->log_msg_attributes_);
}
-
int
ACE_NT_Service::start_svc (ACE_Time_Value *wait_time,
DWORD *svc_state,
@@ -558,7 +555,7 @@ ACE_NT_Service::wait_for_service_state (DWORD desired_state,
time_out += *wait_time;
// Poll until the service reaches the desired state.
- for (;;)
+ for (; ; )
{
service_ok = 0 != QueryServiceStatus (this->svc_sc_handle_,
&this->svc_status_);
diff --git a/dep/ACE_wrappers/ace/NT_Service.h b/dep/ACE_wrappers/ace/NT_Service.h
index bc6e39036b2..d3202120622 100644
--- a/dep/ACE_wrappers/ace/NT_Service.h
+++ b/dep/ACE_wrappers/ace/NT_Service.h
@@ -157,7 +157,6 @@ public:
/// the macro-generated service function calls it.
void svc_handle (const SERVICE_STATUS_HANDLE new_svc_handle);
-
// = Methods which can be used to do SCP-like functions. The first group
// are used to register/insert and remove the service's definition in the
// SCM registry.
diff --git a/dep/ACE_wrappers/ace/NT_Service.inl b/dep/ACE_wrappers/ace/NT_Service.inl
index 80c2a7a3764..66bf6a4c4fe 100644
--- a/dep/ACE_wrappers/ace/NT_Service.inl
+++ b/dep/ACE_wrappers/ace/NT_Service.inl
@@ -24,7 +24,6 @@ ACE_NT_Service::ACE_NT_Service (DWORD start_timeout,
svc_status_.dwWaitHint = 0;
}
-
ACE_INLINE
ACE_NT_Service::ACE_NT_Service (const ACE_TCHAR *name,
const ACE_TCHAR *desc,
@@ -46,14 +45,12 @@ ACE_NT_Service::ACE_NT_Service (const ACE_TCHAR *name,
svc_status_.dwCheckPoint = 0;
}
-
ACE_INLINE int
ACE_NT_Service::svc (void)
{
return -1;
}
-
ACE_INLINE
const ACE_TCHAR *
ACE_NT_Service::name (void) const
diff --git a/dep/ACE_wrappers/ace/Name_Proxy.h b/dep/ACE_wrappers/ace/Name_Proxy.h
index 24ca63a30af..cc8790a7fcb 100644
--- a/dep/ACE_wrappers/ace/Name_Proxy.h
+++ b/dep/ACE_wrappers/ace/Name_Proxy.h
@@ -16,7 +16,6 @@
*/
//=============================================================================
-
#ifndef ACE_NAME_PROXY_H
#define ACE_NAME_PROXY_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Name_Request_Reply.h b/dep/ACE_wrappers/ace/Name_Request_Reply.h
index 2c32c4cf32c..23244985216 100644
--- a/dep/ACE_wrappers/ace/Name_Request_Reply.h
+++ b/dep/ACE_wrappers/ace/Name_Request_Reply.h
@@ -15,7 +15,6 @@
*/
//=============================================================================
-
#ifndef ACE_NAME_REQUEST_REPLY_H
#define ACE_NAME_REQUEST_REPLY_H
diff --git a/dep/ACE_wrappers/ace/Name_Space.cpp b/dep/ACE_wrappers/ace/Name_Space.cpp
index 724d3206c16..4e269d71f6a 100644
--- a/dep/ACE_wrappers/ace/Name_Space.cpp
+++ b/dep/ACE_wrappers/ace/Name_Space.cpp
@@ -17,7 +17,6 @@ ACE_Name_Binding::ACE_Name_Binding (void)
ACE_TRACE ("ACE_Name_Binding::ACE_Name_Binding");
}
-
ACE_Name_Binding::~ACE_Name_Binding (void)
{
ACE_TRACE ("ACE_Name_Binding::~ACE_Name_Binding");
diff --git a/dep/ACE_wrappers/ace/Name_Space.h b/dep/ACE_wrappers/ace/Name_Space.h
index ccd4d4dbfe9..7106587f459 100644
--- a/dep/ACE_wrappers/ace/Name_Space.h
+++ b/dep/ACE_wrappers/ace/Name_Space.h
@@ -95,7 +95,6 @@ public:
const ACE_NS_WString &value_in,
const char *type_in = "") = 0;
-
/**
* Overwrite the value or type of an existing name in a
* ACE_Name_Space or bind a new name to the context, if it didn't
diff --git a/dep/ACE_wrappers/ace/Netlink_Addr.h b/dep/ACE_wrappers/ace/Netlink_Addr.h
index cd1c20fd474..8fd5c6b9590 100644
--- a/dep/ACE_wrappers/ace/Netlink_Addr.h
+++ b/dep/ACE_wrappers/ace/Netlink_Addr.h
@@ -117,5 +117,3 @@ ACE_END_VERSIONED_NAMESPACE_DECL
#endif /* ACE_NETLINK_ADDR_H */
-
-
diff --git a/dep/ACE_wrappers/ace/Netlink_Addr.inl b/dep/ACE_wrappers/ace/Netlink_Addr.inl
index 4ec38fa4a28..2cb43b73d6c 100644
--- a/dep/ACE_wrappers/ace/Netlink_Addr.inl
+++ b/dep/ACE_wrappers/ace/Netlink_Addr.inl
@@ -40,7 +40,6 @@ ACE_INLINE int ACE_Netlink_Addr::get_addr_size (void) const
return sizeof(this->nl_);
}
-
ACE_INLINE void ACE_Netlink_Addr::set_addr (void *addr, int len){
ACE_OS::memcpy (&this->nl_,addr,len);
}
diff --git a/dep/ACE_wrappers/ace/Node.h b/dep/ACE_wrappers/ace/Node.h
index bf47b15915b..c2eb7a7bb3d 100644
--- a/dep/ACE_wrappers/ace/Node.h
+++ b/dep/ACE_wrappers/ace/Node.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_NODE_H
#define ACE_NODE_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Null_Mutex.h b/dep/ACE_wrappers/ace/Null_Mutex.h
index 5bfbea7e23b..7cf2304e05d 100644
--- a/dep/ACE_wrappers/ace/Null_Mutex.h
+++ b/dep/ACE_wrappers/ace/Null_Mutex.h
@@ -31,7 +31,6 @@
#include "ace/Global_Macros.h"
#include "ace/OS_Memory.h"
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Time_Value;
diff --git a/dep/ACE_wrappers/ace/Numeric_Limits.h b/dep/ACE_wrappers/ace/Numeric_Limits.h
index b4ee307fe5c..29de41db76b 100644
--- a/dep/ACE_wrappers/ace/Numeric_Limits.h
+++ b/dep/ACE_wrappers/ace/Numeric_Limits.h
@@ -71,7 +71,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
template <typename T> struct ACE_Numeric_Limits;
-
// ------------------------------------------
// Special cases.
template<>
diff --git a/dep/ACE_wrappers/ace/OS.h b/dep/ACE_wrappers/ace/OS.h
index 9283ed6f417..bc5fe2f3760 100644
--- a/dep/ACE_wrappers/ace/OS.h
+++ b/dep/ACE_wrappers/ace/OS.h
@@ -109,7 +109,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
#include "ace/os_include/os_unistd.h"
#include "ace/os_include/sys/os_wait.h"
-
// This needs to go here *first* to avoid problems with AIX.
# if defined (ACE_HAS_PTHREADS)
# include "ace/os_include/os_pthread.h"
@@ -280,7 +279,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# include "ace/os_include/os_syslog.h"
# endif /* !defined (ACE_WIN32) && !defined (ACE_LACKS_UNIX_SYSLOG) */
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
/**
diff --git a/dep/ACE_wrappers/ace/OS.inl b/dep/ACE_wrappers/ace/OS.inl
index 593b582d8ce..1dafebc2543 100644
--- a/dep/ACE_wrappers/ace/OS.inl
+++ b/dep/ACE_wrappers/ace/OS.inl
@@ -82,7 +82,6 @@ using std::strftime;
# endif
# endif /* ACE_HAS_GETIFADDRS */
-
#endif /* WIN32 */
#if defined (ACE_HAS_SHM_OPEN) && defined(INTEGRITY)
diff --git a/dep/ACE_wrappers/ace/OS_NS_Thread.cpp b/dep/ACE_wrappers/ace/OS_NS_Thread.cpp
index 187f4bf4078..16a19501f82 100644
--- a/dep/ACE_wrappers/ace/OS_NS_Thread.cpp
+++ b/dep/ACE_wrappers/ace/OS_NS_Thread.cpp
@@ -29,7 +29,6 @@ ACE_MUTEX_LOCK_CLEANUP_ADAPTER_NAME (void *args)
ACE_VERSIONED_NAMESPACE_NAME::ACE_OS::mutex_lock_cleanup (args);
}
-
#if !defined(ACE_WIN32) && defined (__IBMCPP__) && (__IBMCPP__ >= 400)
# define ACE_BEGINTHREADEX(STACK, STACKSIZE, ENTRY_POINT, ARGS, FLAGS, THR_ID) \
(*THR_ID = ::_beginthreadex ((void(_Optlink*)(void*))ENTRY_POINT, STACK, STACKSIZE, ARGS), *THR_ID)
@@ -245,7 +244,7 @@ ACE_TSS_Emulation::next_key (ACE_thread_key_t &key)
{
u_int counter = 0;
// Loop through all possible keys and check whether a key is free
- for ( ;counter < ACE_TSS_THREAD_KEYS_MAX; counter++)
+ for (; counter < ACE_TSS_THREAD_KEYS_MAX; counter++)
{
ACE_thread_key_t localkey;
# if defined (ACE_HAS_NONSCALAR_THREAD_KEY_T)
@@ -600,7 +599,6 @@ private:
ACE_thread_key_t in_use_;
};
-
/*****************************************************************************/
/**
* @class TSS_Cleanup_Instance
@@ -2769,7 +2767,7 @@ ACE_OS::event_pulse (ACE_event_t *event)
event->eventdata_->signal_count_ = event->eventdata_->waiting_threads_;
# else
event->eventdata_->signal_count_ = event->eventdata_->waiting_threads_;
- for (unsigned long i=0; i<event->eventdata_->signal_count_ ;++i)
+ for (unsigned long i=0; i<event->eventdata_->signal_count_ ; ++i)
if (ACE_OS::sema_post(&event->semaphore_) != 0)
{
event->eventdata_->signal_count_ = 0;
@@ -5164,7 +5162,7 @@ add_to_argv (int& argc, char** argv, int max_args, char* string)
}
// Skip over whitespace in between arguments
- for(++i; i < length && ACE_OS::ace_isspace (string[i]); ++i)
+ for (++i; i < length && ACE_OS::ace_isspace (string[i]); ++i)
{
}
diff --git a/dep/ACE_wrappers/ace/OS_NS_Thread.h b/dep/ACE_wrappers/ace/OS_NS_Thread.h
index a16e3750d20..151f0a7c1a1 100644
--- a/dep/ACE_wrappers/ace/OS_NS_Thread.h
+++ b/dep/ACE_wrappers/ace/OS_NS_Thread.h
@@ -1019,7 +1019,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# define ACE_MUTEX_LOCK_CLEANUP_ADAPTER_NAME ACE_PREPROC_CONCATENATE(ACE_VERSIONED_NAMESPACE_NAME, _ace_mutex_lock_cleanup_adapter)
#endif /* ACE_HAS_VERSIONED_NAMESPACE == 1 */
-
# if defined (ACE_HAS_THR_C_FUNC)
// This is necessary to work around nasty problems with MVS C++.
extern "C" ACE_Export void ACE_MUTEX_LOCK_CLEANUP_ADAPTER_NAME (void *args);
@@ -1232,7 +1231,6 @@ namespace ACE_OS {
extern ACE_Export
int lwp_setparams (const ACE_Sched_Params &);
-
//@{ @name A set of wrappers for mutex locks.
extern ACE_Export
@@ -1367,7 +1365,6 @@ namespace ACE_OS {
//@}
-
//@{ @name A set of wrappers for readers/writer locks.
ACE_NAMESPACE_INLINE_FUNCTION
@@ -1614,7 +1611,6 @@ namespace ACE_OS {
size_t cpu_set_size,
cpu_set_t * cpu_mask);
-
/**
* Set the thread affinity
*
diff --git a/dep/ACE_wrappers/ace/OS_NS_Thread.inl b/dep/ACE_wrappers/ace/OS_NS_Thread.inl
index 14a32196e8d..9f5e6580526 100644
--- a/dep/ACE_wrappers/ace/OS_NS_Thread.inl
+++ b/dep/ACE_wrappers/ace/OS_NS_Thread.inl
@@ -573,7 +573,6 @@ ACE_OS::recursive_mutex_cond_unlock (ACE_recursive_thread_mutex_t *m,
#endif /* ACE_HAS_THREADS */
}
-
// This method is called after waiting on a condition variable when a
// recursive mutex must be reacquired. If the platform doesn't natively
// integrate recursive mutexes and condition variables, it's taken care
@@ -1586,7 +1585,7 @@ ACE_OS::sema_init (ACE_sema_t *s,
if (creator && count)
{
char c = 1;
- for (u_int i=0; i<count ;++i)
+ for (u_int i=0; i<count ; ++i)
if (ACE_OS::write (s->fd_[1], &c, sizeof (char)) != 1)
return (-1);
}
@@ -2064,7 +2063,7 @@ ACE_OS::sema_wait (ACE_sema_t *s)
# else /* ACE_USES_WINCE_SEMA_SIMULATION */
// Timed wait.
int result = -1;
- for (;;)
+ for (; ; )
// Check if the semaphore is avialable or not and wait forever.
// Don't bother to grab the lock if it is not available (to avoid
// deadlock.)
@@ -3569,7 +3568,6 @@ ACE_OS_Recursive_Thread_Mutex_Guard::~ACE_OS_Recursive_Thread_Mutex_Guard ()
#endif /* ACE_MT_SAFE && ACE_MT_SAFE != 0 */
-
/*****************************************************************************/
ACE_INLINE
diff --git a/dep/ACE_wrappers/ace/OS_NS_macros.h b/dep/ACE_wrappers/ace/OS_NS_macros.h
index b80db9eebdb..5568bd46203 100644
--- a/dep/ACE_wrappers/ace/OS_NS_macros.h
+++ b/dep/ACE_wrappers/ace/OS_NS_macros.h
@@ -107,8 +107,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# endif /* _FILE_OFFSET_BITS==64 */
#endif /* ACE_WIN32 */
-
-
# include /**/ "ace/post.h"
#endif /* ACE_OS_NS_MACROS_H */
diff --git a/dep/ACE_wrappers/ace/OS_NS_math.h b/dep/ACE_wrappers/ace/OS_NS_math.h
index 0ed1d6ce892..6207692cb30 100644
--- a/dep/ACE_wrappers/ace/OS_NS_math.h
+++ b/dep/ACE_wrappers/ace/OS_NS_math.h
@@ -34,7 +34,6 @@
#endif
#define ACE_EXPORT_MACRO ACE_Export
-
/*
* We inline and undef some functions that may be implemented
* as macros on some platforms. This way macro definitions will
@@ -63,7 +62,6 @@ inline double ace_log2_helper (double x)
meaning the binary logarithm of x using the natural logarithm, for
example, is:
-
log (x)
e
log (x) = -------
@@ -82,7 +80,6 @@ inline double ace_log2_helper (double x)
#endif /* defined (log2) */
}
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
namespace ACE_OS
diff --git a/dep/ACE_wrappers/ace/OS_NS_netdb.cpp b/dep/ACE_wrappers/ace/OS_NS_netdb.cpp
index f4fa87906a9..d0687014c8a 100644
--- a/dep/ACE_wrappers/ace/OS_NS_netdb.cpp
+++ b/dep/ACE_wrappers/ace/OS_NS_netdb.cpp
@@ -240,7 +240,7 @@ ACE_OS::getmacaddress (struct macaddr_node_t *node)
result = Netbios (&ncb);
- for(int i = 0; i < lenum.length; i++)
+ for (int i = 0; i < lenum.length; i++)
{
ACE_OS::memset (&ncb, 0, sizeof(ncb));
ncb.ncb_command = NCBRESET;
diff --git a/dep/ACE_wrappers/ace/OS_NS_netdb.h b/dep/ACE_wrappers/ace/OS_NS_netdb.h
index 2cf78998db1..6b29e067b96 100644
--- a/dep/ACE_wrappers/ace/OS_NS_netdb.h
+++ b/dep/ACE_wrappers/ace/OS_NS_netdb.h
@@ -76,7 +76,6 @@ namespace ACE_OS
ACE_HOSTENT_DATA buffer,
int *h_errnop);
-
ACE_NAMESPACE_INLINE_FUNCTION
struct hostent *getipnodebyaddr (const void *src, size_t len,
int family);
diff --git a/dep/ACE_wrappers/ace/OS_NS_pwd.h b/dep/ACE_wrappers/ace/OS_NS_pwd.h
index a70a6d3f3bc..bf6bb4cea97 100644
--- a/dep/ACE_wrappers/ace/OS_NS_pwd.h
+++ b/dep/ACE_wrappers/ace/OS_NS_pwd.h
@@ -44,7 +44,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
namespace ACE_OS
{
-
//@{ @name A set of wrappers for password routines.
ACE_NAMESPACE_INLINE_FUNCTION
diff --git a/dep/ACE_wrappers/ace/OS_NS_stdio.cpp b/dep/ACE_wrappers/ace/OS_NS_stdio.cpp
index 01ceec72279..784382ecd5a 100644
--- a/dep/ACE_wrappers/ace/OS_NS_stdio.cpp
+++ b/dep/ACE_wrappers/ace/OS_NS_stdio.cpp
@@ -7,7 +7,6 @@ ACE_RCSID (ace,
OS_NS_stdio,
"$Id: OS_NS_stdio.cpp 82586 2008-08-11 12:46:00Z johnnyw $")
-
#if !defined (ACE_HAS_INLINED_OSCALLS)
# include "ace/OS_NS_stdio.inl"
#endif /* ACE_HAS_INLINED_OSCALLS */
diff --git a/dep/ACE_wrappers/ace/OS_NS_stdio.h b/dep/ACE_wrappers/ace/OS_NS_stdio.h
index a27d90822c9..be497f6cf90 100644
--- a/dep/ACE_wrappers/ace/OS_NS_stdio.h
+++ b/dep/ACE_wrappers/ace/OS_NS_stdio.h
@@ -108,7 +108,6 @@ inline int ace_ungetc_helper (int ch, FILE *fp)
#endif /* defined (ungetc) */
}
-
#if !defined (ACE_LACKS_CUSERID) && !defined(ACE_HAS_ALT_CUSERID) \
&& !defined(ACE_WIN32) && !defined (ACE_VXWORKS)
/// Helper for the ACE_OS::cuserid() function
diff --git a/dep/ACE_wrappers/ace/OS_NS_stdlib.cpp b/dep/ACE_wrappers/ace/OS_NS_stdlib.cpp
index 78d01380c0f..4ccd743cc90 100644
--- a/dep/ACE_wrappers/ace/OS_NS_stdlib.cpp
+++ b/dep/ACE_wrappers/ace/OS_NS_stdlib.cpp
@@ -568,7 +568,7 @@ ACE_OS::strtol_emulation (const char *nptr, char **endptr, int base)
cutoff = neg ? -(unsigned long)LONG_MIN : LONG_MAX;
cutlim = cutoff % (unsigned long)base;
cutoff /= (unsigned long)base;
- for (acc = 0, any = 0;; c = *s++) {
+ for (acc = 0, any = 0; ; c = *s++) {
if (ACE_OS::ace_isdigit(c))
c -= '0';
else if (ACE_OS::ace_isalpha(c))
@@ -633,7 +633,7 @@ ACE_OS::strtoul_emulation (const char *nptr,
cutoff = (unsigned long) ULONG_MAX / (unsigned long) base;
cutlim = (unsigned long) ULONG_MAX % (unsigned long) base;
- for (acc = 0, any = 0;; c = *s++)
+ for (acc = 0, any = 0; ; c = *s++)
{
if (ACE_OS::ace_isdigit(c))
c -= '0';
@@ -703,7 +703,7 @@ ACE_OS::strtoull_emulation (const char *nptr,
cutoff = (ACE_UINT64) ACE_UINT64_MAX / (ACE_UINT64) base;
cutlim = (ACE_UINT64) ACE_UINT64_MAX % (ACE_UINT64) base;
- for (acc = 0, any = 0;; c = *s++)
+ for (acc = 0, any = 0; ; c = *s++)
{
if (ACE_OS::ace_isdigit(c))
c -= '0';
diff --git a/dep/ACE_wrappers/ace/OS_NS_stdlib.h b/dep/ACE_wrappers/ace/OS_NS_stdlib.h
index 237956efc7e..696d5110eb2 100644
--- a/dep/ACE_wrappers/ace/OS_NS_stdlib.h
+++ b/dep/ACE_wrappers/ace/OS_NS_stdlib.h
@@ -63,7 +63,6 @@ namespace ACE_OS {
*/
//@{
-
ACE_NAMESPACE_INLINE_FUNCTION
void _exit (int status = 0);
diff --git a/dep/ACE_wrappers/ace/OS_NS_stropts.cpp b/dep/ACE_wrappers/ace/OS_NS_stropts.cpp
index 0917715924a..83fb822606b 100644
--- a/dep/ACE_wrappers/ace/OS_NS_stropts.cpp
+++ b/dep/ACE_wrappers/ace/OS_NS_stropts.cpp
@@ -98,7 +98,6 @@ ACE_OS::ioctl (ACE_HANDLE socket,
0,
0);
-
if (result == SOCKET_ERROR)
{
unsigned long dwErr = ::WSAGetLastError ();
@@ -174,7 +173,6 @@ ACE_OS::ioctl (ACE_HANDLE socket,
ace_qos.receiving_flowspec (&receiving_flowspec);
ace_qos.provider_specific (*((struct iovec *) (&qos->ProviderSpecific)));
-
return result;
}
diff --git a/dep/ACE_wrappers/ace/OS_NS_sys_resource.h b/dep/ACE_wrappers/ace/OS_NS_sys_resource.h
index 5b9a7abea92..b8467975d5f 100644
--- a/dep/ACE_wrappers/ace/OS_NS_sys_resource.h
+++ b/dep/ACE_wrappers/ace/OS_NS_sys_resource.h
@@ -46,7 +46,6 @@ namespace ACE_OS
int getrusage (int who,
struct rusage *rusage);
-
ACE_NAMESPACE_INLINE_FUNCTION
int setrlimit (int resource,
const struct rlimit *rl);
diff --git a/dep/ACE_wrappers/ace/OS_NS_sys_sendfile.h b/dep/ACE_wrappers/ace/OS_NS_sys_sendfile.h
index 85487530097..3948a88b25e 100644
--- a/dep/ACE_wrappers/ace/OS_NS_sys_sendfile.h
+++ b/dep/ACE_wrappers/ace/OS_NS_sys_sendfile.h
@@ -28,7 +28,6 @@
#endif
#define ACE_EXPORT_MACRO ACE_Export
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
namespace ACE_OS
diff --git a/dep/ACE_wrappers/ace/OS_NS_sys_socket.h b/dep/ACE_wrappers/ace/OS_NS_sys_socket.h
index c545a2c017a..a0e644f190e 100644
--- a/dep/ACE_wrappers/ace/OS_NS_sys_socket.h
+++ b/dep/ACE_wrappers/ace/OS_NS_sys_socket.h
@@ -227,7 +227,6 @@ namespace ACE_OS
const iovec *iov,
int iovcnt);
-
/// Manipulate the options associated with a socket.
ACE_NAMESPACE_INLINE_FUNCTION
int setsockopt (ACE_HANDLE handle,
diff --git a/dep/ACE_wrappers/ace/OS_NS_time.h b/dep/ACE_wrappers/ace/OS_NS_time.h
index 61b51ffebf1..7fc53fda787 100644
--- a/dep/ACE_wrappers/ace/OS_NS_time.h
+++ b/dep/ACE_wrappers/ace/OS_NS_time.h
@@ -96,7 +96,6 @@ inline long ace_timezone()
#endif
}
-
#if !defined (ACE_LACKS_DIFFTIME)
/// Helper for the ACE_OS::difftime() function
/**
@@ -275,7 +274,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# define ACE_GETHRTIME_NAME ACE_gethrtime
#endif /* ACE_HAS_VERSIONED_NAMESPACE == 1 */
-
# if defined (ACE_HAS_INLINED_OSCALLS)
# if defined (ACE_INLINE)
# undef ACE_INLINE
diff --git a/dep/ACE_wrappers/ace/OS_NS_time.inl b/dep/ACE_wrappers/ace/OS_NS_time.inl
index 661ecb81748..9a77531a108 100644
--- a/dep/ACE_wrappers/ace/OS_NS_time.inl
+++ b/dep/ACE_wrappers/ace/OS_NS_time.inl
@@ -262,7 +262,7 @@ ACE_OS::gethrtime (const ACE_HRTimer_Op op)
# endif /* ! ACE_LACKS_LONGLONG_T */
#if defined (__amd64__) || defined (__x86_64__)
- // Read the high res tick counter into 32 bit int variables "eax" and
+ // Read the high res tick counter into 32 bit int variables "eax" and
// "edx", and then combine them into 64 bit int "now"
ACE_UINT32 eax, edx;
asm volatile ("rdtsc" : "=a" (eax), "=d" (edx) : : "memory");
diff --git a/dep/ACE_wrappers/ace/OS_NS_unistd.h b/dep/ACE_wrappers/ace/OS_NS_unistd.h
index 576cf37bae4..b9b7604b797 100644
--- a/dep/ACE_wrappers/ace/OS_NS_unistd.h
+++ b/dep/ACE_wrappers/ace/OS_NS_unistd.h
@@ -31,7 +31,6 @@
#include "ace/os_include/os_unistd.h"
#include "ace/os_include/os_stdio.h"
-
#if defined (ACE_EXPORT_MACRO)
# undef ACE_EXPORT_MACRO
#endif
diff --git a/dep/ACE_wrappers/ace/OS_NS_unistd.inl b/dep/ACE_wrappers/ace/OS_NS_unistd.inl
index 806a895d8b3..be2ec3cff25 100644
--- a/dep/ACE_wrappers/ace/OS_NS_unistd.inl
+++ b/dep/ACE_wrappers/ace/OS_NS_unistd.inl
@@ -62,7 +62,6 @@ ACE_OS::access (const char *path, int amode)
#endif /* ACE_LACKS_ACCESS */
}
-
#if defined (ACE_HAS_WCHAR)
ACE_INLINE int
ACE_OS::access (const wchar_t *path, int amode)
diff --git a/dep/ACE_wrappers/ace/OS_NS_wchar.cpp b/dep/ACE_wrappers/ace/OS_NS_wchar.cpp
index a29f0597224..7ec0d7b8380 100644
--- a/dep/ACE_wrappers/ace/OS_NS_wchar.cpp
+++ b/dep/ACE_wrappers/ace/OS_NS_wchar.cpp
@@ -69,7 +69,7 @@ ACE_OS::wcscat_emulation (wchar_t *destination,
wchar_t *
ACE_OS::wcschr_emulation (const wchar_t *string, wchar_t c)
{
- for (;*string ; ++string)
+ for (; *string ; ++string)
if (*string == c)
return const_cast<wchar_t *> (string);
@@ -290,7 +290,7 @@ ACE_OS::wcspbrk_emulation (const wchar_t *string,
while ((c = *string++) != 0)
{
- for (scanp = charset; (sc = *scanp++) != 0;)
+ for (scanp = charset; (sc = *scanp++) != 0; )
if (sc == c)
return const_cast<wchar_t *> (string - 1);
}
@@ -341,7 +341,7 @@ ACE_OS::wcsspn_emulation (const wchar_t *string,
// Skip any characters in charset, excluding the terminating \0.
cont:
c = *p++;
- for (spanp = charset; (sc = *spanp++) != 0;)
+ for (spanp = charset; (sc = *spanp++) != 0; )
if (sc == c)
goto cont;
return (p - 1 - string);
diff --git a/dep/ACE_wrappers/ace/OS_QoS.h b/dep/ACE_wrappers/ace/OS_QoS.h
index 022a17bee30..c1dddf3e01c 100644
--- a/dep/ACE_wrappers/ace/OS_QoS.h
+++ b/dep/ACE_wrappers/ace/OS_QoS.h
@@ -390,7 +390,6 @@ typedef int (*ACE_QOS_CONDITION_FUNC) (iovec *caller_id,
ACE_SOCK_GROUP *g,
unsigned long callbackdata);
-
/**
* @class ACE_Accept_QoS_Params
*
diff --git a/dep/ACE_wrappers/ace/OS_TLI.h b/dep/ACE_wrappers/ace/OS_TLI.h
index 8e607acd4b4..bccc3cd18ae 100644
--- a/dep/ACE_wrappers/ace/OS_TLI.h
+++ b/dep/ACE_wrappers/ace/OS_TLI.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_OS_TLI_H
# define ACE_OS_TLI_H
# include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Obchunk.h b/dep/ACE_wrappers/ace/Obchunk.h
index 1cb7c24b76c..053b144979e 100644
--- a/dep/ACE_wrappers/ace/Obchunk.h
+++ b/dep/ACE_wrappers/ace/Obchunk.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_OBCHUNK_H
#define ACE_OBCHUNK_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Object_Manager.cpp b/dep/ACE_wrappers/ace/Object_Manager.cpp
index bd97cc9ecaf..157c26a0441 100644
--- a/dep/ACE_wrappers/ace/Object_Manager.cpp
+++ b/dep/ACE_wrappers/ace/Object_Manager.cpp
@@ -259,7 +259,6 @@ ACE_Object_Manager::init (void)
SetUnhandledExceptionFilter (&ACE_UnhandledExceptionFilter);
#endif /* ACE_DISABLE_WIN32_ERROR_WINDOWS && ACE_WIN32 && !ACE_HAS_WINCE */
-
# if !defined (ACE_LACKS_ACE_SVCCONF)
ACE_NEW_RETURN (preallocations_,
ACE_Object_Manager_Preallocations,
@@ -605,7 +604,6 @@ ACE_Object_Manager::get_singleton_lock (ACE_RW_Thread_Mutex *&lock)
-1);
lock = &lock_adapter->object ();
-
// Register the lock for destruction at program
// termination. This call will cause us to grab the
// ACE_Object_Manager::instance ()->internal_lock_
@@ -759,7 +757,6 @@ ACE_Object_Manager::fini (void)
return 0;
}
-
#if !defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER)
/**
* @class ACE_Object_Manager_Manager
diff --git a/dep/ACE_wrappers/ace/Object_Manager.h b/dep/ACE_wrappers/ace/Object_Manager.h
index 741b9e3eebf..69952d4d018 100644
--- a/dep/ACE_wrappers/ace/Object_Manager.h
+++ b/dep/ACE_wrappers/ace/Object_Manager.h
@@ -461,7 +461,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
ACE_FACTORY_DECLARE (ACE, ACE_Service_Manager)
#endif /* ! ACE_LACKS_ACE_SVCCONF */
-
#include /**/ "ace/post.h"
#endif /* ACE_OBJECT_MANAGER_H */
diff --git a/dep/ACE_wrappers/ace/Object_Manager_Base.h b/dep/ACE_wrappers/ace/Object_Manager_Base.h
index d1058874d7d..60ca037f885 100644
--- a/dep/ACE_wrappers/ace/Object_Manager_Base.h
+++ b/dep/ACE_wrappers/ace/Object_Manager_Base.h
@@ -122,7 +122,6 @@ extern "C"
void
ACE_OS_Object_Manager_Internal_Exit_Hook (void);
-
// @@ This forward declaration should go away.
class ACE_Log_Msg;
diff --git a/dep/ACE_wrappers/ace/POSIX_Asynch_IO.cpp b/dep/ACE_wrappers/ace/POSIX_Asynch_IO.cpp
index 26b9eb33164..f4aeebb2269 100644
--- a/dep/ACE_wrappers/ace/POSIX_Asynch_IO.cpp
+++ b/dep/ACE_wrappers/ace/POSIX_Asynch_IO.cpp
@@ -18,7 +18,6 @@ ACE_RCSID (ace,
POSIX_Asynch_IO,
"$Id: POSIX_Asynch_IO.cpp 81535 2008-04-29 20:08:52Z shuston $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
size_t
@@ -702,7 +701,6 @@ ACE_POSIX_Asynch_Write_File::write (ACE_Message_Block &message_block,
// *********************************************************************
-
size_t
ACE_POSIX_Asynch_Accept_Result::bytes_to_read (void) const
{
@@ -1147,7 +1145,6 @@ void ACE_POSIX_Asynch_Connect_Result::connect_handle (ACE_HANDLE handle)
this->aio_fildes = handle;
}
-
ACE_POSIX_Asynch_Connect_Result::ACE_POSIX_Asynch_Connect_Result
(const ACE_Handler::Proxy_Ptr &handler_proxy,
ACE_HANDLE connect_handle,
@@ -1320,7 +1317,6 @@ ACE_POSIX_Asynch_Connect::connect (ACE_HANDLE connect_handle,
else
result = 0;
-
return 0;
}
@@ -1429,7 +1425,7 @@ ACE_POSIX_Asynch_Connect::connect_i (ACE_POSIX_Asynch_Connect_Result *result,
-1);
}
- for (;;)
+ for (; ; )
{
int rc = ACE_OS::connect
(handle,
@@ -1452,7 +1448,6 @@ ACE_POSIX_Asynch_Connect::connect_i (ACE_POSIX_Asynch_Connect_Result *result,
ACE_NOTREACHED (return 0);
}
-
//@@ New method cancel_uncompleted
// It performs cancellation of all pending requests
//
@@ -1478,7 +1473,7 @@ ACE_POSIX_Asynch_Connect::cancel_uncompleted (bool flg_notify,
set.reset ();
- for (; iter.next (me) != 0; retval++ , iter.advance ())
+ for (; iter.next (me) != 0; retval++ , iter.advance ())
{
ACE_HANDLE handle = me->ext_id_;
ACE_POSIX_Asynch_Connect_Result* result = me->int_id_ ;
@@ -1589,7 +1584,6 @@ ACE_POSIX_Asynch_Connect::handle_output (ACE_HANDLE fd)
return 0;
}
-
int
ACE_POSIX_Asynch_Connect::handle_close (ACE_HANDLE fd, ACE_Reactor_Mask)
{
@@ -1719,7 +1713,6 @@ ACE_POSIX_Asynch_Transmit_File_Result::~ACE_POSIX_Asynch_Transmit_File_Result (v
{
}
-
// *********************************************************************
/**
@@ -1829,7 +1822,6 @@ ACE_POSIX_Asynch_Transmit_Handler::~ACE_POSIX_Asynch_Transmit_Handler (void)
mb_->release ();
}
-
// Do the transmission.
// Initiate transmitting the header. When that completes
// handle_write_stream will be called, there start transmitting the file.
@@ -2163,7 +2155,6 @@ ACE_POSIX_Asynch_Read_Dgram_Result::saddr () const
return (sockaddr *) this->remote_address_->get_addr ();
}
-
int
ACE_POSIX_Asynch_Read_Dgram_Result::flags (void) const
{
@@ -2262,7 +2253,6 @@ ACE_POSIX_Asynch_Write_Dgram_Result::handle (void) const
return this->handle_;
}
-
ACE_Message_Block*
ACE_POSIX_Asynch_Write_Dgram_Result::message_block () const
{
diff --git a/dep/ACE_wrappers/ace/POSIX_Asynch_IO.h b/dep/ACE_wrappers/ace/POSIX_Asynch_IO.h
index 79e46f47c79..713d08f0e95 100644
--- a/dep/ACE_wrappers/ace/POSIX_Asynch_IO.h
+++ b/dep/ACE_wrappers/ace/POSIX_Asynch_IO.h
@@ -300,7 +300,6 @@ public:
virtual ~ACE_POSIX_Asynch_Read_Stream (void);
};
-
/**
* @class ACE_POSIX_Asynch_Write_Stream_Result
*
@@ -484,7 +483,6 @@ private:
int signal_number = 0);
};
-
/**
* @class ACE_POSIX_Asynch_Write_File_Result
*
@@ -651,7 +649,6 @@ protected:
// I/O handle for the new connection.
};
-
/**
* @class ACE_POSIX_Asynch_Accept
*
@@ -798,7 +795,6 @@ protected:
void connect_handle (ACE_HANDLE handle);
};
-
/**
* @class ACE_POSIX_Asynch_Connect
*
@@ -906,7 +902,6 @@ private:
ACE_SYNCH_MUTEX lock_;
};
-
/**
* @class ACE_POSIX_Asynch_Transmit_File_Result
*
@@ -1036,7 +1031,6 @@ public:
virtual ~ACE_POSIX_Asynch_Transmit_File (void);
};
-
/**
* @class ACE_POSIX_Asynch_Read_Dgram
*
@@ -1216,7 +1210,6 @@ protected:
ACE_POSIX_Asynch_Write_Dgram (void);
};
-
/*****************************************************/
/**
diff --git a/dep/ACE_wrappers/ace/POSIX_CB_Proactor.cpp b/dep/ACE_wrappers/ace/POSIX_CB_Proactor.cpp
index 8bf356d5f58..8003781a8c2 100644
--- a/dep/ACE_wrappers/ace/POSIX_CB_Proactor.cpp
+++ b/dep/ACE_wrappers/ace/POSIX_CB_Proactor.cpp
@@ -75,7 +75,6 @@ ACE_POSIX_CB_Proactor::notify_completion (int sig_num)
return this->sema_.release();
}
-
ssize_t
ACE_POSIX_CB_Proactor::allocate_aio_slot (ACE_POSIX_Asynch_Result *result)
{
@@ -150,7 +149,7 @@ ACE_POSIX_CB_Proactor::handle_events_i (u_long milli_seconds)
int ret_aio = 0;
int ret_que = 0;
- for (;; ret_aio++)
+ for (; ; ret_aio++)
{
ACE_POSIX_Asynch_Result * asynch_result =
this->find_completed_aio (error_status,
diff --git a/dep/ACE_wrappers/ace/POSIX_CB_Proactor.h b/dep/ACE_wrappers/ace/POSIX_CB_Proactor.h
index 1900a9422c5..8969d57acfe 100644
--- a/dep/ACE_wrappers/ace/POSIX_CB_Proactor.h
+++ b/dep/ACE_wrappers/ace/POSIX_CB_Proactor.h
@@ -27,7 +27,6 @@
#include "ace/POSIX_Proactor.h"
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
/**
diff --git a/dep/ACE_wrappers/ace/POSIX_Proactor.cpp b/dep/ACE_wrappers/ace/POSIX_Proactor.cpp
index 8079ac40fd8..c8c727277fb 100644
--- a/dep/ACE_wrappers/ace/POSIX_Proactor.cpp
+++ b/dep/ACE_wrappers/ace/POSIX_Proactor.cpp
@@ -49,7 +49,6 @@ public:
/// Destructor.
virtual ~ACE_POSIX_Wakeup_Completion (void);
-
/// This method calls the <handler>'s <handle_wakeup> method.
virtual void complete (size_t bytes_transferred = 0,
int success = 1,
@@ -184,7 +183,6 @@ ACE_POSIX_Proactor::create_asynch_read_stream_result
return implementation;
}
-
ACE_Asynch_Write_Stream_Impl *
ACE_POSIX_Proactor::create_asynch_write_stream (void)
{
@@ -220,7 +218,6 @@ ACE_POSIX_Proactor::create_asynch_write_stream_result
return implementation;
}
-
ACE_Asynch_Read_File_Impl *
ACE_POSIX_Proactor::create_asynch_read_file (void)
{
@@ -260,7 +257,6 @@ ACE_POSIX_Proactor::create_asynch_read_file_result
return implementation;
}
-
ACE_Asynch_Write_File_Impl *
ACE_POSIX_Proactor::create_asynch_write_file (void)
{
@@ -300,7 +296,6 @@ ACE_POSIX_Proactor::create_asynch_write_file_result
return implementation;
}
-
ACE_Asynch_Read_Dgram_Impl *
ACE_POSIX_Proactor::create_asynch_read_dgram (void)
{
@@ -341,7 +336,6 @@ ACE_POSIX_Proactor::create_asynch_read_dgram_result
return implementation;
}
-
ACE_Asynch_Write_Dgram_Impl *
ACE_POSIX_Proactor::create_asynch_write_dgram (void)
{
@@ -381,7 +375,6 @@ ACE_POSIX_Proactor::create_asynch_write_dgram_result
return implementation;
}
-
ACE_Asynch_Accept_Impl *
ACE_POSIX_Proactor::create_asynch_accept (void)
{
@@ -420,7 +413,6 @@ ACE_POSIX_Proactor::create_asynch_accept_result
return implementation;
}
-
ACE_Asynch_Connect_Impl *
ACE_POSIX_Proactor::create_asynch_connect (void)
{
@@ -453,7 +445,6 @@ ACE_POSIX_Proactor::create_asynch_connect_result
return implementation;
}
-
ACE_Asynch_Transmit_File_Impl *
ACE_POSIX_Proactor::create_asynch_transmit_file (void)
{
@@ -530,7 +521,7 @@ ACE_POSIX_Proactor::handle_signal (int, siginfo_t *, ucontext_t *)
ACE_Time_Value timeout (0, 0);
int result = 0;
- for (;;)
+ for (; ; )
{
result = this->handle_events (timeout);
if (result != 0 || errno == ETIME)
@@ -598,7 +589,6 @@ ACE_POSIX_Proactor::get_impl_type (void)
return PROACTOR_POSIX;
}
-
/**
* @class ACE_AIOCB_Notify_Pipe_Manager
*
@@ -726,7 +716,6 @@ ACE_AIOCB_Notify_Pipe_Manager::~ACE_AIOCB_Notify_Pipe_Manager (void)
}
-
int
ACE_AIOCB_Notify_Pipe_Manager::notify ()
{
@@ -773,7 +762,6 @@ ACE_AIOCB_Notify_Pipe_Manager::handle_read_stream
ACE_TEXT ("ACE_AIOCB_Notify_Pipe_Manager::handle_read_stream:")
ACE_TEXT ("Read from pipe failed")));
-
// 2. Do the upcalls
// this->posix_aiocb_proactor_->process_result_queue ();
}
@@ -835,7 +823,6 @@ ACE_POSIX_AIOCB_Proactor::get_impl_type (void)
return PROACTOR_AIOCB;
}
-
int
ACE_POSIX_AIOCB_Proactor::close (void)
{
@@ -914,7 +901,6 @@ int ACE_POSIX_AIOCB_Proactor::delete_result_aiocb_list (void)
char * op = (aiocb_list_[ai]->aio_lio_opcode == LIO_WRITE )?
"WRITE":"READ" ;
-
ACE_ERROR ((LM_ERROR,
ACE_TEXT("slot=%d op=%s status=%d xfercnt=%d %s\n"),
ai,
@@ -1117,7 +1103,6 @@ ACE_POSIX_Asynch_Result * ACE_POSIX_AIOCB_Proactor::getq_result (void)
{
ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->mutex_, 0));
-
ACE_POSIX_Asynch_Result* result = 0;
if (this->result_queue_.dequeue_head (result) != 0)
@@ -1206,7 +1191,7 @@ ACE_POSIX_AIOCB_Proactor::handle_events_i (u_long milli_seconds)
int error_status = 0;
size_t transfer_count = 0;
- for (;; retval++)
+ for (; ; retval++)
{
ACE_POSIX_Asynch_Result *asynch_result =
find_completed_aio (error_status,
@@ -1300,7 +1285,6 @@ ACE_POSIX_AIOCB_Proactor::find_completed_aio (int &error_status,
return asynch_result;
}
-
int
ACE_POSIX_AIOCB_Proactor::start_aio (ACE_POSIX_Asynch_Result *result,
ACE_POSIX_Proactor::Opcode op)
@@ -1460,7 +1444,6 @@ ACE_POSIX_AIOCB_Proactor::start_aio_i (ACE_POSIX_Asynch_Result *result)
return ret_val;
}
-
int
ACE_POSIX_AIOCB_Proactor::start_deferred_aio ()
{
@@ -1611,7 +1594,6 @@ ACE_POSIX_AIOCB_Proactor::cancel_aiocb (ACE_POSIX_Asynch_Result * result)
return 2;
}
-
// *********************************************************************
#if defined(ACE_HAS_POSIX_REALTIME_SIGNALS)
@@ -1843,7 +1825,6 @@ ACE_POSIX_SIG_Proactor::setup_signal_handler (int signal_number) const
return 0;
}
-
int
ACE_POSIX_SIG_Proactor::block_signals (void) const
{
@@ -1963,7 +1944,7 @@ ACE_POSIX_SIG_Proactor::handle_events_i (const ACE_Time_Value *timeout)
int ret_que = 0;
if (flg_aio)
- for (;; ret_aio++)
+ for (; ; ret_aio++)
{
ACE_POSIX_Asynch_Result *asynch_result =
find_completed_aio (error_status,
@@ -2023,7 +2004,6 @@ ACE_POSIX_Asynch_Timer::complete (size_t /* bytes_transferred */,
handler->handle_time_out (this->time_, this->act ());
}
-
// *********************************************************************
ACE_POSIX_Wakeup_Completion::ACE_POSIX_Wakeup_Completion
diff --git a/dep/ACE_wrappers/ace/POSIX_Proactor.h b/dep/ACE_wrappers/ace/POSIX_Proactor.h
index e3088d756a5..da2c48eae6f 100644
--- a/dep/ACE_wrappers/ace/POSIX_Proactor.h
+++ b/dep/ACE_wrappers/ace/POSIX_Proactor.h
@@ -73,7 +73,6 @@ public:
PROACTOR_CB = 4
};
-
enum SystemType // open for future extention
{
ACE_OS_UNDEFINED= 0x0000,
@@ -336,7 +335,6 @@ class ACE_Export ACE_POSIX_AIOCB_Proactor : public ACE_POSIX_Proactor
friend class ACE_POSIX_Asynch_Accept;
friend class ACE_POSIX_Asynch_Connect;
-
public:
/// Constructor defines max number asynchronous operations
/// which can be started at the same time
@@ -459,7 +457,6 @@ protected:
/// Process the internal results queue
int process_result_queue (void);
-
/// This class takes care of doing <accept> when we use
/// AIO_CONTROL_BLOCKS strategy.
ACE_AIOCB_Notify_Pipe_Manager *aiocb_notify_pipe_manager_;
@@ -606,7 +603,6 @@ protected:
sigset_t RT_completion_signals_;
};
-
#endif /* ACE_HAS_POSIX_REALTIME_SIGNALS */
/**
diff --git a/dep/ACE_wrappers/ace/Pair.h b/dep/ACE_wrappers/ace/Pair.h
index e1d8b526639..a92767790d9 100644
--- a/dep/ACE_wrappers/ace/Pair.h
+++ b/dep/ACE_wrappers/ace/Pair.h
@@ -12,7 +12,6 @@
*/
//=============================================================================
-
#ifndef ACE_PAIR_H
#define ACE_PAIR_H
diff --git a/dep/ACE_wrappers/ace/Pair_T.h b/dep/ACE_wrappers/ace/Pair_T.h
index 09629b49a26..313446d3678 100644
--- a/dep/ACE_wrappers/ace/Pair_T.h
+++ b/dep/ACE_wrappers/ace/Pair_T.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_PAIR_T_H
#define ACE_PAIR_T_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Parse_Node.cpp b/dep/ACE_wrappers/ace/Parse_Node.cpp
index 1132a345feb..27d74b905dd 100644
--- a/dep/ACE_wrappers/ace/Parse_Node.cpp
+++ b/dep/ACE_wrappers/ace/Parse_Node.cpp
@@ -15,7 +15,6 @@ ACE_RCSID (ace,
Parse_Node,
"$Id: Parse_Node.cpp 81245 2008-04-05 13:37:47Z johnnyw $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE (ACE_Stream_Node)
@@ -135,7 +134,6 @@ ACE_Stream_Node::ACE_Stream_Node (const ACE_Static_Node *str_ops,
ACE_TRACE ("ACE_Stream_Node::ACE_Stream_Node");
}
-
ACE_Stream_Node::~ACE_Stream_Node (void)
{
ACE_TRACE ("ACE_Stream_Node::~ACE_Stream_Node");
@@ -152,7 +150,6 @@ ACE_Parse_Node::ACE_Parse_Node (void)
ACE_TRACE ("ACE_Parse_Node::ACE_Parse_Node");
}
-
ACE_Parse_Node::ACE_Parse_Node (const ACE_TCHAR *nm)
: name_ (ACE::strnew (nm)),
next_ (0)
@@ -173,7 +170,6 @@ ACE_Parse_Node::print (void) const
this->next_->print ();
}
-
ACE_Parse_Node::~ACE_Parse_Node (void)
{
ACE_TRACE ("ACE_Parse_Node::~ACE_Parse_Node");
@@ -293,7 +289,6 @@ ACE_Remove_Node::apply (ACE_Service_Gestalt *config, int &yyerrno)
#endif /* ACE_NLOGGING */
}
-
ACE_Dynamic_Node::ACE_Dynamic_Node (ACE_Service_Type_Factory const *stf,
ACE_TCHAR *parms)
: ACE_Static_Node (stf->name (), parms)
@@ -397,7 +392,6 @@ ACE_Static_Node::~ACE_Static_Node (void)
delete[] this->parameters_;
}
-
ACE_ALLOC_HOOK_DEFINE (ACE_Location_Node)
void
@@ -823,12 +817,10 @@ ACE_Service_Type_Factory::ACE_Service_Type_Factory (ACE_TCHAR const *name,
{
}
-
ACE_Service_Type_Factory::~ACE_Service_Type_Factory (void)
{
}
-
ACE_Service_Type *
ACE_Service_Type_Factory::make_service_type (ACE_Service_Gestalt *cfg) const
{
@@ -879,7 +871,6 @@ ACE_Service_Type_Factory::name (void) const
return name_.c_str ();
}
-
ACE_END_VERSIONED_NAMESPACE_DECL
#endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */
diff --git a/dep/ACE_wrappers/ace/Parse_Node.h b/dep/ACE_wrappers/ace/Parse_Node.h
index 232b3890396..eeb743e26c3 100644
--- a/dep/ACE_wrappers/ace/Parse_Node.h
+++ b/dep/ACE_wrappers/ace/Parse_Node.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_PARSE_NODE_H
#define ACE_PARSE_NODE_H
@@ -194,7 +193,6 @@ private:
ACE_UNIMPLEMENTED_FUNC (ACE_Static_Node& operator= (const ACE_Static_Node&))
};
-
class ACE_Service_Type_Factory;
/**
diff --git a/dep/ACE_wrappers/ace/Ping_Socket.cpp b/dep/ACE_wrappers/ace/Ping_Socket.cpp
index a09e3731a80..56411a3cf5f 100644
--- a/dep/ACE_wrappers/ace/Ping_Socket.cpp
+++ b/dep/ACE_wrappers/ace/Ping_Socket.cpp
@@ -14,7 +14,6 @@
# include "ace/Ping_Socket.inl"
#endif /* !__ACE_INLINE__ */
-
ACE_RCSID (ace,
Ping_Socket,
"$Id: Ping_Socket.cpp 81737 2008-05-20 09:46:39Z johnnyw $")
@@ -81,14 +80,12 @@ struct icmp
#endif /* #if ! defined (ACE_WIN32) */
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
int const ICMP_MIN = 8; // Minimal size of ICMP packet, header only
int const ICMP_DATA_LENGTH = 56; // For ICMP data with Echo request
ACE_Time_Value const ACE_Ping_Socket::time_default_ (0, 500000);
-
void
ACE_Ping_Socket::dump (void) const
{
diff --git a/dep/ACE_wrappers/ace/Proactor.cpp b/dep/ACE_wrappers/ace/Proactor.cpp
index c56f352e789..0834d8eafbc 100644
--- a/dep/ACE_wrappers/ace/Proactor.cpp
+++ b/dep/ACE_wrappers/ace/Proactor.cpp
@@ -16,12 +16,10 @@
# include "ace/Service_Config.h"
#endif /* !ACE_HAS_WINCE && !ACE_LACKS_ACE_SVCCONF */
-
ACE_RCSID (ace,
Proactor,
"$Id: Proactor.cpp 81535 2008-04-29 20:08:52Z shuston $")
-
#include "ace/Task_T.h"
#include "ace/Log_Msg.h"
#include "ace/Framework_Component.h"
@@ -460,7 +458,7 @@ ACE_Proactor::proactor_run_event_loop (PROACTOR_EVENT_HOOK eh)
}
// Run the event loop.
- for (;;)
+ for (; ; )
{
// Check the end loop flag. It is ok to do this without lock,
// since we care just whether it is zero or non-zero.
@@ -517,7 +515,7 @@ ACE_Proactor::proactor_run_event_loop (ACE_Time_Value &tv,
}
// Run the event loop.
- for (;;)
+ for (; ; )
{
// Check the end loop flag. It is ok to do this without lock,
// since we care just whether it is zero or non-zero.
@@ -815,7 +813,6 @@ ACE_Proactor::implementation (void) const
return this->implementation_;
}
-
ACE_Asynch_Read_Stream_Impl *
ACE_Proactor::create_asynch_read_stream (void)
{
@@ -892,7 +889,6 @@ ACE_Proactor::create_asynch_read_stream_result
signal_number);
}
-
ACE_Asynch_Write_Stream_Result_Impl *
ACE_Proactor::create_asynch_write_stream_result
(ACE_Handler::Proxy_Ptr &handler_proxy,
diff --git a/dep/ACE_wrappers/ace/Proactor.h b/dep/ACE_wrappers/ace/Proactor.h
index 04e4aac19a5..17afb7ecd3f 100644
--- a/dep/ACE_wrappers/ace/Proactor.h
+++ b/dep/ACE_wrappers/ace/Proactor.h
@@ -297,7 +297,6 @@ public:
/// <run_event_loop> method can be restarted.
int proactor_reset_event_loop (void);
-
/// This method adds the @a handle to the I/O completion port. This
/// function is a no-op function for Unix systems and returns 0;
int register_handle (ACE_HANDLE handle,
@@ -628,7 +627,6 @@ protected:
/// Mutex to protect work with lists.
ACE_SYNCH_MUTEX mutex_;
-
private:
/// Deny access since member-wise won't work...
ACE_Proactor (const ACE_Proactor &);
diff --git a/dep/ACE_wrappers/ace/Proactor_Impl.h b/dep/ACE_wrappers/ace/Proactor_Impl.h
index dc79c8f57c1..b93606f443e 100644
--- a/dep/ACE_wrappers/ace/Proactor_Impl.h
+++ b/dep/ACE_wrappers/ace/Proactor_Impl.h
@@ -11,7 +11,6 @@
*/
//=============================================================================
-
#ifndef ACE_PROACTOR_IMPL_H
#define ACE_PROACTOR_IMPL_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Process.cpp b/dep/ACE_wrappers/ace/Process.cpp
index a39a02beb52..059d57bbbb5 100644
--- a/dep/ACE_wrappers/ace/Process.cpp
+++ b/dep/ACE_wrappers/ace/Process.cpp
@@ -40,7 +40,6 @@ sigchld_nop (int, siginfo_t *, ucontext_t *)
}
#endif /* ACE_WIN32 */
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_Process::ACE_Process (void)
@@ -1146,7 +1145,6 @@ ACE_Process_Options::set_handles (ACE_HANDLE std_in,
return 0; // Success.
}
-
void
ACE_Process_Options::release_handles ()
{
@@ -1166,7 +1164,6 @@ ACE_Process_Options::release_handles ()
}
#endif /* !ACE_HAS_WINCE */
-
ACE_Process_Options::~ACE_Process_Options (void)
{
#if !defined (ACE_HAS_WINCE)
diff --git a/dep/ACE_wrappers/ace/Process.h b/dep/ACE_wrappers/ace/Process.h
index 908d3d0cf97..6f83dc3bb1c 100644
--- a/dep/ACE_wrappers/ace/Process.h
+++ b/dep/ACE_wrappers/ace/Process.h
@@ -602,7 +602,6 @@ private:
#endif
};
-
/**
* @class ACE_Managed_Process
*
diff --git a/dep/ACE_wrappers/ace/Process_Manager.cpp b/dep/ACE_wrappers/ace/Process_Manager.cpp
index 95c92329a65..cf9b1e4b2c6 100644
--- a/dep/ACE_wrappers/ace/Process_Manager.cpp
+++ b/dep/ACE_wrappers/ace/Process_Manager.cpp
@@ -52,7 +52,6 @@ sigchld_nop (int, siginfo_t *, ucontext_t *)
}
#endif /* ACE_WIN32 */
-
ACE_ALLOC_HOOK_DEFINE(ACE_Process_Manager)
// Singleton instance.
@@ -640,7 +639,6 @@ ACE_Process_Manager::terminate (pid_t pid, int sig)
return ACE_OS::kill (pid, sig);
}
-
int
ACE_Process_Manager::set_scheduler (const ACE_Sched_Params & params,
pid_t pid)
diff --git a/dep/ACE_wrappers/ace/Process_Semaphore.h b/dep/ACE_wrappers/ace/Process_Semaphore.h
index 7a3e148ace3..aa5b8b1aa58 100644
--- a/dep/ACE_wrappers/ace/Process_Semaphore.h
+++ b/dep/ACE_wrappers/ace/Process_Semaphore.h
@@ -152,7 +152,6 @@ public:
ACE_END_VERSIONED_NAMESPACE_DECL
-
#if defined (__ACE_INLINE__)
#include "ace/Process_Semaphore.inl"
#endif /* __ACE_INLINE__ */
diff --git a/dep/ACE_wrappers/ace/Profile_Timer.cpp b/dep/ACE_wrappers/ace/Profile_Timer.cpp
index 2680ad06810..5400836095a 100644
--- a/dep/ACE_wrappers/ace/Profile_Timer.cpp
+++ b/dep/ACE_wrappers/ace/Profile_Timer.cpp
@@ -24,7 +24,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE(ACE_Profile_Timer)
-
void
ACE_Profile_Timer::dump (void) const
{
@@ -429,7 +428,6 @@ ACE_Profile_Timer::get_rusage (ACE_Profile_Timer::Rusage &usage)
usage = 0;
}
-
void
ACE_Profile_Timer::elapsed_rusage (ACE_Profile_Timer::Rusage &usage)
{
diff --git a/dep/ACE_wrappers/ace/Profile_Timer.h b/dep/ACE_wrappers/ace/Profile_Timer.h
index c46cdab2168..64721603362 100644
--- a/dep/ACE_wrappers/ace/Profile_Timer.h
+++ b/dep/ACE_wrappers/ace/Profile_Timer.h
@@ -10,7 +10,6 @@
*/
//==========================================================================
-
#ifndef ACE_PROFILE_TIMER_H
#define ACE_PROFILE_TIMER_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/RB_Tree.h b/dep/ACE_wrappers/ace/RB_Tree.h
index 536d7073ccc..b02e3e41139 100644
--- a/dep/ACE_wrappers/ace/RB_Tree.h
+++ b/dep/ACE_wrappers/ace/RB_Tree.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_RB_TREE_H
#define ACE_RB_TREE_H
#include /**/ "ace/pre.h"
@@ -208,7 +207,6 @@ public:
/// Constructor.
ACE_RB_Tree (ACE_Allocator *alloc = 0);
-
/// Copy constructor.
ACE_RB_Tree (const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &rbt);
@@ -242,7 +240,6 @@ public:
const INT_ID &int_id,
ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry);
-
/**
* Associate @a ext_id with @a int_id if and only if @a ext_id is not
* in the tree. If @a ext_id is already in the tree then the @a int_id
diff --git a/dep/ACE_wrappers/ace/RB_Tree.inl b/dep/ACE_wrappers/ace/RB_Tree.inl
index 7de889abf5b..e4e5ab3d759 100644
--- a/dep/ACE_wrappers/ace/RB_Tree.inl
+++ b/dep/ACE_wrappers/ace/RB_Tree.inl
@@ -22,7 +22,6 @@ ACE_RB_Tree_Node<EXT_ID, INT_ID>::key ()
return k_;
}
-
// Item accessor.
template <class EXT_ID, class INT_ID>
@@ -33,7 +32,6 @@ ACE_RB_Tree_Node<EXT_ID, INT_ID>::item ()
return t_;
}
-
// Set color of the node.
template <class EXT_ID, class INT_ID>
@@ -44,7 +42,6 @@ ACE_RB_Tree_Node<EXT_ID, INT_ID>::color (ACE_RB_Tree_Node_Base::RB_Tree_Node_Col
color_ = c;
}
-
// Get color of the node.
template <class EXT_ID, class INT_ID>
@@ -55,7 +52,6 @@ ACE_RB_Tree_Node<EXT_ID, INT_ID>::color ()
return color_;
}
-
// Accessor for node's parent pointer.
template <class EXT_ID, class INT_ID>
@@ -66,7 +62,6 @@ ACE_RB_Tree_Node<EXT_ID, INT_ID>::parent ()
return parent_;
}
-
// Mutator for node's parent pointer.
template <class EXT_ID, class INT_ID>
@@ -77,8 +72,6 @@ ACE_RB_Tree_Node<EXT_ID, INT_ID>::parent (ACE_RB_Tree_Node<EXT_ID, INT_ID> * p)
parent_ = p;
}
-
-
// Accessor for node's left child pointer.
template <class EXT_ID, class INT_ID>
@@ -89,7 +82,6 @@ ACE_RB_Tree_Node<EXT_ID, INT_ID>::left ()
return left_;
}
-
// Mutator for node's left child pointer.
template <class EXT_ID, class INT_ID>
@@ -100,7 +92,6 @@ ACE_RB_Tree_Node<EXT_ID, INT_ID>::left (ACE_RB_Tree_Node<EXT_ID, INT_ID> * l)
left_ = l;
}
-
// Accessor for node's right child pointer.
template <class EXT_ID, class INT_ID>
@@ -111,7 +102,6 @@ ACE_RB_Tree_Node<EXT_ID, INT_ID>::right ()
return right_;
}
-
// Mutator for node's right child pointer.
template <class EXT_ID, class INT_ID>
@@ -122,12 +112,10 @@ ACE_RB_Tree_Node<EXT_ID, INT_ID>::right (ACE_RB_Tree_Node<EXT_ID, INT_ID> * r)
right_ = r;
}
-
////////////////////////////////////////////////////////////////////////
// template class ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> //
////////////////////////////////////////////////////////////////////////
-
// Initialize an RB Tree.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -165,7 +153,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::close (void)
return this->close_i ();
}
-
// Associate <ext_id> with <int_id>. If <ext_id> is already in the
// tree then the <ACE_RB_Tree_Node> is not changed. Returns 0 if a
// new entry is bound successfully, returns 1 if an attempt is made
@@ -183,7 +170,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::bind (const EXT_ID &ext_id,
return this->insert_i (ext_id, int_id, entry);
}
-
// Same as a normal bind, except the tree entry is also passed back
// to the caller. The entry in this case will either be the newly
// created entry, or the existing one.
@@ -201,7 +187,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::bind (const EXT_ID &ext_id,
return this->insert_i (ext_id, int_id, entry);
}
-
// Associate <ext_id> with <int_id> if and only if <ext_id> is not
// in the tree. If <ext_id> is already in the tree then the <int_id>
// parameter is assigned the existing value in the tree. Returns 0
@@ -227,7 +212,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::trybind (const EXT_ID &ext_
return result;
}
-
// Same as a normal trybind, except the tree entry is also passed
// back to the caller. The entry in this case will either be the
// newly created entry, or the existing one.
@@ -249,11 +233,9 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::trybind (const EXT_ID &ext_
int_id = entry->item ();
}
-
return result;
}
-
// Reassociate <ext_id> with <int_id>. If <ext_id> is not in the
// tree then behaves just like <bind>. Returns 0 if a new entry is
// bound successfully, returns 1 if an existing entry was rebound,
@@ -279,7 +261,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_i
return result;
}
-
// Same as a normal rebind, except the tree entry is also passed back
// to the caller. The entry in this case will either be the newly
// created entry, or the existing one.
@@ -305,7 +286,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_i
return result;
}
-
// Associate <ext_id> with <int_id>. If <ext_id> is not in the tree
// then behaves just like <bind>. Otherwise, store the old value of
// <int_id> into the "out" parameter and rebind the new parameters.
@@ -335,7 +315,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_i
return result;
}
-
// Same as a normal rebind, except the tree entry is also passed back
// to the caller. The entry in this case will either be the newly
// created entry, or the existing one.
@@ -363,7 +342,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_i
return result;
}
-
// Associate <ext_id> with <int_id>. If <ext_id> is not in the tree
// then behaves just like <bind>. Otherwise, store the old values
// of <ext_id> and <int_id> into the "out" parameters and rebind the
@@ -398,7 +376,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_i
return result;
}
-
// Same as a normal rebind, except the tree entry is also passed back
// to the caller. The entry in this case will either be the newly
// created entry, or the existing one.
@@ -429,7 +406,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_i
return result;
}
-
// Locate <ext_id> and pass out parameter via <int_id>. If found,
// return 0, returns -1 if not found.
@@ -466,7 +442,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &ext_id,
return this->find_i (ext_id, entry);
}
-
// Unbind (remove) the <ext_id> from the tree. Don't return the
// <int_id> to the caller (this is useful for collections where the
// <int_id>s are *not* dynamically allocated...).
@@ -502,7 +477,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (const EXT_ID &ext_i
return -1;
}
-
// Break any association of <ext_id>. Returns the value of <int_id>
// in case the caller needs to deallocate memory.
@@ -537,7 +511,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (const EXT_ID &ext_i
return -1;
}
-
// Remove entry from the tree. This method should be used with *extreme*
// caution, and only for optimization purposes. The node being passed
// in had better have been allocated by the tree that is unbinding it.
@@ -551,7 +524,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (ACE_RB_Tree_Node<EX
return this->remove_i (entry);
}
-
// Returns a reference to the underlying <ACE_LOCK>. This makes it
// possible to acquire the lock explicitly, which can be useful in
// some cases if you instantiate the <ACE_Atomic_Op> with an
@@ -567,7 +539,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::mutex (void)
return this->lock_;
}
-
// Dump the state of an object.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -586,7 +557,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump (void) const
#endif /* ACE_HAS_DUMP */
}
-
// Return forward iterator positioned at first node in tree.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -598,7 +568,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::begin (void)
return ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> (*this);
}
-
// Return forward iterator positioned at last node in tree.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -610,7 +579,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::end (void)
return ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> ();
}
-
// Return reverse iterator positioned at last node in tree.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -622,7 +590,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rbegin (void)
return ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> (*this);
}
-
// Return reverse iterator positioned at first node in tree.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -634,7 +601,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rend (void)
return ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> ();
}
-
// Returns a pointer to the item corresponding to the given key,
// or 0 if it cannot find the key in the tree. DEPRECATED.
@@ -682,7 +648,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert (const EXT_ID &k, co
return this->insert_i (k, t);
}
-
// Removes the item associated with the given key from the
// tree and destroys it. Returns 1 if it found the item
// and successfully destroyed it, 0 if it did not find the
@@ -699,7 +664,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::remove (const EXT_ID &k)
return this->remove_i (k, i);
}
-
// Destroys all nodes and sets the root pointer null. DEPRECATED
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -722,7 +686,6 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::current_size () const
return current_size_;
}
-
///////////////////////////////////////////////////////////////////////
// template class //
// ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> //
@@ -747,7 +710,6 @@ ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::done (void) c
return node_ ? 0 : 1;
}
-
// STL-like iterator dereference operator: returns a reference
// to the node underneath the iterator.
@@ -759,7 +721,6 @@ ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator* (vo
return *(this->node_);
}
-
// STL-like iterator dereference operator: returns a reference
// to the node underneath the iterator.
@@ -771,7 +732,6 @@ ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-> (v
return this->node_;
}
-
// Returns a reference to the tree over which we're iterating.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>ACE_INLINE const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &
@@ -781,7 +741,6 @@ ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::tree (void)
return *tree_;
}
-
// Comparison operator: returns 1 if both iterators point to the same position, otherwise 0.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -793,7 +752,6 @@ ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator==
return (this->node_ == rbt.node_) ? true : false;
}
-
// Comparison operator: returns 1 if the iterators point to different positions, otherwise 0.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -805,7 +763,6 @@ ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator!=
return (this->node_ == rbt.node_) ? false : true;
}
-
// Move forward by one element in the tree. Returns 0 when
// there are no more elements in the tree, otherwise 1.
@@ -823,7 +780,6 @@ ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::forward_i (vo
return node_ ? 1 : 0;
}
-
// Move back by one element in the tree. Returns 0 when
// there are no more elements in the tree, otherwise 1.
@@ -841,7 +797,6 @@ ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::reverse_i (vo
return node_ ? 1 : 0;
}
-
//////////////////////////////////////////////////////////////////
// template class //
// ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> //
@@ -867,7 +822,6 @@ ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::advance (void)
return this->forward_i ();
}
-
// Dump the state of an object.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -881,7 +835,6 @@ ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump (void) const
#endif /* ACE_HAS_DUMP */
}
-
// Prefix advance.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -894,7 +847,6 @@ ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (void)
return *this;
}
-
// Postfix advance.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -908,7 +860,6 @@ ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (int)
return retv;
}
-
// Prefix reverse.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -921,7 +872,6 @@ ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (void)
return *this;
}
-
// Postfix reverse.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -935,7 +885,6 @@ ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (int)
return retv;
}
-
// Passes back the <entry> under the iterator. Returns 0 if
// the iteration has completed, otherwise 1. This method must
// be declared and defined in both the derived forward and
@@ -961,7 +910,6 @@ ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next (ACE_RB_Tree_
return 0;
}
-
// Accessor for key of node under iterator (if any). DEPRECATED.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -972,7 +920,6 @@ ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::key ()
return this->node_ ? (&(this->node_->key ())) : 0;
}
-
// Accessor for item of node under iterator (if any). DEPRECATED.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -983,7 +930,6 @@ ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::item ()
return this->node_ ? (&(this->node_->item ())) : 0;
}
-
// Move to the first item in the tree. DEPRECATED.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -995,7 +941,6 @@ ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::first ()
return this->node_ ? 1 : 0;
}
-
// Move to the last item in the tree. DEPRECATED.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -1007,7 +952,6 @@ ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::last ()
return this->node_ ? 1 : 0;
}
-
// Moves to the next item in the tree,
// returns 1 if there is a next item, 0 otherwise. DEPRECATED.
@@ -1020,7 +964,6 @@ ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next ()
return this->node_ ? 1 : 0;
}
-
// Moves to the previous item in the tree,
// returns 1 if there is a previous item, 0 otherwise. DEPRECATED.
@@ -1033,7 +976,6 @@ ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::previous ()
return this->node_ ? 1 : 0;
}
-
// Returns 0 if the iterator is positioned over a valid ACE_RB_Tree
// node, returns 1 if not. DEPRECATED.
@@ -1045,13 +987,11 @@ ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::is_done ()
return this->node_ ? 0 : 1;
}
-
//////////////////////////////////////////////////////////////////////////
// template class //
// ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> //
//////////////////////////////////////////////////////////////////////////
-
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
ACE_INLINE
ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Reverse_Iterator (void)
@@ -1072,7 +1012,6 @@ ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::advance (v
return this->reverse_i ();
}
-
// Dump the state of an object.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -1086,7 +1025,6 @@ ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump (void
#endif /* ACE_HAS_DUMP */
}
-
// Prefix advance.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -1099,7 +1037,6 @@ ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++
return *this;
}
-
// Postfix advance.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -1113,7 +1050,6 @@ ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++
return retv;
}
-
// Prefix reverse.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -1126,7 +1062,6 @@ ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator--
return *this;
}
-
// Postfix reverse.
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
@@ -1140,7 +1075,6 @@ ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator--
return retv;
}
-
// Passes back the <entry> under the iterator. Returns 0 if
// the iteration has completed, otherwise 1. This method must
// be declared and defined in both the derived forward and
diff --git a/dep/ACE_wrappers/ace/Reactor.cpp b/dep/ACE_wrappers/ace/Reactor.cpp
index 024a36129d2..02419d3ef4f 100644
--- a/dep/ACE_wrappers/ace/Reactor.cpp
+++ b/dep/ACE_wrappers/ace/Reactor.cpp
@@ -308,7 +308,7 @@ ACE_Reactor::run_alertable_reactor_event_loop (ACE_Time_Value &tv,
if (this->reactor_event_loop_done ())
return 0;
- for (;;)
+ for (; ; )
{
int result = this->implementation_->alertable_handle_events (tv);
diff --git a/dep/ACE_wrappers/ace/Reactor.h b/dep/ACE_wrappers/ace/Reactor.h
index 223c25b103f..dc89ed4d6cc 100644
--- a/dep/ACE_wrappers/ace/Reactor.h
+++ b/dep/ACE_wrappers/ace/Reactor.h
@@ -870,7 +870,6 @@ protected:
ACE_END_VERSIONED_NAMESPACE_DECL
-
#if defined (__ACE_INLINE__)
#include "ace/Reactor.inl"
#endif /* __ACE_INLINE__ */
diff --git a/dep/ACE_wrappers/ace/Reactor_Impl.h b/dep/ACE_wrappers/ace/Reactor_Impl.h
index d943e9ee5ec..db5a6ea2524 100644
--- a/dep/ACE_wrappers/ace/Reactor_Impl.h
+++ b/dep/ACE_wrappers/ace/Reactor_Impl.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_REACTOR_IMPL_H
#define ACE_REACTOR_IMPL_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Reactor_Timer_Interface.cpp b/dep/ACE_wrappers/ace/Reactor_Timer_Interface.cpp
index 91a4f48810a..504f0107980 100644
--- a/dep/ACE_wrappers/ace/Reactor_Timer_Interface.cpp
+++ b/dep/ACE_wrappers/ace/Reactor_Timer_Interface.cpp
@@ -6,7 +6,6 @@ ACE_RCSID (ace,
Reactor_Timer_Interface,
"$Id: Reactor_Timer_Interface.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_Reactor_Timer_Interface::~ACE_Reactor_Timer_Interface()
diff --git a/dep/ACE_wrappers/ace/Reactor_Token_T.h b/dep/ACE_wrappers/ace/Reactor_Token_T.h
index 4fcd2dae4f2..9eedb7b4d0b 100644
--- a/dep/ACE_wrappers/ace/Reactor_Token_T.h
+++ b/dep/ACE_wrappers/ace/Reactor_Token_T.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_REACTOR_TOKEN_T_H
#define ACE_REACTOR_TOKEN_T_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Read_Buffer.cpp b/dep/ACE_wrappers/ace/Read_Buffer.cpp
index d87e2c55d3c..f7cb7944eb6 100644
--- a/dep/ACE_wrappers/ace/Read_Buffer.cpp
+++ b/dep/ACE_wrappers/ace/Read_Buffer.cpp
@@ -15,7 +15,6 @@
ACE_RCSID(ace, Read_Buffer, "$Id: Read_Buffer.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
void
diff --git a/dep/ACE_wrappers/ace/Recyclable.cpp b/dep/ACE_wrappers/ace/Recyclable.cpp
index 1a31631fd9a..ec281377bac 100644
--- a/dep/ACE_wrappers/ace/Recyclable.cpp
+++ b/dep/ACE_wrappers/ace/Recyclable.cpp
@@ -1,7 +1,6 @@
//$Id: Recyclable.cpp 80826 2008-03-04 14:51:23Z wotte $
#include "ace/Recyclable.h"
-
#if !defined (__ACE_INLINE__)
#include "ace/Recyclable.inl"
#endif /* __ACE_INLINE __ */
diff --git a/dep/ACE_wrappers/ace/Registry.cpp b/dep/ACE_wrappers/ace/Registry.cpp
index 897df00a9af..5244f9feb16 100644
--- a/dep/ACE_wrappers/ace/Registry.cpp
+++ b/dep/ACE_wrappers/ace/Registry.cpp
@@ -24,7 +24,6 @@ ACE_RCSID (ace,
return 0; \
} while (0)
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_TCHAR const ACE_Registry::STRING_SEPARATOR[] = ACE_TEXT ("\\");
@@ -50,7 +49,6 @@ ACE_Registry::Binding::Binding ()
{
}
-
// Binding constructor
// (Name version)
ACE_Registry::Binding::Binding (const Name &name,
@@ -60,7 +58,6 @@ ACE_Registry::Binding::Binding (const Name &name,
{
}
-
// Binding constructor
// (String version)
ACE_Registry::Binding::Binding (const ACE_TString &name,
@@ -70,7 +67,6 @@ ACE_Registry::Binding::Binding (const ACE_TString &name,
{
}
-
bool
ACE_Registry::Binding::operator== (const Binding &rhs) const
{
@@ -93,7 +89,6 @@ ACE_Registry::Binding::name (Name &name)
name = ACE_Registry::make_name (this->name_);
}
-
// Name accessors
// (String version)
void
@@ -102,7 +97,6 @@ ACE_Registry::Binding::name (ACE_TString &name)
name = this->name_;
}
-
// Name accessors
// (String version)
ACE_TString
@@ -111,7 +105,6 @@ ACE_Registry::Binding::name (void)
return this->name_;
}
-
// Type accessor
ACE_Registry::Binding_Type
ACE_Registry::Binding::type (void)
@@ -119,7 +112,6 @@ ACE_Registry::Binding::type (void)
return this->type_;
}
-
// Simple object constructor
ACE_Registry::Object::Object (void *data,
u_long size,
@@ -137,42 +129,36 @@ ACE_Registry::Object::data (void *data)
this->data_ = data;
}
-
void *
ACE_Registry::Object::data (void) const
{
return this->data_;
}
-
void
ACE_Registry::Object::size (u_long size)
{
this->size_ = size;
}
-
u_long
ACE_Registry::Object::size (void) const
{
return this->size_;
}
-
void
ACE_Registry::Object::type (u_long type)
{
this->type_ = type;
}
-
u_long
ACE_Registry::Object::type (void) const
{
return this->type_;
}
-
// Simple context constructor
ACE_Registry::Naming_Context::Naming_Context (void)
: key_ ((HKEY) 0),
@@ -181,7 +167,6 @@ ACE_Registry::Naming_Context::Naming_Context (void)
{
}
-
// Context constructor
ACE_Registry::Naming_Context::Naming_Context (const HKEY &key)
: key_ (key),
@@ -190,7 +175,6 @@ ACE_Registry::Naming_Context::Naming_Context (const HKEY &key)
{
}
-
ACE_Registry::Naming_Context::Naming_Context (const Naming_Context &rhs)
: key_ (rhs.key_),
parent_key_ (rhs.parent_key_),
@@ -201,7 +185,6 @@ ACE_Registry::Naming_Context::Naming_Context (const Naming_Context &rhs)
// But since this is private (and not used), I don't care much
}
-
const ACE_Registry::Naming_Context &
ACE_Registry::Naming_Context::operator= (const Naming_Context &rhs)
{
@@ -211,14 +194,12 @@ ACE_Registry::Naming_Context::operator= (const Naming_Context &rhs)
return *this;
}
-
// Destructor
ACE_Registry::Naming_Context::~Naming_Context ()
{
this->close ();
}
-
// Insert <object> with <name> into <this> context
// (Name version)
int
@@ -228,7 +209,6 @@ ACE_Registry::Naming_Context::bind_new (const Name &name,
return this->bind_new (ACE_Registry::make_string (name), object);
}
-
// Insert <object> with <name> into <this> context
// (String version)
int
@@ -247,7 +227,6 @@ ACE_Registry::Naming_Context::bind_new (const ACE_TString &name,
return result;
}
-
// Insert or update <object> with <name> into <this> context
// (Name version)
int
@@ -257,7 +236,6 @@ ACE_Registry::Naming_Context::bind (const Name &name,
return this->bind (ACE_Registry::make_string (name), object);
}
-
// Insert or update <object> with <name> into <this> context
// (String version)
int
@@ -273,7 +251,6 @@ ACE_Registry::Naming_Context::bind (const ACE_TString &name,
ACE_REGISTRY_CALL_RETURN (result);
}
-
// Update <object> with <name> in <this> context
// (Name version)
int
@@ -283,7 +260,6 @@ ACE_Registry::Naming_Context::rebind (const Name &name,
return this->rebind (ACE_Registry::make_string (name), new_object);
}
-
// Update <object> with <name> in <this> context
// (String version)
int
@@ -299,7 +275,6 @@ ACE_Registry::Naming_Context::rebind (const ACE_TString &name,
return result;
}
-
// Find <object> with <name> in <this> context
// (Name version)
int
@@ -309,7 +284,6 @@ ACE_Registry::Naming_Context::resolve (const Name &name,
return this->resolve (ACE_Registry::make_string (name), object);
}
-
// Find <object> with <name> in <this> context
// (String version)
int
@@ -338,7 +312,6 @@ ACE_Registry::Naming_Context::resolve (const ACE_TString &name,
ACE_REGISTRY_CALL_RETURN (result);
}
-
// Remove object with <name> in <this> context
// (Name version)
int
@@ -347,7 +320,6 @@ ACE_Registry::Naming_Context::unbind (const Name &name)
return this->unbind (ACE_Registry::make_string (name));
}
-
// Remove object with <name> in <this> context
// (String version)
int
@@ -359,7 +331,6 @@ ACE_Registry::Naming_Context::unbind (const ACE_TString &name)
ACE_REGISTRY_CALL_RETURN (result);
}
-
// Create new <naming_context> relative to <this> context
// This method may not mean a lot in this implementation
int
@@ -369,7 +340,6 @@ ACE_Registry::Naming_Context::new_context (Naming_Context &naming_context)
return naming_context.close ();
}
-
// Insert <naming_context> with <name> relative to <this> context
// (Name version)
int
@@ -386,7 +356,6 @@ ACE_Registry::Naming_Context::bind_new_context (const Name &name,
security_attributes);
}
-
// Insert <naming_context> with <name> relative to <this> context
// (String version)
int
@@ -434,7 +403,6 @@ ACE_Registry::Naming_Context::bind_new_context (const ACE_TString &name,
ACE_REGISTRY_CALL_RETURN (result);
}
-
// Insert or update <naming_context> with <name> relative to <this> context
// (Name version)
int
@@ -451,7 +419,6 @@ ACE_Registry::Naming_Context::bind_context (const Name &name,
security_attributes);
}
-
// Insert or update <naming_context> with <name> relative to <this> context
// (String version)
int
@@ -483,7 +450,6 @@ ACE_Registry::Naming_Context::bind_context (const ACE_TString &name,
ACE_REGISTRY_CALL_RETURN (result);
}
-
// Rename <naming_context> to <name>
// (Name version)
int
@@ -494,7 +460,6 @@ ACE_Registry::Naming_Context::rebind_context (const Name &name,
new_naming_context);
}
-
// Rename <naming_context> to <name>
// (String version)
int
@@ -520,7 +485,6 @@ ACE_Registry::Naming_Context::rebind_context (const ACE_TString &name,
return result;
}
-
// Remove naming_context with <name> from <this> context
// (Name version)
int
@@ -529,7 +493,6 @@ ACE_Registry::Naming_Context::unbind_context (const Name &name)
return this->unbind_context (ACE_Registry::make_string (name));
}
-
// Remove naming_context with <name> from <this> context
// (String version)
int
@@ -541,7 +504,6 @@ ACE_Registry::Naming_Context::unbind_context (const ACE_TString &name)
ACE_REGISTRY_CALL_RETURN (result);
}
-
// Find <naming_context> with <name> in <this> context
// (Name version)
int
@@ -554,7 +516,6 @@ ACE_Registry::Naming_Context::resolve_context (const Name &name,
security_access);
}
-
// Find <naming_context> with <name> in <this> context
// (String version)
int
@@ -578,7 +539,6 @@ ACE_Registry::Naming_Context::resolve_context (const ACE_TString &name,
ACE_REGISTRY_CALL_RETURN (result);
}
-
// Same as unbind_context() with <this> as naming_context
int
ACE_Registry::Naming_Context::destroy (void)
@@ -590,7 +550,6 @@ ACE_Registry::Naming_Context::destroy (void)
ACE_REGISTRY_CALL_RETURN (result);
}
-
// Sync content of context to disk
int
ACE_Registry::Naming_Context::flush (void)
@@ -599,7 +558,6 @@ ACE_Registry::Naming_Context::flush (void)
ACE_REGISTRY_CALL_RETURN (result);
}
-
// Close the handle of the context
int
ACE_Registry::Naming_Context::close (void)
@@ -608,7 +566,6 @@ ACE_Registry::Naming_Context::close (void)
ACE_REGISTRY_CALL_RETURN (result);
}
-
// Convert a <name> to a <string>
ACE_TString
ACE_Registry::make_string (const Name &const_name)
@@ -632,7 +589,6 @@ ACE_Registry::make_string (const Name &const_name)
return string;
}
-
// Convert a <string> to a <name>
ACE_Registry::Name
ACE_Registry::make_name (const ACE_TString &string)
@@ -671,7 +627,6 @@ ACE_Registry::make_name (const ACE_TString &string)
return name;
}
-
// Set key
void
ACE_Registry::Naming_Context::key (HKEY key)
@@ -679,7 +634,6 @@ ACE_Registry::Naming_Context::key (HKEY key)
this->key_ = key;
}
-
// Get key
HKEY
ACE_Registry::Naming_Context::key (void)
@@ -687,7 +641,6 @@ ACE_Registry::Naming_Context::key (void)
return this->key_;
}
-
// Set parent
void
ACE_Registry::Naming_Context::parent (HKEY parent)
@@ -695,7 +648,6 @@ ACE_Registry::Naming_Context::parent (HKEY parent)
this->parent_key_ = parent;
}
-
// Get parent
HKEY
ACE_Registry::Naming_Context::parent (void)
@@ -703,7 +655,6 @@ ACE_Registry::Naming_Context::parent (void)
return this->parent_key_;
}
-
// Set name
// (Name version)
void
@@ -712,7 +663,6 @@ ACE_Registry::Naming_Context::name (const Name &name)
this->name_ = ACE_Registry::make_string (name);
}
-
// Get name
// (Name version)
void
@@ -721,7 +671,6 @@ ACE_Registry::Naming_Context::name (Name &name)
name = ACE_Registry::make_name (this->name_);
}
-
// Set name
// (String version)
void
@@ -730,7 +679,6 @@ ACE_Registry::Naming_Context::name (const ACE_TString &name)
this->name_ = name;
}
-
// Get name
// (String version)
ACE_TString
@@ -739,7 +687,6 @@ ACE_Registry::Naming_Context::name (void)
return this->name_;
}
-
// Get name
// (String version)
void
@@ -776,7 +723,6 @@ ACE_Registry::Naming_Context::list (u_long how_many,
return iter.next_n (how_many, list);
}
-
// listing function: iterator creator
// This gives back a listing of all entries in <this> context.
int
@@ -807,7 +753,6 @@ ACE_Registry::Naming_Context::list (Binding_List &list)
return 0;
}
-
// Default constructor
ACE_Registry::Binding_Iterator::Binding_Iterator ()
{
@@ -817,7 +762,6 @@ ACE_Registry::Binding_Iterator::Binding_Iterator ()
this->reset ();
}
-
void
ACE_Registry::Binding_Iterator::reset ()
{
@@ -827,27 +771,23 @@ ACE_Registry::Binding_Iterator::reset ()
this->context_iteration_.reset ();
}
-
void
ACE_Registry::Binding_Iterator::Iteration_State::reset ()
{
this->index_ = 0;
}
-
void
ACE_Registry::Binding_Iterator::Iteration_State::iterator (Binding_Iterator *iter)
{
this->parent_ = iter;
}
-
ACE_Registry::Binding_Iterator::Iteration_State::Iteration_State ()
: index_ (0)
{
}
-
// Next entry
int
ACE_Registry::Binding_Iterator::next_one (Binding &binding)
@@ -865,7 +805,6 @@ ACE_Registry::Binding_Iterator::next_one (Binding &binding)
return result;
}
-
// Next <how_many> entries
int
ACE_Registry::Binding_Iterator::next_n (u_long how_many,
@@ -877,7 +816,6 @@ ACE_Registry::Binding_Iterator::next_n (u_long how_many,
return this->current_enumeration_->next_n (how_many, list);
}
-
// Destroy iterator
int
ACE_Registry::Binding_Iterator::destroy (void)
@@ -886,7 +824,6 @@ ACE_Registry::Binding_Iterator::destroy (void)
return 0;
}
-
// Set/Get naming_context
void
ACE_Registry::Binding_Iterator::naming_context (Naming_Context &naming_context)
@@ -894,14 +831,12 @@ ACE_Registry::Binding_Iterator::naming_context (Naming_Context &naming_context)
this->naming_context_ = &naming_context;
}
-
ACE_Registry::Naming_Context &
ACE_Registry::Binding_Iterator::naming_context (void)
{
return *this->naming_context_;
}
-
// Set/Get current enumeration
void
ACE_Registry::Binding_Iterator::current_enumeration (Iteration_State &current_enumeration)
@@ -909,14 +844,12 @@ ACE_Registry::Binding_Iterator::current_enumeration (Iteration_State &current_en
this->current_enumeration_ = &current_enumeration;
}
-
ACE_Registry::Binding_Iterator::Iteration_State &
ACE_Registry::Binding_Iterator::current_enumeration (void)
{
return *this->current_enumeration_;
}
-
int
ACE_Registry::Binding_Iterator::Object_Iteration::next_n (u_long how_many,
Binding_List &list)
@@ -986,7 +919,6 @@ ACE_Registry::Binding_Iterator::Object_Iteration::next_n (u_long how_many,
return 0;
}
-
int
ACE_Registry::Binding_Iterator::Context_Iteration::next_n (u_long how_many,
Binding_List &list)
@@ -1051,7 +983,6 @@ ACE_Registry::Binding_Iterator::Context_Iteration::next_n (u_long how_many,
return 0;
}
-
int
ACE_Registry::Binding_Iterator::Iteration_Complete::next_n (u_long how_many,
Binding_List &list)
@@ -1063,7 +994,6 @@ ACE_Registry::Binding_Iterator::Iteration_Complete::next_n (u_long how_many,
return -1;
}
-
// Factory method to connect to predefined registries
// This method works for both remote and local machines
// However, for remote machines CLASSES_ROOT and CURRENT_USER
diff --git a/dep/ACE_wrappers/ace/Registry.h b/dep/ACE_wrappers/ace/Registry.h
index 2fc7a37d6d1..f3521829c2a 100644
--- a/dep/ACE_wrappers/ace/Registry.h
+++ b/dep/ACE_wrappers/ace/Registry.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_REGISTRY_H
#define ACE_REGISTRY_H
#include /**/ "ace/pre.h"
@@ -258,7 +257,6 @@ public:
/// Delete object with @a name in @c this context
int unbind (const ACE_TString &name);
-
// The following interfaces are for Naming Context
/// Create new @c naming_context
diff --git a/dep/ACE_wrappers/ace/Registry_Name_Space.cpp b/dep/ACE_wrappers/ace/Registry_Name_Space.cpp
index f59890e6c23..bfb27ef7dc5 100644
--- a/dep/ACE_wrappers/ace/Registry_Name_Space.cpp
+++ b/dep/ACE_wrappers/ace/Registry_Name_Space.cpp
@@ -20,12 +20,10 @@ ACE_Registry_Name_Space::ACE_Registry_Name_Space (ACE_Name_Options *name_options
ACE_TEXT ("ACE_Registry_Name_Space::open")));
}
-
ACE_Registry_Name_Space::~ACE_Registry_Name_Space (void)
{
}
-
int
ACE_Registry_Name_Space::open (ACE_Name_Options *name_options)
{
@@ -57,7 +55,6 @@ ACE_Registry_Name_Space::open (ACE_Name_Options *name_options)
return 0;
}
-
int
ACE_Registry_Name_Space::bind (const ACE_NS_WString &name,
const ACE_NS_WString &value,
@@ -85,7 +82,6 @@ ACE_Registry_Name_Space::bind (const ACE_NS_WString &name,
#endif /* ACE_HAS_WCHAR */
}
-
int
ACE_Registry_Name_Space::rebind (const ACE_NS_WString &name,
const ACE_NS_WString &value,
@@ -113,7 +109,6 @@ ACE_Registry_Name_Space::rebind (const ACE_NS_WString &name,
#endif /* ACE_USES_WCHAR */
}
-
int
ACE_Registry_Name_Space::unbind (const ACE_NS_WString &name)
{
@@ -124,7 +119,6 @@ ACE_Registry_Name_Space::unbind (const ACE_NS_WString &name)
#endif /* ACE_USES_WCHAR */
}
-
int
ACE_Registry_Name_Space::resolve (const ACE_NS_WString &name,
ACE_NS_WString &value,
@@ -166,7 +160,6 @@ ACE_Registry_Name_Space::resolve (const ACE_NS_WString &name,
return 0;
}
-
int
ACE_Registry_Name_Space:: list_names (ACE_WSTRING_SET &set,
const ACE_NS_WString &pattern)
@@ -188,7 +181,6 @@ ACE_Registry_Name_Space:: list_names (ACE_WSTRING_SET &set,
return 0;
}
-
int
ACE_Registry_Name_Space::list_values (ACE_WSTRING_SET &set,
const ACE_NS_WString &pattern)
@@ -210,7 +202,6 @@ ACE_Registry_Name_Space::list_values (ACE_WSTRING_SET &set,
return 0;
}
-
int
ACE_Registry_Name_Space::list_types (ACE_WSTRING_SET &set,
const ACE_NS_WString &pattern)
@@ -221,7 +212,6 @@ ACE_Registry_Name_Space::list_types (ACE_WSTRING_SET &set,
return 0;
}
-
int
ACE_Registry_Name_Space::list_name_entries (ACE_BINDING_SET &set,
const ACE_NS_WString &pattern)
@@ -264,7 +254,6 @@ ACE_Registry_Name_Space::list_name_entries (ACE_BINDING_SET &set,
return 0;
}
-
int
ACE_Registry_Name_Space::list_value_entries (ACE_BINDING_SET &set,
const ACE_NS_WString &pattern)
@@ -272,7 +261,6 @@ ACE_Registry_Name_Space::list_value_entries (ACE_BINDING_SET &set,
return this->list_name_entries (set, pattern);
}
-
int
ACE_Registry_Name_Space::list_type_entries (ACE_BINDING_SET &set,
const ACE_NS_WString &pattern)
@@ -280,7 +268,6 @@ ACE_Registry_Name_Space::list_type_entries (ACE_BINDING_SET &set,
return this->list_name_entries (set, pattern);
}
-
void
ACE_Registry_Name_Space::dump (void) const
{
diff --git a/dep/ACE_wrappers/ace/Registry_Name_Space.h b/dep/ACE_wrappers/ace/Registry_Name_Space.h
index 842231777b6..213856bd17d 100644
--- a/dep/ACE_wrappers/ace/Registry_Name_Space.h
+++ b/dep/ACE_wrappers/ace/Registry_Name_Space.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_REGISTRY_NAME_SPACE_H
#define ACE_REGISTRY_NAME_SPACE_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Remote_Name_Space.h b/dep/ACE_wrappers/ace/Remote_Name_Space.h
index 8b4ebdfc65e..ea9e43a90c0 100644
--- a/dep/ACE_wrappers/ace/Remote_Name_Space.h
+++ b/dep/ACE_wrappers/ace/Remote_Name_Space.h
@@ -10,7 +10,6 @@
*/
//==========================================================================
-
#ifndef ACE_REMOTE_NAME_SPACE_H
#define ACE_REMOTE_NAME_SPACE_H
diff --git a/dep/ACE_wrappers/ace/Remote_Tokens.cpp b/dep/ACE_wrappers/ace/Remote_Tokens.cpp
index 3df59910fa7..560307b5550 100644
--- a/dep/ACE_wrappers/ace/Remote_Tokens.cpp
+++ b/dep/ACE_wrappers/ace/Remote_Tokens.cpp
@@ -10,12 +10,10 @@
#include "ace/Remote_Tokens.inl"
#endif /* __ACE_INLINE__ */
-
ACE_RCSID (ace,
Remote_Tokens,
"$Id: Remote_Tokens.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
#define ACE_TSS_CONNECTION_MUTEX ACE_Thread_Mutex
#else
@@ -480,7 +478,6 @@ ACE_Remote_RLock::dump (void) const
#endif /* ACE_HAS_DUMP */
}
-
ACE_Tokens *
ACE_Remote_WLock::create_token (const ACE_TCHAR *name)
{
diff --git a/dep/ACE_wrappers/ace/Remote_Tokens.h b/dep/ACE_wrappers/ace/Remote_Tokens.h
index d9a47cf7aa8..77d0acc69d6 100644
--- a/dep/ACE_wrappers/ace/Remote_Tokens.h
+++ b/dep/ACE_wrappers/ace/Remote_Tokens.h
@@ -63,7 +63,6 @@ public:
int ignore_deadlock = 0,
int debug = 0);
-
/**
* Open a connection with the token server. This only need be used
* when the user wishes to explicitly open a connection to check if
diff --git a/dep/ACE_wrappers/ace/SOCK_CODgram.h b/dep/ACE_wrappers/ace/SOCK_CODgram.h
index 761a92d9d31..b7641fccb19 100644
--- a/dep/ACE_wrappers/ace/SOCK_CODgram.h
+++ b/dep/ACE_wrappers/ace/SOCK_CODgram.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_SOCK_CODGRAM_H
#define ACE_SOCK_CODGRAM_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/SOCK_Dgram_Bcast.cpp b/dep/ACE_wrappers/ace/SOCK_Dgram_Bcast.cpp
index 0a55c5149fa..2fdf4de8c73 100644
--- a/dep/ACE_wrappers/ace/SOCK_Dgram_Bcast.cpp
+++ b/dep/ACE_wrappers/ace/SOCK_Dgram_Bcast.cpp
@@ -165,7 +165,6 @@ ACE_SOCK_Dgram_Bcast::mk_broadcast (const ACE_TCHAR *host_name)
#endif /* ! _UNICOS */
}
-
#if !defined(AIX) && !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (ACE_VXWORKS) && !defined(__APPLE__)
for (int n = ifc.ifc_len / sizeof (struct ifreq) ; n > 0;
n--, ifr++)
diff --git a/dep/ACE_wrappers/ace/SOCK_Dgram_Bcast.h b/dep/ACE_wrappers/ace/SOCK_Dgram_Bcast.h
index a85ffc22052..0590b79d608 100644
--- a/dep/ACE_wrappers/ace/SOCK_Dgram_Bcast.h
+++ b/dep/ACE_wrappers/ace/SOCK_Dgram_Bcast.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_SOCK_DGRAM_BCAST_H
#define ACE_SOCK_DGRAM_BCAST_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/SOCK_Dgram_Mcast.cpp b/dep/ACE_wrappers/ace/SOCK_Dgram_Mcast.cpp
index 81ea48352d1..2c327f08255 100644
--- a/dep/ACE_wrappers/ace/SOCK_Dgram_Mcast.cpp
+++ b/dep/ACE_wrappers/ace/SOCK_Dgram_Mcast.cpp
@@ -96,7 +96,7 @@ ACE_SOCK_Dgram_Mcast::dump (void) const
ACE_MT (ACE_GUARD (ACE_SDM_LOCK, guard, this->subscription_list_lock_));
subscription_list_iter_t iter (this->subscription_list_);
- for ( ; !iter.done (); iter.advance ())
+ for (; !iter.done (); iter.advance ())
{
ACE_TCHAR iface_string[MAXNAMELEN + 1];
ip_mreq *pm = iter.next ();
@@ -612,7 +612,6 @@ ACE_SOCK_Dgram_Mcast::unsubscribe_ifs (const ACE_INET_Addr &mcast_addr,
{
ACE_TRACE ("ACE_SOCK_Dgram_Mcast::unsubscribe_ifs");
-
if (ACE_BIT_ENABLED (this->opts_, OPT_NULLIFACE_ALL)
&& net_if == 0)
{
@@ -690,7 +689,6 @@ ACE_SOCK_Dgram_Mcast::unsubscribe_ifs (const ACE_INET_Addr &mcast_addr,
return 1;
-
}
else
{
@@ -797,7 +795,6 @@ ACE_SOCK_Dgram_Mcast::unsubscribe_ifs (const ACE_INET_Addr &mcast_addr,
return 0;
}
-
int
ACE_SOCK_Dgram_Mcast::leave (const ACE_INET_Addr &mcast_addr,
const ACE_TCHAR *net_if)
diff --git a/dep/ACE_wrappers/ace/SOCK_Dgram_Mcast.h b/dep/ACE_wrappers/ace/SOCK_Dgram_Mcast.h
index a14e1fc0994..093e9fc8558 100644
--- a/dep/ACE_wrappers/ace/SOCK_Dgram_Mcast.h
+++ b/dep/ACE_wrappers/ace/SOCK_Dgram_Mcast.h
@@ -257,7 +257,6 @@ public:
int reuse_addr = 1, // (see above)
const ACE_TCHAR *net_if = 0);
-
/// Leave a multicast group on a given interface (or all interfaces, if
/// supported).
/**
diff --git a/dep/ACE_wrappers/ace/SOCK_Netlink.cpp b/dep/ACE_wrappers/ace/SOCK_Netlink.cpp
index 673b64b2958..7ebb6220e88 100644
--- a/dep/ACE_wrappers/ace/SOCK_Netlink.cpp
+++ b/dep/ACE_wrappers/ace/SOCK_Netlink.cpp
@@ -41,7 +41,6 @@ int ACE_SOCK_Netlink::open (ACE_Netlink_Addr &local,
return 0;
}
-
ACE_SOCK_Netlink::ACE_SOCK_Netlink (ACE_Netlink_Addr &local,
int protocol_family,
int protocol)
diff --git a/dep/ACE_wrappers/ace/SOCK_SEQPACK_Acceptor.h b/dep/ACE_wrappers/ace/SOCK_SEQPACK_Acceptor.h
index 2a524652f5b..526b374f3fd 100644
--- a/dep/ACE_wrappers/ace/SOCK_SEQPACK_Acceptor.h
+++ b/dep/ACE_wrappers/ace/SOCK_SEQPACK_Acceptor.h
@@ -80,7 +80,6 @@ public:
int backlog = ACE_DEFAULT_BACKLOG,
int protocol = 132);
-
/**
* Initialize a passive-mode BSD-style acceptor socket (no QoS).
* @a local_sap is the address that we're going to listen for
@@ -102,7 +101,6 @@ public:
int backlog = ACE_DEFAULT_BACKLOG,
int protocol = 132);
-
/// Initialize a passive-mode QoS-enabled acceptor socket. Returns 0
/// on success and -1 on failure.
int open (const ACE_Addr &local_sap,
diff --git a/dep/ACE_wrappers/ace/SOCK_SEQPACK_Association.cpp b/dep/ACE_wrappers/ace/SOCK_SEQPACK_Association.cpp
index 13938988826..dcb1cb73ee6 100644
--- a/dep/ACE_wrappers/ace/SOCK_SEQPACK_Association.cpp
+++ b/dep/ACE_wrappers/ace/SOCK_SEQPACK_Association.cpp
@@ -202,7 +202,6 @@ ACE_SOCK_SEQPACK_Association::get_local_addrs (ACE_INET_Addr *addrs, size_t &siz
return 0;
}
-
int
ACE_SOCK_SEQPACK_Association::get_remote_addrs (ACE_INET_Addr *addrs, size_t &size) const
{
diff --git a/dep/ACE_wrappers/ace/SOCK_SEQPACK_Connector.cpp b/dep/ACE_wrappers/ace/SOCK_SEQPACK_Connector.cpp
index 3b6adfd7755..63ba98d73f1 100644
--- a/dep/ACE_wrappers/ace/SOCK_SEQPACK_Connector.cpp
+++ b/dep/ACE_wrappers/ace/SOCK_SEQPACK_Connector.cpp
@@ -40,8 +40,6 @@ ACE_SOCK_SEQPACK_Connector::shared_open (ACE_SOCK_SEQPACK_Association &new_assoc
{
ACE_TRACE ("ACE_SOCK_SEQPACK_Connector::shared_open");
-
-
// Only open a new socket if we don't already have a valid handle.
if (new_association.get_handle () == ACE_INVALID_HANDLE &&
#if defined (ACE_HAS_LKSCTP)
@@ -269,7 +267,6 @@ ACE_SOCK_SEQPACK_Connector::shared_connect_finish (ACE_SOCK_SEQPACK_Association
// Actively connect and produce a new ACE_SOCK_SEQPACK_Association if things go well...
-
int
ACE_SOCK_SEQPACK_Connector::connect (ACE_SOCK_SEQPACK_Association &new_association,
const ACE_Addr &remote_sap,
diff --git a/dep/ACE_wrappers/ace/SPIPE.h b/dep/ACE_wrappers/ace/SPIPE.h
index a65ade1db15..d561a1575a5 100644
--- a/dep/ACE_wrappers/ace/SPIPE.h
+++ b/dep/ACE_wrappers/ace/SPIPE.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_SPIPE_H
#define ACE_SPIPE_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/SPIPE_Acceptor.h b/dep/ACE_wrappers/ace/SPIPE_Acceptor.h
index bf3b3bba461..44b049763d5 100644
--- a/dep/ACE_wrappers/ace/SPIPE_Acceptor.h
+++ b/dep/ACE_wrappers/ace/SPIPE_Acceptor.h
@@ -11,7 +11,6 @@
*/
//=============================================================================
-
#ifndef ACE_SPIPE_ACCEPTOR_H
#define ACE_SPIPE_ACCEPTOR_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/SPIPE_Addr.cpp b/dep/ACE_wrappers/ace/SPIPE_Addr.cpp
index 3f84da76cc4..390d2aa49bd 100644
--- a/dep/ACE_wrappers/ace/SPIPE_Addr.cpp
+++ b/dep/ACE_wrappers/ace/SPIPE_Addr.cpp
@@ -42,7 +42,6 @@ ACE_SPIPE_Addr::get_addr (void) const
return (void *) &this->SPIPE_addr_;
}
-
// Do nothing constructor.
ACE_SPIPE_Addr::ACE_SPIPE_Addr (void)
diff --git a/dep/ACE_wrappers/ace/SPIPE_Addr.inl b/dep/ACE_wrappers/ace/SPIPE_Addr.inl
index a20e0e86f7c..e84b2f0bb2e 100644
--- a/dep/ACE_wrappers/ace/SPIPE_Addr.inl
+++ b/dep/ACE_wrappers/ace/SPIPE_Addr.inl
@@ -2,7 +2,6 @@
//
// $Id: SPIPE_Addr.inl 80826 2008-03-04 14:51:23Z wotte $
-
#include "ace/SString.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
diff --git a/dep/ACE_wrappers/ace/SPIPE_Connector.cpp b/dep/ACE_wrappers/ace/SPIPE_Connector.cpp
index db49ca6c937..ba41f7d500c 100644
--- a/dep/ACE_wrappers/ace/SPIPE_Connector.cpp
+++ b/dep/ACE_wrappers/ace/SPIPE_Connector.cpp
@@ -76,7 +76,7 @@ ACE_SPIPE_Connector::connect (ACE_SPIPE_Stream &new_io,
absolute_time = ACE_OS::gettimeofday () + *timeout;
// Loop until success or failure.
- for (;;)
+ for (; ; )
{
handle = ACE_OS::open (remote_sap.get_path_name(), flags, perms, sa);
if (handle != ACE_INVALID_HANDLE)
diff --git a/dep/ACE_wrappers/ace/SString.cpp b/dep/ACE_wrappers/ace/SString.cpp
index 9548a4e6f38..d540d67fde6 100644
--- a/dep/ACE_wrappers/ace/SString.cpp
+++ b/dep/ACE_wrappers/ace/SString.cpp
@@ -19,12 +19,10 @@
#include "ace/SString.inl"
#endif /* __ACE_INLINE__ */
-
ACE_RCSID (ace,
SString,
"SString.cpp,v 4.61 2001/03/04 00:55:30 brunsch Exp")
-
// ************************************************************
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -448,7 +446,7 @@ ACE_Tokenizer::next (void)
ACE_TCHAR *next_token;
// Skip all leading delimiters.
- for (;;)
+ for (; ; )
{
// Check for end of string.
if (buffer_[index_] == '\0')
@@ -503,7 +501,7 @@ ACE_Tokenizer::next (void)
}
// Step through finding the next delimiter or EOS.
- for (;;)
+ for (; ; )
{
// Advance pointer.
index_++;
diff --git a/dep/ACE_wrappers/ace/SString.h b/dep/ACE_wrappers/ace/SString.h
index b888521ba86..dc37be1d871 100644
--- a/dep/ACE_wrappers/ace/SString.h
+++ b/dep/ACE_wrappers/ace/SString.h
@@ -256,7 +256,6 @@ typedef ACE_WString ACE_TString;
typedef ACE_CString ACE_TString;
#endif /* ACE_USES_WCHAR */
-
// ************************************************************
/**
diff --git a/dep/ACE_wrappers/ace/SUN_Proactor.cpp b/dep/ACE_wrappers/ace/SUN_Proactor.cpp
index 56f2431c86e..7ce76eb0472 100644
--- a/dep/ACE_wrappers/ace/SUN_Proactor.cpp
+++ b/dep/ACE_wrappers/ace/SUN_Proactor.cpp
@@ -8,12 +8,10 @@
#include "ace/Log_Msg.h"
#include "ace/Object_Manager.h"
-
ACE_RCSID (ace,
POSIX_CB_Proactor,
"$Id: SUN_Proactor.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_SUN_Proactor::ACE_SUN_Proactor (size_t max_aio_operations)
diff --git a/dep/ACE_wrappers/ace/SV_Message.h b/dep/ACE_wrappers/ace/SV_Message.h
index cb428f12a3d..26a0d45c975 100644
--- a/dep/ACE_wrappers/ace/SV_Message.h
+++ b/dep/ACE_wrappers/ace/SV_Message.h
@@ -10,7 +10,6 @@
*/
//==========================================================================
-
#ifndef ACE_SV_MESSAGE_H
#define ACE_SV_MESSAGE_H
@@ -57,7 +56,6 @@ protected:
ACE_END_VERSIONED_NAMESPACE_DECL
-
#if defined (__ACE_INLINE__)
#include "ace/SV_Message.inl"
#endif /* __ACE_INLINE__ */
diff --git a/dep/ACE_wrappers/ace/Sample_History.cpp b/dep/ACE_wrappers/ace/Sample_History.cpp
index 86a8f449fa2..b3bf7d36a92 100644
--- a/dep/ACE_wrappers/ace/Sample_History.cpp
+++ b/dep/ACE_wrappers/ace/Sample_History.cpp
@@ -12,7 +12,6 @@
ACE_RCSID(ace, Sample_History, "$Id: Sample_History.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_Sample_History::ACE_Sample_History (size_t max_samples)
diff --git a/dep/ACE_wrappers/ace/Sample_History.h b/dep/ACE_wrappers/ace/Sample_History.h
index fe7dd0aa14e..9e4d39b6a27 100644
--- a/dep/ACE_wrappers/ace/Sample_History.h
+++ b/dep/ACE_wrappers/ace/Sample_History.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_SAMPLE_HISTORY_H
#define ACE_SAMPLE_HISTORY_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Sbrk_Memory_Pool.h b/dep/ACE_wrappers/ace/Sbrk_Memory_Pool.h
index 05fdcdadb30..0eace0f3fe3 100644
--- a/dep/ACE_wrappers/ace/Sbrk_Memory_Pool.h
+++ b/dep/ACE_wrappers/ace/Sbrk_Memory_Pool.h
@@ -27,7 +27,6 @@
#include "ace/ACE.h"
#include "ace/os_include/sys/os_mman.h"
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
/**
diff --git a/dep/ACE_wrappers/ace/Sched_Params.cpp b/dep/ACE_wrappers/ace/Sched_Params.cpp
index 34000a91cbc..b6e84f7ca67 100644
--- a/dep/ACE_wrappers/ace/Sched_Params.cpp
+++ b/dep/ACE_wrappers/ace/Sched_Params.cpp
@@ -9,7 +9,6 @@
*/
//=============================================================================
-
#include "ace/Sched_Params.h"
#if !defined (__ACE_INLINE__)
diff --git a/dep/ACE_wrappers/ace/Sched_Params.inl b/dep/ACE_wrappers/ace/Sched_Params.inl
index 73803ac1785..ef4416e30ec 100644
--- a/dep/ACE_wrappers/ace/Sched_Params.inl
+++ b/dep/ACE_wrappers/ace/Sched_Params.inl
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE
diff --git a/dep/ACE_wrappers/ace/Select_Reactor_Base.cpp b/dep/ACE_wrappers/ace/Select_Reactor_Base.cpp
index ecd5d4bd746..d4bc11b6ef8 100644
--- a/dep/ACE_wrappers/ace/Select_Reactor_Base.cpp
+++ b/dep/ACE_wrappers/ace/Select_Reactor_Base.cpp
@@ -22,7 +22,6 @@ ACE_RCSID (ace,
Select_Reactor_Base,
"$Id: Select_Reactor_Base.cpp 81153 2008-03-29 08:17:58Z johnnyw $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
template<typename iterator>
@@ -749,7 +748,6 @@ ACE_Select_Reactor_Notify::dispatch_notifications (int &number_of_active_handles
return 0;
}
-
ACE_HANDLE
ACE_Select_Reactor_Notify::notify_handle (void)
{
@@ -758,7 +756,6 @@ ACE_Select_Reactor_Notify::notify_handle (void)
return this->notification_pipe_.read_handle ();
}
-
int
ACE_Select_Reactor_Notify::is_dispatchable (ACE_Notification_Buffer &buffer)
{
@@ -893,7 +890,6 @@ ACE_Select_Reactor_Notify::read_notify_pipe (ACE_HANDLE handle,
return -1;
}
-
return 1;
}
@@ -904,7 +900,6 @@ ACE_Select_Reactor_Notify::read_notify_pipe (ACE_HANDLE handle,
return 0;
}
-
int
ACE_Select_Reactor_Notify::handle_input (ACE_HANDLE handle)
{
@@ -955,7 +950,6 @@ ACE_Select_Reactor_Impl::purge_pending_notifications (ACE_Event_Handler *eh,
return this->notify_handler_->purge_pending_notifications (eh, mask);
}
-
// Perform GET, CLR, SET, and ADD operations on the Handle_Sets.
//
// GET = 1, Retrieve current value
@@ -1103,7 +1097,6 @@ ACE_Select_Reactor_Impl::clear_dispatch_mask (ACE_HANDLE handle,
this->state_changed_ = true;
}
-
int
ACE_Select_Reactor_Impl::resumable_handler (void)
{
diff --git a/dep/ACE_wrappers/ace/Service_Config.cpp b/dep/ACE_wrappers/ace/Service_Config.cpp
index 6a1cd533e98..80c235314f3 100644
--- a/dep/ACE_wrappers/ace/Service_Config.cpp
+++ b/dep/ACE_wrappers/ace/Service_Config.cpp
@@ -103,7 +103,6 @@ ACE_Threading_Helper<ACE_Null_Mutex>::get (void)
typedef ACE_Unmanaged_Singleton<ACE_Service_Config,
ACE_SYNCH_RECURSIVE_MUTEX> ACE_SERVICE_CONFIG_SINGLETON;
-
/// ctor
ACE_Service_Config_Guard::ACE_Service_Config_Guard (ACE_Service_Gestalt * psg)
: saved_ (ACE_Service_Config::current ())
@@ -136,7 +135,6 @@ ACE_Service_Config_Guard::~ACE_Service_Config_Guard (void)
this->saved_->repo_));
}
-
ACE_ALLOC_HOOK_DEFINE (ACE_Service_Config)
// Set the signal handler to point to the handle_signal() function.
@@ -231,7 +229,6 @@ ACE_Service_Config::parse_args_i (int argc, ACE_TCHAR *argv[])
} /* parse_args_i () */
-
int
ACE_Service_Config::open_i (const ACE_TCHAR program_name[],
const ACE_TCHAR *logger_key,
@@ -344,7 +341,6 @@ ACE_Service_Config::insert (ACE_Static_Svc_Descriptor* stsd)
return ACE_Service_Config::instance ()->insert (stsd);
}
-
// Totally remove <svc_name> from the daemon by removing it from the
// ACE_Reactor, and unlinking it if necessary.
int
@@ -377,7 +373,6 @@ ACE_Service_Config::resume (const ACE_TCHAR svc_name[])
return ACE_Service_Repository::instance ()->resume (svc_name);
}
-
ACE_Service_Config::ACE_Service_Config (bool ignore_static_svcs,
size_t size,
int signum)
@@ -459,8 +454,6 @@ ACE_Service_Config::current (ACE_Service_Gestalt* newcurrent)
ACE_Service_Config::singleton()->threadkey_.set (newcurrent);
}
-
-
#if (ACE_USES_CLASSIC_SVC_CONF == 0)
ACE_Service_Type *
ACE_Service_Config::create_service_type (const ACE_TCHAR *n,
@@ -517,7 +510,6 @@ ACE_Service_Config::create_service_type_impl (const ACE_TCHAR *name,
}
-
// Signal handling API to trigger dynamic reconfiguration.
void
ACE_Service_Config::handle_signal (int sig,
@@ -573,7 +565,6 @@ ACE_Service_Config::close (void)
return 0;
}
-
int
ACE_Service_Config::fini_svcs (void)
{
diff --git a/dep/ACE_wrappers/ace/Service_Config.h b/dep/ACE_wrappers/ace/Service_Config.h
index 6b7241e46ae..9fba207fea5 100644
--- a/dep/ACE_wrappers/ace/Service_Config.h
+++ b/dep/ACE_wrappers/ace/Service_Config.h
@@ -134,7 +134,6 @@ public:
bool operator!= (ACE_Static_Svc_Descriptor &) const;
};
-
/**
* @class ACE_Threading_Helper
*
@@ -435,7 +434,6 @@ private:
// instances (called gestalts). The interfaces, however were retained in for
// the sake of maintaining source-code compatibility.
-
// = Accessors and mutators for process-wide Singletons.
/// Returns a pointer to the list of statically linked services.
@@ -591,7 +589,6 @@ protected:
static int process_directives_i (ACE_Svc_Conf_Param *param);
#endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */
-
// = Process-wide state.
private:
@@ -672,7 +669,6 @@ private:
ACE_Intrusive_Auto_Ptr<ACE_Service_Gestalt> saved_;
};
-
ACE_END_VERSIONED_NAMESPACE_DECL
#if defined (__ACE_INLINE__)
diff --git a/dep/ACE_wrappers/ace/Service_Config.inl b/dep/ACE_wrappers/ace/Service_Config.inl
index a03e7124eb1..acb38e27a7f 100644
--- a/dep/ACE_wrappers/ace/Service_Config.inl
+++ b/dep/ACE_wrappers/ace/Service_Config.inl
@@ -30,7 +30,6 @@ ACE_Service_Config::open (const ACE_TCHAR program_name[],
ignore_debug_flag);
}
-
ACE_INLINE int
ACE_Service_Config::open (int argc,
ACE_TCHAR *argv[],
@@ -165,7 +164,6 @@ ACE_Service_Config::process_directive (const ACE_Static_Svc_Descriptor &ssd,
return ACE_Service_Config::current ()->process_directive (ssd, force_replace);
}
-
#if defined (ACE_HAS_WINCE) && defined (ACE_USES_WCHAR)
// We must provide these function to bridge Svc_Conf parser with ACE.
diff --git a/dep/ACE_wrappers/ace/Service_Gestalt.cpp b/dep/ACE_wrappers/ace/Service_Gestalt.cpp
index cf177525ab4..0f6f83c60af 100644
--- a/dep/ACE_wrappers/ace/Service_Gestalt.cpp
+++ b/dep/ACE_wrappers/ace/Service_Gestalt.cpp
@@ -72,7 +72,6 @@ ACE_Service_Type_Dynamic_Guard::ACE_Service_Type_Dynamic_Guard
ACE_ASSERT (this->name_ != 0); // No name?
}
-
/// Destructor
ACE_Service_Type_Dynamic_Guard::~ACE_Service_Type_Dynamic_Guard (void)
@@ -130,8 +129,6 @@ ACE_Service_Type_Dynamic_Guard::~ACE_Service_Type_Dynamic_Guard (void)
}
}
-
-
// ----------------------------------------
ACE_Service_Gestalt::Processed_Static_Svc::
@@ -169,7 +166,6 @@ ACE_Service_Gestalt::intrusive_remove_ref (ACE_Service_Gestalt* g)
}
}
-
ACE_Service_Gestalt::~ACE_Service_Gestalt (void)
{
@@ -289,7 +285,6 @@ ACE_Service_Gestalt::init_i (void)
return 0;
}
-
// Add the default statically-linked services to the Service
// Repository.
@@ -315,8 +310,6 @@ ACE_Service_Gestalt::load_static_svcs (void)
} /* load_static_svcs () */
-
-
/// Find a static service descriptor by name
int
@@ -364,8 +357,6 @@ ACE_Service_Gestalt::find_processed_static_svc (const ACE_TCHAR* name)
return 0;
}
-
-
/// @brief Captures a list of the direcives processed (explicitely) for this
/// Gestalt so that services can be replicated in other repositories
/// upon their first initialization.
@@ -420,7 +411,6 @@ ACE_Service_Gestalt::add_processed_static_svc
assd->name_));
}
-
/// Queues a static service object descriptor which, during open()
/// will be given to process_directive() to create the Service
/// Object. Normally, only called from static initializers, prior to
@@ -437,10 +427,8 @@ ACE_Service_Gestalt::insert (ACE_Static_Svc_Descriptor *stsd)
return this->static_svcs_->insert (stsd);
}
-
ACE_ALLOC_HOOK_DEFINE (ACE_Service_Gestalt)
-
void
ACE_Service_Gestalt::dump (void) const
{
@@ -449,8 +437,6 @@ ACE_Service_Gestalt::dump (void) const
#endif /* ACE_HAS_DUMP */
}
-
-
///
int
@@ -516,7 +502,6 @@ ACE_Service_Gestalt::initialize (const ACE_TCHAR *svc_name,
return 0;
}
-
#if (ACE_USES_CLASSIC_SVC_CONF == 1)
int
ACE_Service_Gestalt::initialize (const ACE_Service_Type_Factory *stf,
@@ -601,7 +586,6 @@ ACE_Service_Gestalt::initialize (const ACE_Service_Type_Factory *stf,
}
#endif /* (ACE_USES_CLASSIC_SVC_CONF == 1) */
-
// Dynamically link the shared object file and retrieve a pointer to
// the designated shared object in this file.
// @note This is obsolete (and error-prone) in the presense of dynamic
@@ -732,7 +716,6 @@ ACE_Service_Gestalt::resume (const ACE_TCHAR svc_name[])
return this->repo_->resume (svc_name);
}
-
int
ACE_Service_Gestalt::process_directive (const ACE_Static_Svc_Descriptor &ssd,
bool force_replace)
@@ -761,7 +744,6 @@ ACE_Service_Gestalt::process_directive_i (const ACE_Static_Svc_Descriptor &ssd,
}
}
-
ACE_Service_Object_Exterminator gobbler;
void *sym = (ssd.alloc_)(&gobbler);
@@ -993,7 +975,6 @@ ACE_Service_Gestalt::process_directive (const ACE_TCHAR directive[])
} /* process_directive () */
-
int
ACE_Service_Gestalt::init_svc_conf_file_queue (void)
{
@@ -1018,7 +999,6 @@ ACE_Service_Gestalt::init_svc_conf_file_queue (void)
} /* init_svc_conf_file_queue () */
-
int
ACE_Service_Gestalt::open_i (const ACE_TCHAR /*program_name*/[],
const ACE_TCHAR* /*logger_key*/,
@@ -1079,7 +1059,6 @@ ACE_Service_Gestalt::open_i (const ACE_TCHAR /*program_name*/[],
result = this->process_directives (ignore_default_svc_conf_file);
}
-
// Reset debugging back to the way it was when we came into
// into <open_i>.
{
@@ -1096,7 +1075,6 @@ ACE_Service_Gestalt::open_i (const ACE_TCHAR /*program_name*/[],
return result;
} /* open_i () */
-
int
ACE_Service_Gestalt::is_opened (void)
{
@@ -1132,7 +1110,6 @@ ACE_Service_Gestalt::process_commandline_directives (void)
} /* process_commandline_directives () */
-
int
ACE_Service_Gestalt::parse_args (int argc, ACE_TCHAR *argv[])
{
@@ -1210,8 +1187,6 @@ ACE_Service_Gestalt::parse_args_i (int argc,
return 0;
} /* parse_args_i () */
-
-
// Process service configuration directives from the files queued for
// processing
int
@@ -1285,7 +1260,6 @@ ACE_Service_Gestalt::close (void)
return 0;
} /* close () */
-
ACE_END_VERSIONED_NAMESPACE_DECL
#if !defined (__ACE_INLINE__)
diff --git a/dep/ACE_wrappers/ace/Service_Gestalt.h b/dep/ACE_wrappers/ace/Service_Gestalt.h
index 2be4de5ba02..5ccfd940f5d 100644
--- a/dep/ACE_wrappers/ace/Service_Gestalt.h
+++ b/dep/ACE_wrappers/ace/Service_Gestalt.h
@@ -245,7 +245,6 @@ public:
/// down. This method calls <close_svcs>. Returns 0.
int close (void);
-
// Registers a service descriptor for a static service object
int insert (ACE_Static_Svc_Descriptor *stsd);
@@ -456,7 +455,6 @@ protected:
}; /* class ACE_Service_Gestalt */
-
/**
* @class ACE_Service_Type_Dynamic_Guard
*
@@ -491,20 +489,17 @@ private:
size_t repo_begin_;
ACE_TCHAR const * const name_;
-
# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
ACE_Guard< ACE_Recursive_Thread_Mutex > repo_monitor_;
#endif
};
-
ACE_END_VERSIONED_NAMESPACE_DECL
#if defined (__ACE_INLINE__)
#include "ace/Service_Gestalt.inl"
#endif /* __ACE_INLINE__ */
-
#include /**/ "ace/post.h"
#endif /* ACE_SERVICE_GESTALT_H */
diff --git a/dep/ACE_wrappers/ace/Service_Gestalt.inl b/dep/ACE_wrappers/ace/Service_Gestalt.inl
index d7de81361ec..6a87d6794a9 100644
--- a/dep/ACE_wrappers/ace/Service_Gestalt.inl
+++ b/dep/ACE_wrappers/ace/Service_Gestalt.inl
@@ -2,10 +2,8 @@
//
// $Id: Service_Gestalt.inl 81388 2008-04-23 14:02:05Z johnnyw $
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-
// This is the primary entry point into the ACE_Service_Config (the
// constructor just handles simple initializations).
diff --git a/dep/ACE_wrappers/ace/Service_Object.cpp b/dep/ACE_wrappers/ace/Service_Object.cpp
index f737d6a3136..a9656719343 100644
--- a/dep/ACE_wrappers/ace/Service_Object.cpp
+++ b/dep/ACE_wrappers/ace/Service_Object.cpp
@@ -33,7 +33,6 @@ ACE_Service_Type::dump (void) const
ACE_TRACE ("ACE_Service_Type::dump");
#endif /* ACE_HAS_DUMP */
-
// Using printf, since the log facility may not have been
// initialized yet. Using a "//" prefix, in case the executable
// happens to be a code generator and the output gets embedded in
diff --git a/dep/ACE_wrappers/ace/Service_Repository.cpp b/dep/ACE_wrappers/ace/Service_Repository.cpp
index d7d673ae756..2c181d49555 100644
--- a/dep/ACE_wrappers/ace/Service_Repository.cpp
+++ b/dep/ACE_wrappers/ace/Service_Repository.cpp
@@ -296,7 +296,6 @@ ACE_Service_Repository::find_i (const ACE_TCHAR name[],
return -1;
}
-
/// @brief Relocate (a static) service to another DLL.
///
/// Works by having the service type keep a reference to a specific
@@ -376,7 +375,6 @@ ACE_Service_Repository::find (const ACE_TCHAR name[],
return this->find_i (name, ignore_location, srp, ignore_suspended);
}
-
// Insert the ACE_Service_Type SR into the repository. Note that
// services may be inserted either resumed or suspended. Using same
// name as in an existing service causes the delete () to be called
@@ -493,7 +491,6 @@ ACE_Service_Repository::suspend (const ACE_TCHAR name[],
return this->service_vector_[i]->suspend ();
}
-
/**
* @brief Completely remove a <name> entry from the Repository and
* dynamically unlink it if it was originally dynamically linked.
@@ -576,7 +573,6 @@ ACE_Service_Repository_Iterator::dump (void) const
#endif /* ACE_HAS_DUMP */
}
-
// Initializes the iterator and skips over any suspended entries at
// the beginning of the table, if necessary. Note, you must not
// perform destructive operations on elements during this iteration...
diff --git a/dep/ACE_wrappers/ace/Service_Repository.h b/dep/ACE_wrappers/ace/Service_Repository.h
index 77b4955683c..99bca07e8fb 100644
--- a/dep/ACE_wrappers/ace/Service_Repository.h
+++ b/dep/ACE_wrappers/ace/Service_Repository.h
@@ -232,7 +232,6 @@ public:
/// Destructor.
~ACE_Service_Repository_Iterator (void);
-
public:
// = Iteration methods.
diff --git a/dep/ACE_wrappers/ace/Service_Templates.h b/dep/ACE_wrappers/ace/Service_Templates.h
index 34ab6a10eda..9262a51ffc8 100644
--- a/dep/ACE_wrappers/ace/Service_Templates.h
+++ b/dep/ACE_wrappers/ace/Service_Templates.h
@@ -9,7 +9,6 @@
*/
//=============================================================================
-
#ifndef ACE_SERVICE_TEMPLATES_H
#define ACE_SERVICE_TEMPLATES_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Service_Types.cpp b/dep/ACE_wrappers/ace/Service_Types.cpp
index 5eb8765337e..a27a869e4b7 100644
--- a/dep/ACE_wrappers/ace/Service_Types.cpp
+++ b/dep/ACE_wrappers/ace/Service_Types.cpp
@@ -11,7 +11,6 @@
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_string.h"
-
ACE_RCSID (ace,
Service_Types,
"$Id: Service_Types.cpp 81826 2008-06-02 15:29:53Z schmidt $")
diff --git a/dep/ACE_wrappers/ace/Shared_Memory.h b/dep/ACE_wrappers/ace/Shared_Memory.h
index cda765b4d4d..af2060d5b1d 100644
--- a/dep/ACE_wrappers/ace/Shared_Memory.h
+++ b/dep/ACE_wrappers/ace/Shared_Memory.h
@@ -10,7 +10,6 @@
*/
//==========================================================================
-
#ifndef ACE_SHARED_MEMORY_H
#define ACE_SHARED_MEMORY_H
diff --git a/dep/ACE_wrappers/ace/Shared_Memory_MM.cpp b/dep/ACE_wrappers/ace/Shared_Memory_MM.cpp
index 25ece407bc5..12cbb4415b2 100644
--- a/dep/ACE_wrappers/ace/Shared_Memory_MM.cpp
+++ b/dep/ACE_wrappers/ace/Shared_Memory_MM.cpp
@@ -6,7 +6,6 @@
#include "ace/Shared_Memory_MM.inl"
#endif /* __ACE_INLINE__ */
-
ACE_RCSID (ace,
Shared_Memory_MM,
"$Id: Shared_Memory_MM.cpp 80826 2008-03-04 14:51:23Z wotte $")
diff --git a/dep/ACE_wrappers/ace/Shared_Memory_MM.h b/dep/ACE_wrappers/ace/Shared_Memory_MM.h
index 27dda8eff57..2a2d92afed5 100644
--- a/dep/ACE_wrappers/ace/Shared_Memory_MM.h
+++ b/dep/ACE_wrappers/ace/Shared_Memory_MM.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_SHARED_MALLOC_MM_H
#define ACE_SHARED_MALLOC_MM_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Shared_Memory_SV.cpp b/dep/ACE_wrappers/ace/Shared_Memory_SV.cpp
index 9cad5d247e2..81e80bca6a0 100644
--- a/dep/ACE_wrappers/ace/Shared_Memory_SV.cpp
+++ b/dep/ACE_wrappers/ace/Shared_Memory_SV.cpp
@@ -6,12 +6,10 @@
#include "ace/Shared_Memory_SV.inl"
#endif /* __ACE_INLINE__ */
-
ACE_RCSID (ace,
Shared_Memory_SV,
"$Id: Shared_Memory_SV.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE(ACE_Shared_Memory_SV)
diff --git a/dep/ACE_wrappers/ace/Shared_Memory_SV.h b/dep/ACE_wrappers/ace/Shared_Memory_SV.h
index ff0268cfda8..2da27742f05 100644
--- a/dep/ACE_wrappers/ace/Shared_Memory_SV.h
+++ b/dep/ACE_wrappers/ace/Shared_Memory_SV.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_SHARED_MALLOC_SV_H
#define ACE_SHARED_MALLOC_SV_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Sig_Adapter.cpp b/dep/ACE_wrappers/ace/Sig_Adapter.cpp
index 78683d1c911..e53f12d5d5d 100644
--- a/dep/ACE_wrappers/ace/Sig_Adapter.cpp
+++ b/dep/ACE_wrappers/ace/Sig_Adapter.cpp
@@ -4,7 +4,6 @@
ACE_RCSID(ace, Sig_Adapter, "$Id: Sig_Adapter.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_Sig_Adapter::ACE_Sig_Adapter (ACE_Sig_Action &sa, int sigkey)
: sigkey_ (sigkey),
type_ (SIG_ACTION),
diff --git a/dep/ACE_wrappers/ace/Sig_Handler.cpp b/dep/ACE_wrappers/ace/Sig_Handler.cpp
index 2829edcef94..40dd996f3dc 100644
--- a/dep/ACE_wrappers/ace/Sig_Handler.cpp
+++ b/dep/ACE_wrappers/ace/Sig_Handler.cpp
@@ -40,7 +40,6 @@ ace_sig_handlers_dispatch (int signum, siginfo_t *info, ucontext_t *context)
#define ace_signal_handlers_dispatcher ACE_SignalHandler(ACE_Sig_Handlers::dispatch)
#endif /* ACE_HAS_SIG_C_FUNC */
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
// Array of Event_Handlers that will handle the signals.
@@ -49,7 +48,6 @@ ACE_Event_Handler *ACE_Sig_Handler::signal_handlers_[ACE_NSIG];
// Remembers if a signal has occurred.
sig_atomic_t ACE_Sig_Handler::sig_pending_ = 0;
-
ACE_ALLOC_HOOK_DEFINE(ACE_Sig_Handler)
ACE_Sig_Handler::~ACE_Sig_Handler (void)
diff --git a/dep/ACE_wrappers/ace/Signal.cpp b/dep/ACE_wrappers/ace/Signal.cpp
index 8c9647ca55f..014a6e0234a 100644
--- a/dep/ACE_wrappers/ace/Signal.cpp
+++ b/dep/ACE_wrappers/ace/Signal.cpp
@@ -9,7 +9,6 @@
ACE_RCSID(ace, Signal, "$Id: Signal.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE(ACE_Sig_Action)
diff --git a/dep/ACE_wrappers/ace/Signal.h b/dep/ACE_wrappers/ace/Signal.h
index 7af918cc6e4..ae679ed7ae6 100644
--- a/dep/ACE_wrappers/ace/Signal.h
+++ b/dep/ACE_wrappers/ace/Signal.h
@@ -136,7 +136,6 @@ public:
const ACE_Sig_Set &sigmask,
int flags = 0);
-
// @@ The next two methods have a parameter as "signalss". Please do
// not change the argument name as "signals". This causes the
// following problem as reported by
diff --git a/dep/ACE_wrappers/ace/Sock_Connect.cpp b/dep/ACE_wrappers/ace/Sock_Connect.cpp
index a6b2359c95c..2f3c30d2709 100644
--- a/dep/ACE_wrappers/ace/Sock_Connect.cpp
+++ b/dep/ACE_wrappers/ace/Sock_Connect.cpp
@@ -157,12 +157,10 @@ namespace
static ACE_Auto_Array_Ptr<sockaddr> force_compiler_to_include_socket_h;
#endif /* AIX && __IBMCPP__ >= 500 */
-
ACE_RCSID (ace,
Sock_Connect,
"$Id: Sock_Connect.cpp 82276 2008-07-09 17:35:49Z jtc $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
// Bind socket to an unused port.
@@ -668,7 +666,6 @@ get_ip_interfaces_win32 (size_t &count,
return 0;
-
# else
// All non-CE, non-Pharlap Windows. Must support Winsock2.
@@ -1093,7 +1090,7 @@ get_ip_interfaces_aix (size_t &count,
}
ACE_NEW_RETURN (addrs,ACE_INET_Addr[num_ifs], -1);
- for (char * ptr = buf_start; ptr < buf_end; )
+ for (char * ptr = buf_start; ptr < buf_end; )
{
struct ifreq *req = reinterpret_cast<struct ifreq *>(ptr);
// skip the interface name
@@ -1172,7 +1169,6 @@ get_ip_interfaces_vxworks_lt600 (size_t &count,
}
#endif // ACE_WIN32 || ACE_HAS_GETIFADDRS || __hpux || _AIX || ACE_VXWORKS < 0x600
-
// return an array of all configured IP interfaces on this host, count
// rc = 0 on success (count == number of interfaces else -1 caller is
// responsible for calling delete [] on parray
@@ -1545,7 +1541,6 @@ ACE::get_handle (void)
return handle;
}
-
#if defined (ACE_HAS_IPV6)
static int
ip_check (int &ipvn_enabled, int pf)
diff --git a/dep/ACE_wrappers/ace/Stack_Trace.cpp b/dep/ACE_wrappers/ace/Stack_Trace.cpp
index 1654e599336..e8a94a70db6 100644
--- a/dep/ACE_wrappers/ace/Stack_Trace.cpp
+++ b/dep/ACE_wrappers/ace/Stack_Trace.cpp
@@ -177,7 +177,6 @@ ACE_Stack_Trace::generate_trace (ssize_t starting_frame_offset,
trcStack (&regs, (FUNCPTR)ACE_Stack_Trace_Add_Frame_To_Buf, taskIdSelf ());
}
-
#elif defined(VXWORKS) && defined(__RTP__)
# include <setjmp.h>
# include <taskLib.h>
@@ -493,7 +492,6 @@ typedef struct _dbghelp_functions
SymCleanup_t SymCleanup;
} dbghelp_functions;
-
# pragma warning (push)
# pragma warning (disable:4706)
static bool load_dbghelp_library_if_needed (dbghelp_functions *pDbg)
@@ -519,7 +517,6 @@ static bool load_dbghelp_library_if_needed (dbghelp_functions *pDbg)
}
# pragma warning (pop)
-
struct frame_state {
STACKFRAME64 sf;
PSYMBOL_INFO pSym;
diff --git a/dep/ACE_wrappers/ace/Stats.cpp b/dep/ACE_wrappers/ace/Stats.cpp
index eac726e52df..44461327aba 100644
--- a/dep/ACE_wrappers/ace/Stats.cpp
+++ b/dep/ACE_wrappers/ace/Stats.cpp
@@ -197,7 +197,6 @@ ACE_Stats::std_dev (ACE_Stats_Value &std_dev,
return 0;
}
-
void
ACE_Stats::reset (void)
{
diff --git a/dep/ACE_wrappers/ace/Stats.h b/dep/ACE_wrappers/ace/Stats.h
index 1e60ef34dc1..3d1d2be7f69 100644
--- a/dep/ACE_wrappers/ace/Stats.h
+++ b/dep/ACE_wrappers/ace/Stats.h
@@ -10,7 +10,6 @@
*/
//==========================================================================
-
#ifndef ACE_STATS_H
#define ACE_STATS_H
diff --git a/dep/ACE_wrappers/ace/Strategies.h b/dep/ACE_wrappers/ace/Strategies.h
index 6ce48398f6e..0c31bc144c5 100644
--- a/dep/ACE_wrappers/ace/Strategies.h
+++ b/dep/ACE_wrappers/ace/Strategies.h
@@ -28,7 +28,6 @@
#include "ace/Recyclable.h"
#include "ace/Refcountable.h"
-
#include /**/ "ace/post.h"
#endif /*ACE_STRATEGIES_H*/
diff --git a/dep/ACE_wrappers/ace/Strategies_T.h b/dep/ACE_wrappers/ace/Strategies_T.h
index 7bd0d6bb1a3..b962efc797f 100644
--- a/dep/ACE_wrappers/ace/Strategies_T.h
+++ b/dep/ACE_wrappers/ace/Strategies_T.h
@@ -853,7 +853,6 @@ public:
typedef ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>
CONNECT_STRATEGY;
-
typedef ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX> SELF;
/// Constructor
diff --git a/dep/ACE_wrappers/ace/String_Base.inl b/dep/ACE_wrappers/ace/String_Base.inl
index 859bceb4a34..d0fa8ed7e64 100644
--- a/dep/ACE_wrappers/ace/String_Base.inl
+++ b/dep/ACE_wrappers/ace/String_Base.inl
@@ -111,7 +111,6 @@ ACE_String_Base<CHAR>::operator > (const ACE_String_Base &s) const
return compare (s) > 0;
}
-
// Comparison operator.
template <class CHAR> ACE_INLINE bool
diff --git a/dep/ACE_wrappers/ace/String_Base_Const.h b/dep/ACE_wrappers/ace/String_Base_Const.h
index ac76e511289..434fc711370 100644
--- a/dep/ACE_wrappers/ace/String_Base_Const.h
+++ b/dep/ACE_wrappers/ace/String_Base_Const.h
@@ -22,7 +22,6 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
/**
diff --git a/dep/ACE_wrappers/ace/Svc_Conf.h b/dep/ACE_wrappers/ace/Svc_Conf.h
index db10481a1f0..60ffd572156 100644
--- a/dep/ACE_wrappers/ace/Svc_Conf.h
+++ b/dep/ACE_wrappers/ace/Svc_Conf.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_SVC_CONF_H
#define ACE_SVC_CONF_H
@@ -43,7 +42,6 @@ int ace_yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
#if (ACE_USES_CLASSIC_SVC_CONF == 1)
@@ -102,7 +100,6 @@ ace_create_service_type (ACE_TCHAR const *,
unsigned int,
ACE_Service_Object_Exterminator = 0);
-
ACE_END_VERSIONED_NAMESPACE_DECL
#include /**/ "ace/post.h"
diff --git a/dep/ACE_wrappers/ace/Svc_Conf_Lexer.cpp b/dep/ACE_wrappers/ace/Svc_Conf_Lexer.cpp
index b55af3b4439..48591364a54 100644
--- a/dep/ACE_wrappers/ace/Svc_Conf_Lexer.cpp
+++ b/dep/ACE_wrappers/ace/Svc_Conf_Lexer.cpp
@@ -430,7 +430,6 @@ ACE_Svc_Conf_Lexer::scan (YYSTYPE* ace_yylval,
size - 1);
str[size - 1] = '\0';
-
if (ACE_OS::strcmp (str, "dynamic") == 0)
{
buffer->index_ = current;
diff --git a/dep/ACE_wrappers/ace/Svc_Conf_Param.h b/dep/ACE_wrappers/ace/Svc_Conf_Param.h
index a1c51844cec..3b96aae13b0 100644
--- a/dep/ACE_wrappers/ace/Svc_Conf_Param.h
+++ b/dep/ACE_wrappers/ace/Svc_Conf_Param.h
@@ -12,7 +12,6 @@
*/
//=============================================================================
-
#ifndef ACE_SVC_CONF_PARAM_H
#define ACE_SVC_CONF_PARAM_H
@@ -126,7 +125,6 @@ public:
ACE_Service_Gestalt *config;
};
-
// Parameter that is passed down to the yyparse() function, and
// eventually to yylex().
#define YYPARSE_PARAM ace_svc_conf_parameter
diff --git a/dep/ACE_wrappers/ace/Svc_Conf_Token_Table.h b/dep/ACE_wrappers/ace/Svc_Conf_Token_Table.h
index 0ce301a6e15..701032097be 100644
--- a/dep/ACE_wrappers/ace/Svc_Conf_Token_Table.h
+++ b/dep/ACE_wrappers/ace/Svc_Conf_Token_Table.h
@@ -74,8 +74,6 @@
#define ACE_STRING 271
-
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define ace_yystype YYSTYPE /* obsolescent; will be withdrawn */
diff --git a/dep/ACE_wrappers/ace/Svc_Conf_Tokens.h b/dep/ACE_wrappers/ace/Svc_Conf_Tokens.h
index 56a5820f46d..6be5c1c592c 100644
--- a/dep/ACE_wrappers/ace/Svc_Conf_Tokens.h
+++ b/dep/ACE_wrappers/ace/Svc_Conf_Tokens.h
@@ -9,7 +9,6 @@
*/
//====================================================================
-
#ifndef BISON_SVC_CONF_TAB_H
# define BISON_SVC_CONF_TAB_H
diff --git a/dep/ACE_wrappers/ace/Svc_Conf_y.cpp b/dep/ACE_wrappers/ace/Svc_Conf_y.cpp
index 52b2bcbb2aa..df6de636cb6 100644
--- a/dep/ACE_wrappers/ace/Svc_Conf_y.cpp
+++ b/dep/ACE_wrappers/ace/Svc_Conf_y.cpp
@@ -58,8 +58,6 @@
/* Using locations. */
#define YYLSP_NEEDED 0
-
-
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@@ -99,11 +97,8 @@
#define ACE_STRING 271
-
-
/* Copy the first part of user declarations. */
-
// $Id: Svc_Conf_y.cpp 82137 2008-06-23 15:30:20Z sma $
#include "ace/Svc_Conf.h"
@@ -152,8 +147,6 @@ static ACE_Module_Type *
ACE_END_VERSIONED_NAMESPACE_DECL
-
-
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@@ -179,14 +172,10 @@ typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
#endif
-
-
/* Copy the second part of user declarations. */
-
/* Line 216 of yacc.c. */
-
#ifdef short
# undef short
#endif
@@ -340,7 +329,6 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
#endif /* ! defined ace_yyoverflow || YYERROR_VERBOSE */
-
#if (! defined ace_yyoverflow \
&& (! defined __cplusplus \
|| (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
@@ -632,7 +620,6 @@ static const ace_yytype_uint8 ace_yystos[] =
#define YYABORT goto ace_yyabortlab
#define YYERROR goto ace_yyerrorlab
-
/* Like YYERROR except do call ace_yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
@@ -658,11 +645,9 @@ do \
} \
while (YYID (0))
-
#define YYTERROR 1
#define YYERRCODE 256
-
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
If N is 0, then set CURRENT to the empty location which ends
the previous symbol: RHS[0] (always defined). */
@@ -688,7 +673,6 @@ while (YYID (0))
while (YYID (0))
#endif
-
/* YY_LOCATION_PRINT -- Print the location on the stream.
This macro was not mandated originally: define only if we know
we won't break user code: when these are the locations we know. */
@@ -704,7 +688,6 @@ while (YYID (0))
# endif
#endif
-
/* YYLEX -- calling `ace_yylex' with the right arguments. */
#ifdef YYLEX_PARAM
@@ -738,7 +721,6 @@ do { \
} \
} while (YYID (0))
-
/*--------------------------------.
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
@@ -771,7 +753,6 @@ ace_yy_symbol_value_print (ace_yyoutput, ace_yytype, ace_yyvaluep)
}
}
-
/*--------------------------------.
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
@@ -825,7 +806,6 @@ do { \
ace_yy_stack_print ((Bottom), (Top)); \
} while (YYID (0))
-
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
@@ -873,7 +853,6 @@ int ace_yydebug;
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */
-
/* YYINITDEPTH -- initial size of the parser's stacks. */
#ifndef YYINITDEPTH
# define YYINITDEPTH 200
@@ -890,8 +869,6 @@ int ace_yydebug;
# define YYMAXDEPTH 10000
#endif
-
-
#if YYERROR_VERBOSE
# ifndef ace_yystrlen
@@ -961,7 +938,7 @@ ace_yytnamerr (char *ace_yyres, const char *ace_yystr)
YYSIZE_T ace_yyn = 0;
char const *ace_yyp = ace_yystr;
- for (;;)
+ for (; ; )
switch (*++ace_yyp)
{
case '\'':
@@ -1102,7 +1079,6 @@ ace_yysyntax_error (char *ace_yyresult, int ace_yystate, int ace_yychar)
}
#endif /* YYERROR_VERBOSE */
-
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
@@ -1134,7 +1110,6 @@ ace_yydestruct (ace_yymsg, ace_yytype, ace_yyvaluep)
}
}
-
/* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM
@@ -1153,9 +1128,6 @@ int ace_yyparse ();
-
-
-
/*----------.
| ace_yyparse. |
`----------*/
@@ -1223,8 +1195,6 @@ int ace_yynerrs;
YYSTYPE *ace_yyvs = ace_yyvsa;
YYSTYPE *ace_yyvsp;
-
-
#define YYPOPSTACK(N) (ace_yyvsp -= (N), ace_yyssp -= (N))
YYSIZE_T ace_yystacksize = YYINITDEPTH;
@@ -1233,7 +1203,6 @@ int ace_yynerrs;
action routines. */
YYSTYPE ace_yyval;
-
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int ace_yylen = 0;
@@ -1279,7 +1248,6 @@ int ace_yynerrs;
YYSTYPE *ace_yyvs1 = ace_yyvs;
ace_yytype_int16 *ace_yyss1 = ace_yyss;
-
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
@@ -1323,7 +1291,6 @@ int ace_yynerrs;
ace_yyssp = ace_yyss + ace_yysize - 1;
ace_yyvsp = ace_yyvs + ace_yysize - 1;
-
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) ace_yystacksize));
@@ -1402,7 +1369,6 @@ ace_yybackup:
goto ace_yynewstate;
-
/*-----------------------------------------------------------.
| ace_yydefault -- do the default action for the current state. |
`-----------------------------------------------------------*/
@@ -1412,7 +1378,6 @@ ace_yydefault:
goto ace_yyerrlab;
goto ace_yyreduce;
-
/*-----------------------------.
| ace_yyreduce -- Do a reduction. |
`-----------------------------*/
@@ -1430,7 +1395,6 @@ ace_yyreduce:
GCC warning that YYVAL may be used uninitialized. */
ace_yyval = ace_yyvsp[1-ace_yylen];
-
YY_REDUCE_PRINT (ace_yyn);
switch (ace_yyn)
{
@@ -1703,7 +1667,6 @@ ace_yyreduce:
{ (ace_yyval.ident_) = 0; ;}
break;
-
/* Line 1267 of yacc.c. */
default: break;
@@ -1716,7 +1679,6 @@ ace_yyreduce:
*++ace_yyvsp = ace_yyval;
-
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
@@ -1731,7 +1693,6 @@ ace_yyreduce:
goto ace_yynewstate;
-
/*------------------------------------.
| ace_yyerrlab -- here on detecting error |
`------------------------------------*/
@@ -1777,8 +1738,6 @@ ace_yyerrlab:
#endif
}
-
-
if (ace_yyerrstatus == 3)
{
/* If just tried and failed to reuse look-ahead token after an
@@ -1802,7 +1761,6 @@ ace_yyerrlab:
token. */
goto ace_yyerrlab1;
-
/*---------------------------------------------------.
| ace_yyerrorlab -- error raised explicitly by YYERROR. |
`---------------------------------------------------*/
@@ -1822,14 +1780,13 @@ ace_yyerrorlab:
ace_yystate = *ace_yyssp;
goto ace_yyerrlab1;
-
/*-------------------------------------------------------------.
| ace_yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
ace_yyerrlab1:
ace_yyerrstatus = 3; /* Each real token shifted decrements this. */
- for (;;)
+ for (; ; )
{
ace_yyn = ace_yypact[ace_yystate];
if (ace_yyn != YYPACT_NINF)
@@ -1847,7 +1804,6 @@ ace_yyerrlab1:
if (ace_yyssp == ace_yyss)
YYABORT;
-
ace_yydestruct ("Error: popping",
ace_yystos[ace_yystate], ace_yyvsp);
YYPOPSTACK (1);
@@ -1860,14 +1816,12 @@ ace_yyerrlab1:
*++ace_yyvsp = ace_yylval;
-
/* Shift the error token. */
YY_SYMBOL_PRINT ("Shifting", ace_yystos[ace_yyn], ace_yyvsp, ace_yylsp);
ace_yystate = ace_yyn;
goto ace_yynewstate;
-
/*-------------------------------------.
| ace_yyacceptlab -- YYACCEPT comes here. |
`-------------------------------------*/
@@ -1919,9 +1873,6 @@ ace_yyreturn:
}
-
-
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
// Prints the error string to standard output. Cleans up the error
diff --git a/dep/ACE_wrappers/ace/TLI.h b/dep/ACE_wrappers/ace/TLI.h
index 0beab16a1f8..643b56418e9 100644
--- a/dep/ACE_wrappers/ace/TLI.h
+++ b/dep/ACE_wrappers/ace/TLI.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_TLI_H
#define ACE_TLI_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/TLI.inl b/dep/ACE_wrappers/ace/TLI.inl
index 001d8c65292..a8375130a8e 100644
--- a/dep/ACE_wrappers/ace/TLI.inl
+++ b/dep/ACE_wrappers/ace/TLI.inl
@@ -4,7 +4,6 @@
#include "ace/TLI.h"
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE
diff --git a/dep/ACE_wrappers/ace/TLI_Acceptor.h b/dep/ACE_wrappers/ace/TLI_Acceptor.h
index d6851aa0f01..87f73bb92ef 100644
--- a/dep/ACE_wrappers/ace/TLI_Acceptor.h
+++ b/dep/ACE_wrappers/ace/TLI_Acceptor.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_TLI_ACCEPTOR_H
#define ACE_TLI_ACCEPTOR_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/TLI_Connector.h b/dep/ACE_wrappers/ace/TLI_Connector.h
index 538cba1c699..537ea879959 100644
--- a/dep/ACE_wrappers/ace/TLI_Connector.h
+++ b/dep/ACE_wrappers/ace/TLI_Connector.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_TLI_CONNECTOR_H
#define ACE_TLI_CONNECTOR_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/TLI_Stream.h b/dep/ACE_wrappers/ace/TLI_Stream.h
index 96f21de7e4c..62fa9eb7311 100644
--- a/dep/ACE_wrappers/ace/TLI_Stream.h
+++ b/dep/ACE_wrappers/ace/TLI_Stream.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_TLI_STREAM_H
#define ACE_TLI_STREAM_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/TP_Reactor.cpp b/dep/ACE_wrappers/ace/TP_Reactor.cpp
index ffe47704953..64c61607a71 100644
--- a/dep/ACE_wrappers/ace/TP_Reactor.cpp
+++ b/dep/ACE_wrappers/ace/TP_Reactor.cpp
@@ -97,7 +97,6 @@ ACE_TP_Token_Guard::acquire_token (ACE_Time_Value *max_wait_time)
return result;
}
-
ACE_TP_Reactor::ACE_TP_Reactor (ACE_Sig_Handler *sh,
ACE_Timer_Queue *tq,
bool mask_signals,
@@ -252,7 +251,6 @@ ACE_TP_Reactor::dispatch_i (ACE_Time_Value *max_wait_time,
return result;
}
-
#if 0
// @Ciju
// signal handling isn't in a production state yet.
@@ -302,7 +300,6 @@ endif
}
#endif // #if 0
-
int
ACE_TP_Reactor::handle_timer_events (int & /*event_count*/,
ACE_TP_Token_Guard &guard)
@@ -415,7 +412,6 @@ ACE_TP_Reactor::handle_socket_events (int &event_count,
dispatch_info.mask_);
}
-
return 0;
}
diff --git a/dep/ACE_wrappers/ace/TP_Reactor.h b/dep/ACE_wrappers/ace/TP_Reactor.h
index 1d8a3f05a1e..5e4a07f3e1c 100644
--- a/dep/ACE_wrappers/ace/TP_Reactor.h
+++ b/dep/ACE_wrappers/ace/TP_Reactor.h
@@ -25,7 +25,6 @@
*/
//=============================================================================
-
#ifndef ACE_TP_REACTOR_H
#define ACE_TP_REACTOR_H
@@ -73,7 +72,6 @@ private:
ACE_EH_Dispatch_Info &operator= (const ACE_EH_Dispatch_Info &);
};
-
/**
* @class ACE_TP_Token_Guard
*
diff --git a/dep/ACE_wrappers/ace/TP_Reactor.inl b/dep/ACE_wrappers/ace/TP_Reactor.inl
index 2b14a8c9b96..1a3f76deb23 100644
--- a/dep/ACE_wrappers/ace/TP_Reactor.inl
+++ b/dep/ACE_wrappers/ace/TP_Reactor.inl
@@ -89,7 +89,6 @@ ACE_TP_Token_Guard::is_owner (void)
return this->owner_;
}
-
/************************************************************************/
// Methods for ACE_TP_Reactor
/************************************************************************/
diff --git a/dep/ACE_wrappers/ace/TSS_T.inl b/dep/ACE_wrappers/ace/TSS_T.inl
index 9959a2edd94..571eab8f643 100644
--- a/dep/ACE_wrappers/ace/TSS_T.inl
+++ b/dep/ACE_wrappers/ace/TSS_T.inl
@@ -13,7 +13,7 @@ ACE_TSS<TYPE>::ACE_TSS (TYPE *type)
}
template <class TYPE> ACE_INLINE int
-ACE_TSS<TYPE>::ts_init (void)
+ACE_TSS<TYPE>::ts_init (void)
{
return 0;
}
diff --git a/dep/ACE_wrappers/ace/Task.cpp b/dep/ACE_wrappers/ace/Task.cpp
index 3746b735811..2add2fb3508 100644
--- a/dep/ACE_wrappers/ace/Task.cpp
+++ b/dep/ACE_wrappers/ace/Task.cpp
@@ -7,7 +7,6 @@
#include "ace/Task.inl"
#endif /* __ACE_INLINE__ */
-
ACE_RCSID (ace,
Task,
"$Id: Task.cpp 80826 2008-03-04 14:51:23Z wotte $")
@@ -245,7 +244,6 @@ ACE_Task_Base::cleanup (void *object, void *)
// t is undefined here. close() could have deleted it.
}
-
#if defined (ACE_HAS_SIG_C_FUNC)
extern "C" void
ACE_Task_Base_cleanup (void *object, void *)
diff --git a/dep/ACE_wrappers/ace/Test_and_Set.h b/dep/ACE_wrappers/ace/Test_and_Set.h
index e31d10f5460..e75b5b31f93 100644
--- a/dep/ACE_wrappers/ace/Test_and_Set.h
+++ b/dep/ACE_wrappers/ace/Test_and_Set.h
@@ -8,7 +8,6 @@
*/
//=============================================================================
-
#ifndef ACE_TEST_AND_SET_H
#define ACE_TEST_AND_SET_H
diff --git a/dep/ACE_wrappers/ace/Thread_Control.h b/dep/ACE_wrappers/ace/Thread_Control.h
index 8322e73a968..f975aed88fc 100644
--- a/dep/ACE_wrappers/ace/Thread_Control.h
+++ b/dep/ACE_wrappers/ace/Thread_Control.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_THREAD_CONTROL_H
#define ACE_THREAD_CONTROL_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Thread_Exit.h b/dep/ACE_wrappers/ace/Thread_Exit.h
index f56263c9db3..e21cc2bb2e4 100644
--- a/dep/ACE_wrappers/ace/Thread_Exit.h
+++ b/dep/ACE_wrappers/ace/Thread_Exit.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_THREAD_EXIT_H
#define ACE_THREAD_EXIT_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Thread_Hook.h b/dep/ACE_wrappers/ace/Thread_Hook.h
index 16a24cc7afc..6e03b6300cb 100644
--- a/dep/ACE_wrappers/ace/Thread_Hook.h
+++ b/dep/ACE_wrappers/ace/Thread_Hook.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_THREAD_HOOK_H
#define ACE_THREAD_HOOK_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Thread_Manager.cpp b/dep/ACE_wrappers/ace/Thread_Manager.cpp
index 3e1b9d3a091..6488d8483ac 100644
--- a/dep/ACE_wrappers/ace/Thread_Manager.cpp
+++ b/dep/ACE_wrappers/ace/Thread_Manager.cpp
@@ -460,7 +460,6 @@ ACE_Thread_Manager::~ACE_Thread_Manager (void)
this->close ();
}
-
// Run the entry point for thread spawned under the control of the
// <ACE_Thread_Manager>. This must be an extern "C" to make certain
// compilers happy...
@@ -1991,7 +1990,6 @@ ACE_Thread_Manager::thread_all_list (ACE_thread_t thread_list[],
return ACE_Utils::truncate_cast<ssize_t> (thread_count);
}
-
int
ACE_Thread_Manager::thr_state (ACE_thread_t id,
ACE_UINT32& state)
diff --git a/dep/ACE_wrappers/ace/Thread_Semaphore.cpp b/dep/ACE_wrappers/ace/Thread_Semaphore.cpp
index 13bab6ff340..64c35dc7fac 100644
--- a/dep/ACE_wrappers/ace/Thread_Semaphore.cpp
+++ b/dep/ACE_wrappers/ace/Thread_Semaphore.cpp
@@ -20,7 +20,6 @@
ACE_RCSID(ace, Thread_Semaphore, "$Id: Thread_Semaphore.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
void
diff --git a/dep/ACE_wrappers/ace/Throughput_Stats.cpp b/dep/ACE_wrappers/ace/Throughput_Stats.cpp
index 5e2288a39b7..71416b4ce5d 100644
--- a/dep/ACE_wrappers/ace/Throughput_Stats.cpp
+++ b/dep/ACE_wrappers/ace/Throughput_Stats.cpp
@@ -90,7 +90,6 @@ ACE_Throughput_Stats::accumulate (const ACE_Throughput_Stats &rhs)
return;
}
-
if (this->throughput_last_ < rhs.throughput_last_)
this->throughput_last_ = rhs.throughput_last_;
diff --git a/dep/ACE_wrappers/ace/Throughput_Stats.h b/dep/ACE_wrappers/ace/Throughput_Stats.h
index 66e57eee699..9f4a87fdc8f 100644
--- a/dep/ACE_wrappers/ace/Throughput_Stats.h
+++ b/dep/ACE_wrappers/ace/Throughput_Stats.h
@@ -10,7 +10,6 @@
*/
//==========================================================================
-
#ifndef ACE_THROUGHPUT_STATS_H
#define ACE_THROUGHPUT_STATS_H
diff --git a/dep/ACE_wrappers/ace/Time_Value.cpp b/dep/ACE_wrappers/ace/Time_Value.cpp
index 86db481f042..c895495ec0a 100644
--- a/dep/ACE_wrappers/ace/Time_Value.cpp
+++ b/dep/ACE_wrappers/ace/Time_Value.cpp
@@ -4,7 +4,6 @@ ACE_RCSID (ace,
Time_Value,
"$Id: Time_Value.cpp 80826 2008-03-04 14:51:23Z wotte $")
-
#if !defined (__ACE_INLINE__)
#include "ace/Time_Value.inl"
#endif /* __ACE_INLINE__ */
@@ -210,7 +209,6 @@ ACE_Time_Value::normalize (void)
#endif /* __QNXNTO__ */
}
-
ACE_Time_Value &
ACE_Time_Value::operator *= (double d)
{
diff --git a/dep/ACE_wrappers/ace/Timeprobe_T.h b/dep/ACE_wrappers/ace/Timeprobe_T.h
index c180f7d7a72..db69cb1da2b 100644
--- a/dep/ACE_wrappers/ace/Timeprobe_T.h
+++ b/dep/ACE_wrappers/ace/Timeprobe_T.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_TIMEPROBE_T_H
#define ACE_TIMEPROBE_T_H
#include /**/ "ace/pre.h"
@@ -71,7 +70,6 @@ public:
*/
typedef ACE_Timeprobe_Ex <ACE_LOCK, ACE_Allocator> ACE_Timeprobe;
-
/// We can hold multiple event description tables.
typedef ACE_Unbounded_Set<ACE_Event_Descriptions>
EVENT_DESCRIPTIONS;
diff --git a/dep/ACE_wrappers/ace/Timer_Hash.h b/dep/ACE_wrappers/ace/Timer_Hash.h
index c19291efaf7..f7cc65c3bb7 100644
--- a/dep/ACE_wrappers/ace/Timer_Hash.h
+++ b/dep/ACE_wrappers/ace/Timer_Hash.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_TIMER_HASH_H
#define ACE_TIMER_HASH_H
#include /**/ "ace/pre.h"
@@ -43,7 +42,6 @@ typedef ACE_Timer_Heap_T <ACE_Event_Handler *,
ACE_Null_Mutex>
ACE_Hash_Timer_Heap;
-
typedef ACE_Timer_Hash_T<ACE_Event_Handler *,
ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
ACE_SYNCH_RECURSIVE_MUTEX,
diff --git a/dep/ACE_wrappers/ace/Timer_List.h b/dep/ACE_wrappers/ace/Timer_List.h
index 847eac1a1e9..6265e348951 100644
--- a/dep/ACE_wrappers/ace/Timer_List.h
+++ b/dep/ACE_wrappers/ace/Timer_List.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_TIMER_LIST_H
#define ACE_TIMER_LIST_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Timer_Wheel.h b/dep/ACE_wrappers/ace/Timer_Wheel.h
index 888dc4a4470..b8a7e9b03ac 100644
--- a/dep/ACE_wrappers/ace/Timer_Wheel.h
+++ b/dep/ACE_wrappers/ace/Timer_Wheel.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_TIMER_WHEEL_H
#define ACE_TIMER_WHEEL_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Token.h b/dep/ACE_wrappers/ace/Token.h
index e98e5f9a774..405ad28362f 100644
--- a/dep/ACE_wrappers/ace/Token.h
+++ b/dep/ACE_wrappers/ace/Token.h
@@ -371,7 +371,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
#include "ace/Token.inl"
#endif /* __ACE_INLINE__ */
-
#include /**/ "ace/post.h"
#endif /* ACE_TOKEN_H */
diff --git a/dep/ACE_wrappers/ace/Token_Collection.cpp b/dep/ACE_wrappers/ace/Token_Collection.cpp
index e9c4964f19e..c10b9734e49 100644
--- a/dep/ACE_wrappers/ace/Token_Collection.cpp
+++ b/dep/ACE_wrappers/ace/Token_Collection.cpp
@@ -6,7 +6,6 @@
#include "ace/Token_Collection.inl"
#endif /* __ACE_INLINE__ */
-
ACE_RCSID (ace,
Token_Collection,
"$Id: Token_Collection.cpp 80826 2008-03-04 14:51:23Z wotte $")
@@ -122,7 +121,6 @@ ACE_Token_Collection::acquire (const ACE_TCHAR *token_name,
return temp->acquire (notify, sleep_hook, options);
}
-
int
ACE_Token_Collection::tryacquire (const ACE_TCHAR *token_name,
void (*sleep_hook)(void *))
@@ -256,7 +254,6 @@ ACE_Token_Collection::~ACE_Token_Collection (void)
}
}
-
// This method doesn't mean anything for a collection.
ACE_Token_Proxy *
ACE_Token_Collection::clone (void) const
diff --git a/dep/ACE_wrappers/ace/Token_Collection.h b/dep/ACE_wrappers/ace/Token_Collection.h
index 6dad64ac6f0..c238004756d 100644
--- a/dep/ACE_wrappers/ace/Token_Collection.h
+++ b/dep/ACE_wrappers/ace/Token_Collection.h
@@ -162,7 +162,6 @@ public:
ACE_Synch_Options &options =
ACE_Synch_Options::defaults);
-
/// Renew the token corresponding to @a token_name. The other
/// parameters are passed to <token>::renew.
virtual int renew (const ACE_TCHAR *token_name,
@@ -180,7 +179,6 @@ public:
virtual int release (ACE_Synch_Options &options =
ACE_Synch_Options::defaults);
-
/// Release the token corresponding to <token_name>. The other
/// parameters are passed to <token>::release.
virtual int release (const ACE_TCHAR *token_name,
diff --git a/dep/ACE_wrappers/ace/Token_Invariants.cpp b/dep/ACE_wrappers/ace/Token_Invariants.cpp
index e0ca87bdcc4..aa7162c9bee 100644
--- a/dep/ACE_wrappers/ace/Token_Invariants.cpp
+++ b/dep/ACE_wrappers/ace/Token_Invariants.cpp
@@ -150,7 +150,6 @@ ACE_Token_Invariant_Manager::dump (void) const
#endif /* ACE_HAS_DUMP */
}
-
int
ACE_Token_Invariant_Manager::get_mutex (const ACE_TCHAR *token_name,
ACE_Mutex_Invariants *&inv)
@@ -204,7 +203,6 @@ ACE_Token_Invariant_Manager::get_rwlock (const ACE_TCHAR *token_name,
return 0;
}
-
ACE_Token_Invariant_Manager::~ACE_Token_Invariant_Manager (void)
{
ACE_TRACE ("ACE_Token_Invariant_Manager::~ACE_Token_Invariant_Manager");
diff --git a/dep/ACE_wrappers/ace/Token_Manager.cpp b/dep/ACE_wrappers/ace/Token_Manager.cpp
index 178a0e5c63b..64f1194f8b9 100644
--- a/dep/ACE_wrappers/ace/Token_Manager.cpp
+++ b/dep/ACE_wrappers/ace/Token_Manager.cpp
@@ -192,7 +192,6 @@ ACE_Token_Manager::check_deadlock (ACE_Tokens *token, ACE_Token_Proxy *proxy)
}
}
-
ACE_Tokens *
ACE_Token_Manager::token_waiting_for (const ACE_TCHAR *client_id)
{
diff --git a/dep/ACE_wrappers/ace/Token_Request_Reply.h b/dep/ACE_wrappers/ace/Token_Request_Reply.h
index 1c09f7af8f6..18bb0d493cf 100644
--- a/dep/ACE_wrappers/ace/Token_Request_Reply.h
+++ b/dep/ACE_wrappers/ace/Token_Request_Reply.h
@@ -15,7 +15,6 @@
*/
//=============================================================================
-
#ifndef ACE_TOKEN_REQUEST_REPLY_H
#define ACE_TOKEN_REQUEST_REPLY_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/Trace.cpp b/dep/ACE_wrappers/ace/Trace.cpp
index 5592b8169a3..728adf7f88b 100644
--- a/dep/ACE_wrappers/ace/Trace.cpp
+++ b/dep/ACE_wrappers/ace/Trace.cpp
@@ -1,6 +1,5 @@
// $Id: Trace.cpp 80826 2008-03-04 14:51:23Z wotte $
-
#include "ace/Trace.h"
ACE_RCSID (ace,
diff --git a/dep/ACE_wrappers/ace/Truncate.h b/dep/ACE_wrappers/ace/Truncate.h
index aef1c4ea57e..0af5b022473 100644
--- a/dep/ACE_wrappers/ace/Truncate.h
+++ b/dep/ACE_wrappers/ace/Truncate.h
@@ -442,7 +442,6 @@ namespace ACE_Utils
}
};
-
#if defined (ACE_LACKS_LONGLONG_T) || defined (ACE_LACKS_UNSIGNEDLONGLONG_T)
// Partial specialization for the case where we're casting from
// ACE_U_LongLong to a smaller integer. We assume that we're always
@@ -833,7 +832,6 @@ namespace ACE_Utils
}
};
-
template<>
struct Truncator<unsigned int, signed long>
{
diff --git a/dep/ACE_wrappers/ace/Typed_SV_Message.h b/dep/ACE_wrappers/ace/Typed_SV_Message.h
index 69c87f73c2c..714907bbb22 100644
--- a/dep/ACE_wrappers/ace/Typed_SV_Message.h
+++ b/dep/ACE_wrappers/ace/Typed_SV_Message.h
@@ -10,7 +10,6 @@
*/
//==========================================================================
-
#ifndef ACE_TYPED_SV_MESSAGE_H
#define ACE_TYPED_SV_MESSAGE_H
diff --git a/dep/ACE_wrappers/ace/UNIX_Addr.h b/dep/ACE_wrappers/ace/UNIX_Addr.h
index 6dd4130f251..253748dfa02 100644
--- a/dep/ACE_wrappers/ace/UNIX_Addr.h
+++ b/dep/ACE_wrappers/ace/UNIX_Addr.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_UNIX_ADDR_H
#define ACE_UNIX_ADDR_H
diff --git a/dep/ACE_wrappers/ace/UNIX_Addr.inl b/dep/ACE_wrappers/ace/UNIX_Addr.inl
index 5e801b56fea..7262f0f4250 100644
--- a/dep/ACE_wrappers/ace/UNIX_Addr.inl
+++ b/dep/ACE_wrappers/ace/UNIX_Addr.inl
@@ -2,10 +2,8 @@
//
// $Id: UNIX_Addr.inl 80826 2008-03-04 14:51:23Z wotte $
-
#include "ace/OS_NS_string.h"
-
#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
diff --git a/dep/ACE_wrappers/ace/UPIPE_Acceptor.h b/dep/ACE_wrappers/ace/UPIPE_Acceptor.h
index c23acd0fca0..c180a16f2fb 100644
--- a/dep/ACE_wrappers/ace/UPIPE_Acceptor.h
+++ b/dep/ACE_wrappers/ace/UPIPE_Acceptor.h
@@ -11,7 +11,6 @@
*/
//=============================================================================
-
#ifndef ACE_UPIPE_ACCEPTOR_H
#define ACE_UPIPE_ACCEPTOR_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/UPIPE_Addr.h b/dep/ACE_wrappers/ace/UPIPE_Addr.h
index 755e10ebefe..ca1db7a67aa 100644
--- a/dep/ACE_wrappers/ace/UPIPE_Addr.h
+++ b/dep/ACE_wrappers/ace/UPIPE_Addr.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_UPIPE_ADDR_H
#define ACE_UPIPE_ADDR_H
diff --git a/dep/ACE_wrappers/ace/UPIPE_Connector.h b/dep/ACE_wrappers/ace/UPIPE_Connector.h
index 328587f36a0..69beb1a965b 100644
--- a/dep/ACE_wrappers/ace/UPIPE_Connector.h
+++ b/dep/ACE_wrappers/ace/UPIPE_Connector.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_UPIPE_CONNECTOR_H
#define ACE_UPIPE_CONNECTOR_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/UPIPE_Stream.h b/dep/ACE_wrappers/ace/UPIPE_Stream.h
index 2cf53b1e274..89b8d793cf5 100644
--- a/dep/ACE_wrappers/ace/UPIPE_Stream.h
+++ b/dep/ACE_wrappers/ace/UPIPE_Stream.h
@@ -11,7 +11,6 @@
*/
//=============================================================================
-
#ifndef ACE_UPIPE_STREAM_H
#define ACE_UPIPE_STREAM_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/UTF16_Encoding_Converter.cpp b/dep/ACE_wrappers/ace/UTF16_Encoding_Converter.cpp
index 6c660a37c4b..e7013acfd3e 100644
--- a/dep/ACE_wrappers/ace/UTF16_Encoding_Converter.cpp
+++ b/dep/ACE_wrappers/ace/UTF16_Encoding_Converter.cpp
@@ -75,7 +75,6 @@ static const ACE_UINT32 offsetsFromUTF8[6] = { 0x00000000, 0x00003080,
0x000E2080, 0x03C82080,
0xFA082080, 0x82082080 };
-
ACE_UTF16_Encoding_Converter::ACE_UTF16_Encoding_Converter (bool swap)
: swap_ (swap)
{
diff --git a/dep/ACE_wrappers/ace/UTF8_Encoding_Converter.cpp b/dep/ACE_wrappers/ace/UTF8_Encoding_Converter.cpp
index 42e452150a4..5756c7dac59 100644
--- a/dep/ACE_wrappers/ace/UTF8_Encoding_Converter.cpp
+++ b/dep/ACE_wrappers/ace/UTF8_Encoding_Converter.cpp
@@ -74,7 +74,7 @@ ACE_UTF8_Encoding_Converter*
ACE_UTF8_Encoding_Converter::encoded (const ACE_Byte* source,
size_t source_size)
{
- for(size_t i = 0; i < source_size; i++)
+ for (size_t i = 0; i < source_size; i++)
{
if (source[i] < 0x01 || source[i] > 0x7f)
return 0;
diff --git a/dep/ACE_wrappers/ace/UTF8_Encoding_Converter.h b/dep/ACE_wrappers/ace/UTF8_Encoding_Converter.h
index 989adca194a..a38cffbc0ff 100644
--- a/dep/ACE_wrappers/ace/UTF8_Encoding_Converter.h
+++ b/dep/ACE_wrappers/ace/UTF8_Encoding_Converter.h
@@ -53,7 +53,6 @@ public:
size_t target_size,
bool strict = true);
-
/// This factory helper method determines if the source stream is UTF-8
/// encoded. If it is, allocate an ACE_UTF8_Encoding_Converter and
/// return it. The caller then owns the allocated object.
diff --git a/dep/ACE_wrappers/ace/UUID.cpp b/dep/ACE_wrappers/ace/UUID.cpp
index d27c8f8a33b..8b2427a82e3 100644
--- a/dep/ACE_wrappers/ace/UUID.cpp
+++ b/dep/ACE_wrappers/ace/UUID.cpp
@@ -19,7 +19,6 @@ ACE_RCSID (ace,
UUID,
"$Id: UUID.cpp 81541 2008-04-30 13:56:12Z shuston $")
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
namespace ACE_Utils
diff --git a/dep/ACE_wrappers/ace/Unbounded_Set.inl b/dep/ACE_wrappers/ace/Unbounded_Set.inl
index 365b025c0be..36190c6638c 100644
--- a/dep/ACE_wrappers/ace/Unbounded_Set.inl
+++ b/dep/ACE_wrappers/ace/Unbounded_Set.inl
@@ -13,7 +13,7 @@ ACE_Unbounded_Set_Default_Comparator<T>::operator () (const T &lhs, const T &rh
}
template<typename T>
-ACE_Unbounded_Set_Iterator<T>::ACE_Unbounded_Set_Iterator (ACE_Unbounded_Set<T> &s,
+ACE_Unbounded_Set_Iterator<T>::ACE_Unbounded_Set_Iterator (ACE_Unbounded_Set<T> &s,
bool end)
: base_type (s, end)
{
@@ -45,5 +45,4 @@ ACE_Unbounded_Set<T>::ACE_Unbounded_Set (ACE_Allocator *alloc)
{
}
-
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/dep/ACE_wrappers/ace/Vector_T.h b/dep/ACE_wrappers/ace/Vector_T.h
index 7be43bfd631..c8c6a5112ac 100644
--- a/dep/ACE_wrappers/ace/Vector_T.h
+++ b/dep/ACE_wrappers/ace/Vector_T.h
@@ -75,7 +75,6 @@ public:
*/
typedef ACE_Vector_Iterator<T, DEFAULT_SIZE> Iterator;
-
/**
* General constructor.
*
diff --git a/dep/ACE_wrappers/ace/Versioned_Namespace.h b/dep/ACE_wrappers/ace/Versioned_Namespace.h
index 9b71d0111fc..8dc3f9ed3e1 100644
--- a/dep/ACE_wrappers/ace/Versioned_Namespace.h
+++ b/dep/ACE_wrappers/ace/Versioned_Namespace.h
@@ -21,7 +21,6 @@
# error This header is only meant to be included by or after "ace/config-lite.h".
#endif /* !ACE_CONFIG_LITE_H */
-
#if defined (ACE_HAS_VERSIONED_NAMESPACE) && ACE_HAS_VERSIONED_NAMESPACE == 1
# ifndef ACE_VERSIONED_NAMESPACE_NAME
diff --git a/dep/ACE_wrappers/ace/WFMO_Reactor.cpp b/dep/ACE_wrappers/ace/WFMO_Reactor.cpp
index 7355a025bbd..b78d0a5111c 100644
--- a/dep/ACE_wrappers/ace/WFMO_Reactor.cpp
+++ b/dep/ACE_wrappers/ace/WFMO_Reactor.cpp
@@ -1478,8 +1478,6 @@ ACE_WFMO_Reactor::mask_ops_i (ACE_HANDLE io_handle,
return -1;
}
-
-
int
ACE_WFMO_Reactor_Handler_Repository::modify_network_events_i (ACE_HANDLE io_handle,
ACE_Reactor_Mask new_masks,
@@ -1885,7 +1883,6 @@ ACE_WFMO_Reactor::calculate_timeout (ACE_Time_Value *max_wait_time)
return time->msec ();
}
-
int
ACE_WFMO_Reactor::expire_timers (void)
{
@@ -2255,7 +2252,6 @@ ACE_WFMO_Reactor::upcall (ACE_Event_Handler *event_handler,
return problems;
}
-
int
ACE_WFMO_Reactor::update_state (void)
{
@@ -2723,7 +2719,6 @@ ACE_WFMO_Reactor::resumable_handler (void)
return 0;
}
-
// No-op WinSOCK2 methods to help WFMO_Reactor compile
#if !defined (ACE_HAS_WINSOCK2) || (ACE_HAS_WINSOCK2 == 0)
int
diff --git a/dep/ACE_wrappers/ace/WFMO_Reactor.h b/dep/ACE_wrappers/ace/WFMO_Reactor.h
index 8a6a8af8ad1..4bd5a514dd1 100644
--- a/dep/ACE_wrappers/ace/WFMO_Reactor.h
+++ b/dep/ACE_wrappers/ace/WFMO_Reactor.h
@@ -768,7 +768,6 @@ public:
virtual int handle_events (ACE_Time_Value &max_wait_time);
virtual int alertable_handle_events (ACE_Time_Value &max_wait_time);
-
// = Event handling control.
/**
diff --git a/dep/ACE_wrappers/ace/WIN32_Asynch_IO.cpp b/dep/ACE_wrappers/ace/WIN32_Asynch_IO.cpp
index 43cb20c4343..7b1268e451b 100644
--- a/dep/ACE_wrappers/ace/WIN32_Asynch_IO.cpp
+++ b/dep/ACE_wrappers/ace/WIN32_Asynch_IO.cpp
@@ -914,7 +914,7 @@ ACE_WIN32_Asynch_Write_Stream::writev (ACE_Message_Block &message_block,
// Re-calculate number bytes to write
bytes_to_write = 0;
- for ( int i=0; i < iovcnt ; ++i )
+ for (int i=0; i < iovcnt ; ++i )
bytes_to_write += iov[i].iov_len;
if ( bytes_to_write == 0 )
@@ -923,7 +923,6 @@ ACE_WIN32_Asynch_Write_Stream::writev (ACE_Message_Block &message_block,
ACE_TEXT ("Attempt to write 0 bytes\n")),
-1);
-
ACE_WIN32_Asynch_Write_Stream_Result *result = 0;
ACE_NEW_RETURN (result,
ACE_WIN32_Asynch_Write_Stream_Result (this->handler_proxy_,
@@ -1288,7 +1287,6 @@ ACE_WIN32_Asynch_Read_File::read (ACE_Message_Block &message_block,
ACE_TEXT ("Attempt to read 0 bytes or no space in the message block\n")),
-1);
-
ACE_WIN32_Asynch_Read_File_Result *result = 0;
ACE_NEW_RETURN (result,
ACE_WIN32_Asynch_Read_File_Result (this->handler_proxy_,
@@ -1427,7 +1425,6 @@ ACE_WIN32_Asynch_Read_File::readv (ACE_Message_Block &message_block,
#endif /* ACE_WIN32_OVERLAPPED_IO */
}
-
ACE_WIN32_Asynch_Read_File::~ACE_WIN32_Asynch_Read_File (void)
{
}
@@ -1834,7 +1831,6 @@ ACE_WIN32_Asynch_Write_File::writev (ACE_Message_Block &message_block,
#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
}
-
ACE_WIN32_Asynch_Write_File::~ACE_WIN32_Asynch_Write_File (void)
{
}
@@ -2225,7 +2221,6 @@ void ACE_WIN32_Asynch_Connect_Result::connect_handle ( ACE_HANDLE handle )
this->connect_handle_ = handle;
}
-
ACE_WIN32_Asynch_Connect_Result::ACE_WIN32_Asynch_Connect_Result
(const ACE_Handler::Proxy_Ptr &handler_proxy,
ACE_HANDLE connect_handle,
@@ -2588,7 +2583,7 @@ ACE_WIN32_Asynch_Connect::connect_i (ACE_WIN32_Asynch_Connect_Result *result,
-1);
}
- for (;;)
+ for (; ; )
{
int rc = ACE_OS::connect
(handle,
@@ -2609,7 +2604,6 @@ ACE_WIN32_Asynch_Connect::connect_i (ACE_WIN32_Asynch_Connect_Result *result,
}
}
-
// cancel_uncompleted
// It performs cancellation of all pending requests
//
@@ -2755,7 +2749,6 @@ ACE_WIN32_Asynch_Connect::handle_output (ACE_HANDLE fd)
return 0;
}
-
int
ACE_WIN32_Asynch_Connect::handle_close (ACE_HANDLE fd, ACE_Reactor_Mask)
{
@@ -3106,7 +3099,6 @@ ACE_WIN32_Asynch_Read_Dgram_Result::message_block (void) const
return this->message_block_;
}
-
int
ACE_WIN32_Asynch_Read_Dgram_Result::remote_address (ACE_Addr& addr) const
{
@@ -3129,7 +3121,6 @@ ACE_WIN32_Asynch_Read_Dgram_Result::saddr () const
return (sockaddr *) this->remote_address_->get_addr ();
}
-
int
ACE_WIN32_Asynch_Read_Dgram_Result::flags (void) const
{
@@ -3608,7 +3599,6 @@ ACE_WIN32_Asynch_Write_Dgram_Result::~ACE_WIN32_Asynch_Write_Dgram_Result (void)
{
}
-
//***********************************************
ACE_WIN32_Asynch_Write_Dgram::~ACE_WIN32_Asynch_Write_Dgram (void)
@@ -3698,7 +3688,6 @@ ACE_WIN32_Asynch_Write_Dgram::send (ACE_Message_Block *message_block,
result,
0);
-
if (initiate_result == SOCKET_ERROR)
{
// If initiate failed, check for a bad error.
diff --git a/dep/ACE_wrappers/ace/WIN32_Asynch_IO.h b/dep/ACE_wrappers/ace/WIN32_Asynch_IO.h
index a1cf22ae0a0..f88ff3d45e6 100644
--- a/dep/ACE_wrappers/ace/WIN32_Asynch_IO.h
+++ b/dep/ACE_wrappers/ace/WIN32_Asynch_IO.h
@@ -704,7 +704,6 @@ public:
int priority,
int signal_number = 0);
-
/// Destructor.
virtual ~ACE_WIN32_Asynch_Read_File (void);
@@ -1228,7 +1227,6 @@ protected:
ACE_HANDLE connect_handle_;
};
-
/**
* @class ACE_WIN32_Asynch_Connect
*/
diff --git a/dep/ACE_wrappers/ace/WIN32_Proactor.cpp b/dep/ACE_wrappers/ace/WIN32_Proactor.cpp
index dceb8336277..4367a57f7d1 100644
--- a/dep/ACE_wrappers/ace/WIN32_Proactor.cpp
+++ b/dep/ACE_wrappers/ace/WIN32_Proactor.cpp
@@ -83,7 +83,7 @@ ACE_WIN32_Proactor::close (void)
{
// To avoid memory leaks we should delete all results from queue.
- for (;;)
+ for (; ; )
{
ACE_OVERLAPPED *overlapped = 0;
u_long bytes_transferred = 0;
diff --git a/dep/ACE_wrappers/ace/WIN32_Proactor.h b/dep/ACE_wrappers/ace/WIN32_Proactor.h
index 1035021fb6d..49cec039b38 100644
--- a/dep/ACE_wrappers/ace/WIN32_Proactor.h
+++ b/dep/ACE_wrappers/ace/WIN32_Proactor.h
@@ -203,7 +203,6 @@ public:
int priority,
int signal_number = 0);
-
virtual ACE_Asynch_Transmit_File_Result_Impl *create_asynch_transmit_file_result (const ACE_Handler::Proxy_Ptr &handler_proxy,
ACE_HANDLE socket,
ACE_HANDLE file,
diff --git a/dep/ACE_wrappers/ace/XML_Svc_Conf.h b/dep/ACE_wrappers/ace/XML_Svc_Conf.h
index 5455657ece2..c14e30035bc 100644
--- a/dep/ACE_wrappers/ace/XML_Svc_Conf.h
+++ b/dep/ACE_wrappers/ace/XML_Svc_Conf.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_XML_SVC_CONF_H
#define ACE_XML_SVC_CONF_H
diff --git a/dep/ACE_wrappers/ace/XTI_ATM_Mcast.h b/dep/ACE_wrappers/ace/XTI_ATM_Mcast.h
index 9cd01f8ac0b..b701d842b67 100644
--- a/dep/ACE_wrappers/ace/XTI_ATM_Mcast.h
+++ b/dep/ACE_wrappers/ace/XTI_ATM_Mcast.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_XTI_ATM_MCAST_H
#define ACE_XTI_ATM_MCAST_H
#include /**/ "ace/pre.h"
diff --git a/dep/ACE_wrappers/ace/config-WinCE.h b/dep/ACE_wrappers/ace/config-WinCE.h
index 83db197b8e4..a7ba1a72a8a 100644
--- a/dep/ACE_wrappers/ace/config-WinCE.h
+++ b/dep/ACE_wrappers/ace/config-WinCE.h
@@ -150,7 +150,6 @@
//#define _O_SEQUENTIAL 0x0020 // file access is primarily sequential
//#define _O_RANDOM 0x0010 // file access is primarily random
-
// Non-ANSI names
#define O_RDONLY _O_RDONLY
#define O_WRONLY _O_WRONLY
@@ -167,16 +166,13 @@
//#define O_SEQUENTIAL _O_SEQUENTIAL
//#define O_RANDOM _O_RANDOM
-
// @@ NSIG value. This is definitely not correct.
#define NSIG 23
-
// @@ For some reason, WinCE forgot to define this.
// Need to find out what it is. (Used in MapViewOfFile ().)
#define FILE_MAP_COPY 0
-
#define ACE_LACKS_STRCASECMP // WinCE doesn't support _stricmp
#define ACE_LACKS_GETSERVBYNAME
#define ACE_LACKS_ACCESS
diff --git a/dep/ACE_wrappers/ace/config-freebsd.h b/dep/ACE_wrappers/ace/config-freebsd.h
index d5ead871030..6f4c5750f98 100644
--- a/dep/ACE_wrappers/ace/config-freebsd.h
+++ b/dep/ACE_wrappers/ace/config-freebsd.h
@@ -92,7 +92,6 @@ enum schedparam_policy {
// Use of <malloc.h> is deprecated.
#define ACE_LACKS_MALLOC_H
-
// This won't be necessary after it is fixed in the system include headers.
extern "C" { char * cuserid (char *s); }
diff --git a/dep/ACE_wrappers/ace/config-hpux-11.00.h b/dep/ACE_wrappers/ace/config-hpux-11.00.h
index 17de9afa38c..63f156dcfed 100644
--- a/dep/ACE_wrappers/ace/config-hpux-11.00.h
+++ b/dep/ACE_wrappers/ace/config-hpux-11.00.h
@@ -360,7 +360,6 @@
#define ACE_HAS_3_PARAM_READDIR_R
-
//////////////////////////////////////////////////////////////////////////
//
// STREAMS information
diff --git a/dep/ACE_wrappers/ace/config-integritySCA.h b/dep/ACE_wrappers/ace/config-integritySCA.h
index 195027f94ec..be6ccd7a3a8 100644
--- a/dep/ACE_wrappers/ace/config-integritySCA.h
+++ b/dep/ACE_wrappers/ace/config-integritySCA.h
@@ -49,12 +49,10 @@
#define ACE_LACKS_TEMPNAM /* believe it or not, this is ANSI C */
#define ACE_HAS_STRERROR
-
#define ACE_LACKS_SENDMSG
/***** End Stack Defines *****/
-
/* SCA STUFF */
#if defined(INTEGRITY_VERSION) && (INTEGRITY_VERSION >= 40108)
#define ACE_HAS_SIG_ATOMIC_T
@@ -223,7 +221,6 @@ int unlink(const char *);
#define ACE_LACKS_SEEKDIR
#define ACE_LACKS_GETHOSTENT
-
/* end MIKEC Addtions */
// Hack to avoid ensure that things defined in ind_io.h
diff --git a/dep/ACE_wrappers/ace/config-irix6.x-common.h b/dep/ACE_wrappers/ace/config-irix6.x-common.h
index ab5413412c1..49bc08f6c4e 100644
--- a/dep/ACE_wrappers/ace/config-irix6.x-common.h
+++ b/dep/ACE_wrappers/ace/config-irix6.x-common.h
@@ -253,6 +253,5 @@
#endif /* (ACE_MT_SAFE == 0) */
-
#endif /* ACE_CONFIG_IRIX6X_COMMON_H */
diff --git a/dep/ACE_wrappers/ace/config-lite.h b/dep/ACE_wrappers/ace/config-lite.h
index 5af65ccc557..a8157bef1ec 100644
--- a/dep/ACE_wrappers/ace/config-lite.h
+++ b/dep/ACE_wrappers/ace/config-lite.h
@@ -158,7 +158,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
#endif /* _MSC_VER && _WIN64 */
-
#include /**/ "ace/post.h"
#endif /* ACE_CONFIG_LITE_H */
diff --git a/dep/ACE_wrappers/ace/config-macosx-leopard.h b/dep/ACE_wrappers/ace/config-macosx-leopard.h
index ef9ffc59a08..7351f938409 100644
--- a/dep/ACE_wrappers/ace/config-macosx-leopard.h
+++ b/dep/ACE_wrappers/ace/config-macosx-leopard.h
@@ -58,7 +58,6 @@
#define ACE_HAS_WCHAR
#define ACE_SIZEOF_WCHAR 4
-
#define ACE_HAS_3_PARAM_WCSTOK
#define ACE_LACKS_ITOW
#define ACE_LACKS_WCSICMP
diff --git a/dep/ACE_wrappers/ace/config-macosx-tiger.h b/dep/ACE_wrappers/ace/config-macosx-tiger.h
index 282e8800c3c..447c834ac0c 100644
--- a/dep/ACE_wrappers/ace/config-macosx-tiger.h
+++ b/dep/ACE_wrappers/ace/config-macosx-tiger.h
@@ -51,7 +51,6 @@
#define ACE_HAS_WCHAR
#define ACE_SIZEOF_WCHAR 4
-
#define ACE_HAS_3_PARAM_WCSTOK
#define ACE_LACKS_ITOW
#define ACE_LACKS_WCSICMP
diff --git a/dep/ACE_wrappers/ace/config-openbsd.h b/dep/ACE_wrappers/ace/config-openbsd.h
index e81e36bc613..10b4f268bcb 100644
--- a/dep/ACE_wrappers/ace/config-openbsd.h
+++ b/dep/ACE_wrappers/ace/config-openbsd.h
@@ -72,7 +72,6 @@
# define ACE_HAS_UCONTEXT_T
#endif /* OpenBSD >= 200405 */
-
// OpenBSD has sigwait defined
#define ACE_HAS_SIGWAIT
#define ACE_HAS_SIGINFO_T
diff --git a/dep/ACE_wrappers/ace/config-sunos5.5.h b/dep/ACE_wrappers/ace/config-sunos5.5.h
index 83d4d164951..d1148c6b0c3 100644
--- a/dep/ACE_wrappers/ace/config-sunos5.5.h
+++ b/dep/ACE_wrappers/ace/config-sunos5.5.h
@@ -89,7 +89,6 @@
/* If you want to disable threading with Sun CC, remove -mt
from your CFLAGS, e.g., using make threads=0. */
-
// Take advantage of Sun Studio 8 (Sun C++ 5.5) or better symbol
// visibility to generate improved shared library binaries.
# if (__SUNPRO_CC > 0x540)
diff --git a/dep/ACE_wrappers/ace/config-sunos5.6.h b/dep/ACE_wrappers/ace/config-sunos5.6.h
index 2ebf5a274a0..01855ba37c8 100644
--- a/dep/ACE_wrappers/ace/config-sunos5.6.h
+++ b/dep/ACE_wrappers/ace/config-sunos5.6.h
@@ -84,7 +84,6 @@
// SunOS 5.6 and above support mkstemp
#undef ACE_LACKS_MKSTEMP
-
// SunOS 5.6 has AIO calls.
#if !defined (ACE_HAS_AIO_CALLS)
#define ACE_HAS_AIO_CALLS
diff --git a/dep/ACE_wrappers/ace/config-tandem-nsk-mips-v2.h b/dep/ACE_wrappers/ace/config-tandem-nsk-mips-v2.h
index 18e2cb23f79..cb853c659f0 100644
--- a/dep/ACE_wrappers/ace/config-tandem-nsk-mips-v2.h
+++ b/dep/ACE_wrappers/ace/config-tandem-nsk-mips-v2.h
@@ -10,12 +10,10 @@
// The following configuration file contains defines for Tandem NSK
// platform, MIPS processor, version 2 C++ compiler.
-
//=========================================================================
// Tandem NSK specific parts
//=========================================================================
-
// Disable pthread renaming of symbols such as "open" and "close"
#define _CMA_NOWRAPPERS_ 1
@@ -31,7 +29,6 @@
// [@note this causes a significant performance degradation]
//#define ACE_TANDEM_T1248_PTHREADS_ALL_IO_WRAPPERS
-
// Need this include here because some symbols defined by pthreads
// (e.g. timespec_t) are needed before spthread.h is normally included
// by ACE
@@ -213,8 +210,6 @@ typedef enum CMA_T_SCHED_POLICY {
// Compile using multi-thread libraries
#define ACE_MT_SAFE 1
-
-
// Platform supports System V IPC
#define ACE_HAS_SYSV_IPC
@@ -316,7 +311,6 @@ typedef enum CMA_T_SCHED_POLICY {
// Platform has <strings.h> (which contains bzero() prototype)
#define ACE_HAS_STRINGS 1
-
// OS/compiler omits the const from the iovec parameter in the
// writev() prototype.
#define ACE_HAS_NONCONST_WRITEV
diff --git a/dep/ACE_wrappers/ace/config-tandem-nsk-mips-v3.h b/dep/ACE_wrappers/ace/config-tandem-nsk-mips-v3.h
index c002835a857..88773d37f92 100644
--- a/dep/ACE_wrappers/ace/config-tandem-nsk-mips-v3.h
+++ b/dep/ACE_wrappers/ace/config-tandem-nsk-mips-v3.h
@@ -2,7 +2,6 @@
//
// $Id: config-tandem-nsk-mips-v3.h 81935 2008-06-12 22:01:53Z jtc $
-
#ifndef ACE_CONFIG_NSK_H
#define ACE_CONFIG_NSK_H
@@ -11,12 +10,10 @@
// The following configuration file contains defines for Tandem NSK
// platform, MIPS processor, version 3 C++ compiler.
-
//=========================================================================
// Tandem NSK specific parts
//=========================================================================
-
// Disable pthread renaming of symbols such as "open" and "close"
#define _CMA_NOWRAPPERS_ 1
@@ -32,7 +29,6 @@
// [Note: this causes a significant performance degradation]
//#define ACE_TANDEM_T1248_PTHREADS_ALL_IO_WRAPPERS
-
// Need this include here because some symbols defined by pthreads
// (e.g. timespec_t) are needed before spthread.h is normally included
// by ACE
@@ -214,8 +210,6 @@ typedef enum CMA_T_SCHED_POLICY {
// Compile using multi-thread libraries
#define ACE_MT_SAFE 1
-
-
// Platform supports System V IPC
#define ACE_HAS_SYSV_IPC
@@ -261,7 +255,6 @@ typedef enum CMA_T_SCHED_POLICY {
// Platform lacks alphasort()
#define ACE_LACKS_ALPHASORT
-
//=========================================================================
// Threads specific parts
//=========================================================================
@@ -348,7 +341,6 @@ typedef enum CMA_T_SCHED_POLICY {
// Platform has <strings.h> (which contains bzero() prototype)
#define ACE_HAS_STRINGS 1
-
// OS/compiler omits the const from the iovec parameter in the
// writev() prototype.
#define ACE_HAS_NONCONST_WRITEV
@@ -440,7 +432,6 @@ typedef enum CMA_T_SCHED_POLICY {
#define ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) template class import$ SINGLETON_TYPE <CLASS, LOCK>;
#endif
-
//=========================================================================
// Build options
//=========================================================================
diff --git a/dep/ACE_wrappers/ace/config-tandem.h b/dep/ACE_wrappers/ace/config-tandem.h
index 1577e1e6866..2e1be04bc10 100644
--- a/dep/ACE_wrappers/ace/config-tandem.h
+++ b/dep/ACE_wrappers/ace/config-tandem.h
@@ -142,7 +142,6 @@
// Platform lacks "signed char" type (broken!)
#define ACE_LACKS_SIGNED_CHAR
-
#define ACE_PAGE_SIZE 4096
// Defines the page size of the system (not used on Win32 or
// with ACE_HAS_GETPAGESIZE).
diff --git a/dep/ACE_wrappers/ace/config-unixware-7.1.0.h b/dep/ACE_wrappers/ace/config-unixware-7.1.0.h
index 03725638a70..44eef5d5973 100644
--- a/dep/ACE_wrappers/ace/config-unixware-7.1.0.h
+++ b/dep/ACE_wrappers/ace/config-unixware-7.1.0.h
@@ -147,7 +147,6 @@
#undef ACE_HAS_PENTIUM
#endif /* ACE_HAS_PENTIUM */
-
/* Platform contains <poll.h> */
#define ACE_HAS_POLL 1
diff --git a/dep/ACE_wrappers/ace/config-unixware-7.1.0.udk.h b/dep/ACE_wrappers/ace/config-unixware-7.1.0.udk.h
index 988c451effb..fc6006889e9 100644
--- a/dep/ACE_wrappers/ace/config-unixware-7.1.0.udk.h
+++ b/dep/ACE_wrappers/ace/config-unixware-7.1.0.udk.h
@@ -54,8 +54,6 @@
# define PTHREAD_MAX_PRIORITY ACE_THREAD_MAX_PRIORITY
#endif /* #if defined (ACE_THREAD_MAX_PRIORITY) */
-
-
/* UnixWare specific configuration parameters */
/* #undef UNIXWARE */
/* #undef UNIXWARE_2_0 */
@@ -103,7 +101,6 @@
/* Staller: oh yes, let's do this! */
#define ACE_HAS_BROKEN_MAP_FAILED
-
/* Prototypes for both signal() and struct sigaction are consistent. */
#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES 1
@@ -171,7 +168,6 @@
/* Uses ctime_r & asctime_r with only two parameters vs. three. */
#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
-
/* Platform is an Intel Pentium microprocessor. */
/* There is a problem with the gethrtime() because of (apparently) a problem
with the inline assembly instruction. Hopefully there is a way to resolve
@@ -181,7 +177,6 @@
//#undef ACE_HAS_PENTIUM
#endif /* ACE_HAS_PENTIUM */
-
/* Platform contains <poll.h> */
#define ACE_HAS_POLL
diff --git a/dep/ACE_wrappers/ace/config-win32-common.h b/dep/ACE_wrappers/ace/config-win32-common.h
index 1abeccd4c54..b7beb5ba228 100644
--- a/dep/ACE_wrappers/ace/config-win32-common.h
+++ b/dep/ACE_wrappers/ace/config-win32-common.h
@@ -1,7 +1,6 @@
/* -*- C++ -*- */
// $Id: config-win32-common.h 82316 2008-07-15 01:28:39Z johnnyw $
-
#ifndef ACE_CONFIG_WIN32_COMMON_H
#define ACE_CONFIG_WIN32_COMMON_H
#include /**/ "ace/pre.h"
@@ -10,7 +9,6 @@
#error Use config-win32.h in config.h instead of this header
#endif /* ACE_CONFIG_WIN32_H */
-
// Windows Mobile (CE) stuff is primarily further restrictions to what's
// in the rest of this file. Also, it defined ACE_HAS_WINCE, which is used
// in this file.
@@ -171,7 +169,6 @@
#define FD_SETSIZE 1024
#endif /* FD_SETSIZE */
-
// Windows doesn't like 65536 ;-) If 65536 is specified, it is
// silently ignored by the OS, i.e., setsockopt does not fail, and you
// get stuck with the default size of 8k.
@@ -434,7 +431,6 @@
# define ACE_HAS_WINSOCK2 1
#endif /* !defined(ACE_HAS_WINSOCK2) */
-
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
# if !defined (_WINSOCK2API_)
// will also include windows.h, if not present
diff --git a/dep/ACE_wrappers/ace/config-win32-interix.h b/dep/ACE_wrappers/ace/config-win32-interix.h
index 71f521af45a..d613444fadb 100644
--- a/dep/ACE_wrappers/ace/config-win32-interix.h
+++ b/dep/ACE_wrappers/ace/config-win32-interix.h
@@ -98,4 +98,3 @@ IOStream_Test.log ACE_IOSTREAM not supported on this platform
*/
-
diff --git a/dep/ACE_wrappers/ace/config-win32.h b/dep/ACE_wrappers/ace/config-win32.h
index 96c351bd567..2cf39c60491 100644
--- a/dep/ACE_wrappers/ace/config-win32.h
+++ b/dep/ACE_wrappers/ace/config-win32.h
@@ -51,7 +51,6 @@
// end custom config stuff
-
// NOTE: Please do not add anything besides #include's here. Put other stuff
// (definitions, etc.) in the included headers
@@ -87,7 +86,6 @@
#undef ACE_HAS_NONSTATIC_OBJECT_MANAGER
#endif //ACE_HAS_NONSTATIC_OBJECT_MANAGER
-
#include /**/ "ace/post.h"
#endif /* ACE_CONFIG_WIN32_H */
diff --git a/dep/ACE_wrappers/ace/iosfwd.h b/dep/ACE_wrappers/ace/iosfwd.h
index 561e15e8ad8..1dc1c581213 100644
--- a/dep/ACE_wrappers/ace/iosfwd.h
+++ b/dep/ACE_wrappers/ace/iosfwd.h
@@ -19,7 +19,6 @@
*/
//=============================================================================
-
#ifndef ACE_IOSFWD_H
#define ACE_IOSFWD_H
diff --git a/dep/ACE_wrappers/ace/os_include/os_pthread.h b/dep/ACE_wrappers/ace/os_include/os_pthread.h
index 6556a64576d..c45fc4cf802 100644
--- a/dep/ACE_wrappers/ace/os_include/os_pthread.h
+++ b/dep/ACE_wrappers/ace/os_include/os_pthread.h
@@ -49,7 +49,6 @@ extern "C" pthread_t pthread_self (void);
# endif /* DIGITAL_UNIX */
# endif /* ACE_HAS_PTHREADS */
-
#if !defined (ACE_LACKS_PTHREAD_H)
extern "C" {
# if defined (ACE_TANDEM_T1248_PTHREADS)
diff --git a/dep/ACE_wrappers/ace/os_include/os_stdint.h b/dep/ACE_wrappers/ace/os_include/os_stdint.h
index 5786e2a2b71..3cd849de612 100644
--- a/dep/ACE_wrappers/ace/os_include/os_stdint.h
+++ b/dep/ACE_wrappers/ace/os_include/os_stdint.h
@@ -130,7 +130,6 @@ _POSIX_V6_LPBIG_OFFBIG programming environment.
// @todo move the ACE_INT## typedefs here so that ACE_INT64 will
// always be available.
-
// @todo perhaps add macros
#ifdef __cplusplus
diff --git a/dep/ACE_wrappers/ace/os_include/sys/os_uio.h b/dep/ACE_wrappers/ace/os_include/sys/os_uio.h
index ccc5bbeb12e..72a2819e524 100644
--- a/dep/ACE_wrappers/ace/os_include/sys/os_uio.h
+++ b/dep/ACE_wrappers/ace/os_include/sys/os_uio.h
@@ -54,7 +54,6 @@ extern "C"
};
#endif /* ACE_LACKS_IOVEC */
-
# if defined (ACE_LACKS_TIMEDWAIT_PROTOTYPES)
ssize_t readv_timedwait (ACE_HANDLE handle,
diff --git a/dep/ACE_wrappers/ace/os_include/sys/os_un.h b/dep/ACE_wrappers/ace/os_include/sys/os_un.h
index 00b07315249..88d86a232a6 100644
--- a/dep/ACE_wrappers/ace/os_include/sys/os_un.h
+++ b/dep/ACE_wrappers/ace/os_include/sys/os_un.h
@@ -43,7 +43,6 @@ struct sockaddr_un {
};
#endif /* ACE_VXWORKS */
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/dep/ACE_wrappers/ace/streams.h b/dep/ACE_wrappers/ace/streams.h
index 2b3ae4390fa..3401435b4b1 100644
--- a/dep/ACE_wrappers/ace/streams.h
+++ b/dep/ACE_wrappers/ace/streams.h
@@ -18,7 +18,6 @@
*/
//=============================================================================
-
#ifndef ACE_STREAMS_H
#define ACE_STREAMS_H
#include /**/ "ace/pre.h"
@@ -35,7 +34,6 @@
#pragma warning(push)
#endif /* _MSC_VER*/
-
#if !defined (ACE_LACKS_IOSTREAM_TOTALLY)
# if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && \
diff --git a/dep/include/g3dlite/G3D/AABox.h b/dep/include/g3dlite/G3D/AABox.h
index 699a3d94674..b1b1477fe9f 100644
--- a/dep/include/g3dlite/G3D/AABox.h
+++ b/dep/include/g3dlite/G3D/AABox.h
@@ -65,7 +65,6 @@ public:
hi = high;
}
-
inline const Vector3& low() const {
return lo;
}
@@ -251,6 +250,5 @@ inline unsigned int hashCode(const G3D::AABox& b) {
return b.hashCode();
}
-
#endif
diff --git a/dep/include/g3dlite/G3D/Array.h b/dep/include/g3dlite/G3D/Array.h
index f58ee5eeedb..34401af40c4 100644
--- a/dep/include/g3dlite/G3D/Array.h
+++ b/dep/include/g3dlite/G3D/Array.h
@@ -33,7 +33,6 @@
# pragma warning( disable : 4786)
#endif
-
namespace G3D {
/**
@@ -60,7 +59,6 @@ const int SORT_DECREASING = -1;
If SSE is defined Arrays allocate the first element aligned to
16 bytes.
-
Array is highly optimized compared to std::vector.
Array operations are less expensive than on std::vector and for large
amounts of data, Array consumes only 1.5x the total size of the
@@ -120,13 +118,11 @@ private:
return (address >= data) && (address < data + num);
}
-
/** Only compiled if you use the sort procedure. */
static bool __cdecl compareGT(const T& a, const T& b) {
return a > b;
}
-
/**
Allocates a new array of size numAllocated (not a parameter to the method)
and then copies at most oldNum elements from the old array to it. Destructors are
@@ -163,7 +159,6 @@ private:
ptr->~T();
}}
-
System::alignedFree(oldData);
}
@@ -255,7 +250,6 @@ public:
numAllocated = 0;
}
-
/**
Removes all elements. Use resize(0, false) or fastClear if you want to
remove all elements without deallocating the underlying array
@@ -329,7 +323,6 @@ public:
resize(n, false);
}
-
/**
Inserts at the specified index and shifts all other elements up by one.
*/
@@ -444,7 +437,6 @@ public:
}
}
-
inline void append(const T& v1, const T& v2) {
if (inArray(&v1) || inArray(&v2)) {
T t1 = v1;
@@ -463,7 +455,6 @@ public:
}
}
-
inline void append(const T& v1, const T& v2, const T& v3) {
if (inArray(&v1) || inArray(&v2) || inArray(&v3)) {
T t1 = v1;
@@ -485,7 +476,6 @@ public:
}
}
-
inline void append(const T& v1, const T& v2, const T& v3, const T& v4) {
if (inArray(&v1) || inArray(&v2) || inArray(&v3) || inArray(&v4)) {
T t1 = v1;
@@ -614,7 +604,6 @@ public:
resize(num - 1, shrinkUnderlyingArrayIfNecessary);
}
-
/**
"The member function swaps the controlled sequences between *this and str."
Note that this is slower than the optimal std implementation.
@@ -627,7 +616,6 @@ public:
*this = temp;
}
-
/**
Performs bounds checks in debug mode
*/
@@ -832,7 +820,6 @@ public:
std::sort(data, data + num, lessThan);
}
-
/**
Sorts the array in increasing order using the > or < operator. To
invoke this method on Array<T>, T must override those operator.
@@ -1118,7 +1105,6 @@ public:
medianPartition(ltMedian, eqMedian, gtMedian, temp, DefaultComparator());
}
-
/** Redistributes the elements so that the new order is statistically independent
of the original order. O(n) time.*/
void randomize() {
@@ -1133,10 +1119,8 @@ public:
}
}
-
};
-
/** Array::contains for C-arrays */
template<class T> bool contains(const T* array, int len, const T& e) {
for (int i = len - 1; i >= 0; --i) {
diff --git a/dep/include/g3dlite/G3D/Box.h b/dep/include/g3dlite/G3D/Box.h
index 8ec7ea3408d..3ac3c61d0f6 100644
--- a/dep/include/g3dlite/G3D/Box.h
+++ b/dep/include/g3dlite/G3D/Box.h
@@ -28,7 +28,6 @@ class CoordinateFrame;
/**
An arbitrary 3D box, useful as a bounding box.
-
To construct a box from a coordinate frame, center and extent, use the idiom:
<CODE>Box box = cframe.toObjectSpace(Box(center - extent/2, center + extent/2));</CODE>
@@ -86,7 +85,6 @@ public:
Box(const class AABox& b);
-
/**
Returns the object to world transformation for
this box. localFrame().worldToObject(...) takes
diff --git a/dep/include/g3dlite/G3D/CollisionDetection.h b/dep/include/g3dlite/G3D/CollisionDetection.h
index 4add967ed8b..5e95498ffed 100644
--- a/dep/include/g3dlite/G3D/CollisionDetection.h
+++ b/dep/include/g3dlite/G3D/CollisionDetection.h
@@ -1,7 +1,6 @@
/**
@file CollisionDetection.h
-
Moving collision detection for simple primitives.
@author Morgan McGuire, matrix@graphics3d.com
@@ -32,7 +31,6 @@
namespace G3D {
-
/**
Collision detection primitives and tools for building
higher order collision detection schemes.
@@ -108,7 +106,6 @@ private:
*/
static Array<Vector3> ignoreArray;
-
// Static class!
CollisionDetection() {}
virtual ~CollisionDetection() {}
@@ -183,7 +180,6 @@ public:
const double* ad,
const double* bd);
-
/**
Creates a set of standard information about two boxes in order to
solve for their collision. This information includes a vector to
diff --git a/dep/include/g3dlite/G3D/Crypto.h b/dep/include/g3dlite/G3D/Crypto.h
index 2805e8590c2..0bd5b75efca 100644
--- a/dep/include/g3dlite/G3D/Crypto.h
+++ b/dep/include/g3dlite/G3D/Crypto.h
@@ -3,7 +3,6 @@
@maintainer Morgan McGuire, matrix@graphics3d.com
-
@created 2006-03-29
@edited 2006-04-06
*/
diff --git a/dep/include/g3dlite/G3D/GCamera.h b/dep/include/g3dlite/G3D/GCamera.h
index 50d5ca2244e..7bf8e26e562 100644
--- a/dep/include/g3dlite/G3D/GCamera.h
+++ b/dep/include/g3dlite/G3D/GCamera.h
@@ -81,7 +81,6 @@ public:
virtual ~GCamera();
-
CoordinateFrame getCoordinateFrame() const;
void getCoordinateFrame(CoordinateFrame& c) const;
void setCoordinateFrame(const CoordinateFrame& c);
@@ -152,14 +151,12 @@ public:
float getImagePlaneDepth(
const class Rect2D& viewport) const;
-
/**
Returns the world space ray passing through the center of pixel
(x, y) on the image plane. The pixel x and y axes are opposite
the 3D object space axes: (0,0) is the upper left corner of the screen.
They are in viewport coordinates, not screen coordinates.
-
Integer (x, y) values correspond to
the upper left corners of pixels. If you want to cast rays
through pixel centers, add 0.5 to x and y.
@@ -169,7 +166,6 @@ public:
float y,
const class Rect2D& viewport) const;
-
/**
Returns a negative z-value.
*/
diff --git a/dep/include/g3dlite/G3D/Line.h b/dep/include/g3dlite/G3D/Line.h
index 724d5ef88cb..fedcb4d8cf0 100644
--- a/dep/include/g3dlite/G3D/Line.h
+++ b/dep/include/g3dlite/G3D/Line.h
@@ -81,6 +81,5 @@ public:
};// namespace
-
#endif
diff --git a/dep/include/g3dlite/G3D/Matrix3.h b/dep/include/g3dlite/G3D/Matrix3.h
index 0fd85b306c9..99e049654ee 100644
--- a/dep/include/g3dlite/G3D/Matrix3.h
+++ b/dep/include/g3dlite/G3D/Matrix3.h
@@ -54,7 +54,6 @@ public:
@cite Implementation from Watt and Watt, pg 362*/
Matrix3(const class Quat& q);
-
/**
Sets all elements.
*/
@@ -126,7 +125,6 @@ public:
return kProd;
}
-
/**
* vector * matrix [1x3 * 3x3 = 1x3]
*/
@@ -288,7 +286,6 @@ protected:
};
-
//----------------------------------------------------------------------------
/** <code>v * M == M.transpose() * v</code> */
inline Vector3 operator* (const Vector3& rkPoint, const Matrix3& rkMatrix) {
@@ -304,7 +301,6 @@ inline Vector3 operator* (const Vector3& rkPoint, const Matrix3& rkMatrix) {
return kProd;
}
-
} // namespace
#endif
diff --git a/dep/include/g3dlite/G3D/Quat.h b/dep/include/g3dlite/G3D/Quat.h
index f53d70be909..5fc30e8ec49 100644
--- a/dep/include/g3dlite/G3D/Quat.h
+++ b/dep/include/g3dlite/G3D/Quat.h
@@ -209,13 +209,11 @@ public:
return (*this) * other.inverse();
}
-
/** Is the magnitude nearly 1.0? */
inline bool isUnit(float tolerance = 1e-5) const {
return abs(dot(*this) - 1.0f) < tolerance;
}
-
inline float magnitude() const {
return sqrtf(dot(*this));
}
@@ -268,7 +266,6 @@ public:
return Quat(sinf(A) * v, cosf(A));
}
-
/**
Raise this quaternion to a power. For a rotation, this is
the effect of rotating x times as much as the original
@@ -281,7 +278,6 @@ public:
return (log() * x).exp();
}
-
/**
@deprecated
Use toUnit()
@@ -695,8 +691,6 @@ inline G3D::Quat pow(const G3D::Quat& q, double x) {
return q.pow((float)x);
}
-
-
#include "Quat.inl"
#endif
diff --git a/dep/include/g3dlite/G3D/Quat.inl b/dep/include/g3dlite/G3D/Quat.inl
index 705cb0455d4..9e4c861d93b 100644
--- a/dep/include/g3dlite/G3D/Quat.inl
+++ b/dep/include/g3dlite/G3D/Quat.inl
@@ -1,11 +1,11 @@
/**
Quat.inl
-
- @cite Quaternion implementation based on Watt & Watt page 363.
+
+ @cite Quaternion implementation based on Watt & Watt page 363.
Thanks to Max McGuire for slerp optimizations.
-
+
@maintainer Morgan McGuire, matrix@graphics3d.com
-
+
@created 2002-01-23
@edited 2004-03-04
*/
@@ -24,8 +24,6 @@ inline const float& Quat::operator[] (int i) const {
return ((float*)this)[i];
}
-
-
inline Quat Quat::operator-(const Quat& other) const {
return Quat(x - other.x, y - other.y, z - other.z, w - other.w);
}
diff --git a/dep/include/g3dlite/G3D/Ray.h b/dep/include/g3dlite/G3D/Ray.h
index 3929cf1e6ac..740f307d88c 100644
--- a/dep/include/g3dlite/G3D/Ray.h
+++ b/dep/include/g3dlite/G3D/Ray.h
@@ -121,7 +121,6 @@ public:
const Vector3& edge01,
const Vector3& edge02) const;
-
inline float intersectionTime(
const Vector3& vert0,
const Vector3& vert1,
@@ -130,7 +129,6 @@ public:
return intersectionTime(vert0, vert1, vert2, vert1 - vert0, vert2 - vert0);
}
-
inline float intersectionTime(
const Vector3& vert0,
const Vector3& vert1,
@@ -177,7 +175,6 @@ public:
const Vector3& normal) const;
};
-
#define EPSILON 0.000001
#define CROSS(dest,v1,v2) \
dest[0]=v1[1]*v2[2]-v1[2]*v2[1]; \
@@ -236,7 +233,6 @@ inline float Ray::intersectionTime(
return (float)inf();
}
-
// Case where we don't need correct (u, v):
const float t = DOT(edge2, qvec);
@@ -249,7 +245,6 @@ inline float Ray::intersectionTime(
}
}
-
inline float Ray::intersectionTime(
const Vector3& vert0,
const Vector3& vert1,
diff --git a/dep/include/g3dlite/G3D/System.h b/dep/include/g3dlite/G3D/System.h
index ab5a8d60a76..81abff3fb50 100644
--- a/dep/include/g3dlite/G3D/System.h
+++ b/dep/include/g3dlite/G3D/System.h
@@ -22,7 +22,6 @@
# include <CoreServices/CoreServices.h>
#endif
-
namespace G3D {
typedef double RealTime;
@@ -116,7 +115,6 @@ public:
};
-
} // namespace
#endif
diff --git a/dep/include/g3dlite/G3D/Table.h b/dep/include/g3dlite/G3D/Table.h
index 1d021daae2b..aded5c38555 100644
--- a/dep/include/g3dlite/G3D/Table.h
+++ b/dep/include/g3dlite/G3D/Table.h
@@ -28,7 +28,6 @@
# pragma warning (disable : 4786)
#endif
-
template<typename Key>
struct GHashCode{};
@@ -76,7 +75,6 @@ struct GHashCode<std::string>
namespace G3D {
-
/**
An unordered data structure mapping keys to values.
@@ -103,7 +101,6 @@ namespace G3D {
And rely on the default enum operator==.
-
Periodically check that debugGetLoad() is low (> 0.1). When it gets near
1.0 your hash function is badly designed and maps too many inputs to
the same output.
@@ -131,7 +128,6 @@ private:
Entry entry;
Node* next;
-
/** Provide pooled allocation for speed. */
inline void* operator new (size_t size) {
return System::malloc(size);
@@ -141,7 +137,6 @@ private:
System::free(p);
}
-
Node(Key key, Value value, size_t hashCode, Node* next) {
this->entry.key = key;
this->entry.value = value;
@@ -419,7 +414,6 @@ public:
}
};
-
/**
C++ STL style iterator method. Returns the first Entry, which
contains a key and value. Use preincrement (++entry) to get to
@@ -448,7 +442,6 @@ public:
System::memset(bucket, 0, sizeof(Node*) * numBuckets);
}
-
/**
Returns the number of keys.
*/
@@ -456,7 +449,6 @@ public:
return _size;
}
-
/**
If you insert a pointer into the key or value of a table, you are
responsible for deallocating the object eventually. Inserting
@@ -546,7 +538,6 @@ public:
n = n->next;
} while (n != NULL);
-
alwaysAssertM(false, "Tried to remove a key that was not in the table.");
}
@@ -616,7 +607,6 @@ public:
return false;
}
-
/**
Short syntax for get.
*/
@@ -624,7 +614,6 @@ public:
return get(key);
}
-
/**
Returns an array of all of the keys in the table.
You can iterate over the keys to get the values.
diff --git a/dep/include/g3dlite/G3D/Vector2.h b/dep/include/g3dlite/G3D/Vector2.h
index 3d66e654f93..273ab6b4d07 100644
--- a/dep/include/g3dlite/G3D/Vector2.h
+++ b/dep/include/g3dlite/G3D/Vector2.h
@@ -144,8 +144,6 @@ public:
/** Largest representable vector */
static const Vector2& maxFinite();
-
-
// Deprecated. See Matrix3::identity() for details.
/** @deprecated Use Vector2::zero() */
static const Vector2 ZERO;
@@ -207,53 +205,42 @@ inline Vector2 operator*(int s, const Vector2& v) {
return v * (float)s;
}
-
inline unsigned int hashCode(const G3D::Vector2& v) {
return v.hashCode();
}
-
inline Vector2::Vector2 () : x(0.0f), y(0.0f) {
}
-
inline Vector2::Vector2(float _x, float _y) : x(_x), y(_y) {
}
-
inline Vector2::Vector2 (float afCoordinate[2]) {
x = afCoordinate[0];
y = afCoordinate[1];
}
-
-
inline Vector2::Vector2 (double afCoordinate[2]) {
x = (float)afCoordinate[0];
y = (float)afCoordinate[1];
}
-
inline Vector2::Vector2 (const Vector2& rkVector) {
x = rkVector.x;
y = rkVector.y;
}
-
inline Vector2::Vector2 (const Vector2int16& v) : x(v.x), y(v.y) {
}
-
inline float& Vector2::operator[] (int i) {
return ((float*)this)[i];
}
-
inline const float& Vector2::operator[] (int i) const {
return ((float*)this)[i];
}
-
inline Vector2::operator float* () {
return (float*)this;
}
@@ -262,62 +249,48 @@ inline Vector2::operator const float* () const {
return (float*)this;
}
-
inline Vector2& Vector2::operator= (const Vector2& rkVector) {
x = rkVector.x;
y = rkVector.y;
return *this;
}
-
inline bool Vector2::operator== (const Vector2& rkVector) const {
return ( x == rkVector.x && y == rkVector.y);
}
-
inline bool Vector2::operator!= (const Vector2& rkVector) const {
return ( x != rkVector.x || y != rkVector.y);
}
-
inline Vector2 Vector2::operator+ (const Vector2& rkVector) const {
return Vector2(x + rkVector.x, y + rkVector.y);
}
-
inline Vector2 Vector2::operator- (const Vector2& rkVector) const {
return Vector2(x - rkVector.x, y - rkVector.y);
}
-
inline Vector2 Vector2::operator* (float fScalar) const {
return Vector2(fScalar*x, fScalar*y);
}
-
-
inline Vector2 Vector2::operator- () const {
return Vector2( -x, -y);
}
-
-
inline Vector2& Vector2::operator+= (const Vector2& rkVector) {
x += rkVector.x;
y += rkVector.y;
return *this;
}
-
-
inline Vector2& Vector2::operator-= (const Vector2& rkVector) {
x -= rkVector.x;
y -= rkVector.y;
return *this;
}
-
-
inline Vector2& Vector2::operator*= (float fScalar) {
x *= fScalar;
y *= fScalar;
@@ -325,44 +298,34 @@ inline Vector2& Vector2::operator*= (float fScalar) {
}
-
-
inline Vector2& Vector2::operator*= (const Vector2& rkVector) {
x *= rkVector.x;
y *= rkVector.y;
return *this;
}
-
-
inline Vector2& Vector2::operator/= (const Vector2& rkVector) {
x /= rkVector.x;
y /= rkVector.y;
return *this;
}
-
inline Vector2 Vector2::operator* (const Vector2& rkVector) const {
return Vector2(x * rkVector.x, y * rkVector.y);
}
-
-
inline Vector2 Vector2::operator/ (const Vector2& rkVector) const {
return Vector2(x / rkVector.x, y / rkVector.y);
}
-
inline float Vector2::squaredLength () const {
return x*x + y*y;
}
-
inline float Vector2::length () const {
return sqrtf(x*x + y*y);
}
-
inline Vector2 Vector2::direction () const {
float lenSquared = x * x + y * y;
@@ -373,50 +336,34 @@ inline Vector2 Vector2::direction () const {
}
}
-
-
inline float Vector2::dot (const Vector2& rkVector) const {
return x*rkVector.x + y*rkVector.y;
}
-
-
inline Vector2 Vector2::min(const Vector2 &v) const {
return Vector2(G3D::min(v.x, x), G3D::min(v.y, y));
}
-
-
inline Vector2 Vector2::max(const Vector2 &v) const {
return Vector2(G3D::max(v.x, x), G3D::max(v.y, y));
}
-
-
inline bool Vector2::fuzzyEq(const Vector2& other) const {
return G3D::fuzzyEq((*this - other).squaredLength(), 0);
}
-
-
inline bool Vector2::fuzzyNe(const Vector2& other) const {
return G3D::fuzzyNe((*this - other).squaredLength(), 0);
}
-
-
inline bool Vector2::isFinite() const {
return G3D::isFinite(x) && G3D::isFinite(y);
}
-
-
inline bool Vector2::isZero() const {
return (x == 0.0f) && (y == 0.0f);
}
-
-
inline bool Vector2::isUnit() const {
return squaredLength() == 1.0f;
}
@@ -431,9 +378,7 @@ inline G3D::Vector2 operator*(int s, const G3D::Vector2& v) {
return v * (float)s;
}
-
inline unsigned int hashCode(const G3D::Vector2& v);
-
#endif
diff --git a/dep/include/g3dlite/G3D/Vector2.inl b/dep/include/g3dlite/G3D/Vector2.inl
index 27abecf02ce..4f7c55a39cf 100644
--- a/dep/include/g3dlite/G3D/Vector2.inl
+++ b/dep/include/g3dlite/G3D/Vector2.inl
@@ -1,13 +1,12 @@
/**
@file Vector2.inl
-
+
@maintainer Morgan McGuire, matrix@graphics3d.com
@cite Portions by Laura Wollstadt, graphics3d.com
-
+
@cite Portions based on Dave Eberly'x Magic Software Library
at http://www.magic-software.com
-
-
+
@created 2001-06-02
@edited 2006-01-14
@@ -15,6 +14,5 @@
All rights reserved.
*/
-
}
diff --git a/dep/include/g3dlite/G3D/Vector2int16.h b/dep/include/g3dlite/G3D/Vector2int16.h
index 40f39bae43d..c4211b0aaab 100644
--- a/dep/include/g3dlite/G3D/Vector2int16.h
+++ b/dep/include/g3dlite/G3D/Vector2int16.h
@@ -52,7 +52,6 @@ public:
return ((G3D::int16*)this)[i];
}
-
inline bool operator== (const Vector2int16& rkVector) const {
return ((int32*)this)[0] == ((int32*)&rkVector)[0];
}
diff --git a/dep/include/g3dlite/G3D/Vector3.h b/dep/include/g3dlite/G3D/Vector3.h
index 9f46bf87233..140eb284e12 100644
--- a/dep/include/g3dlite/G3D/Vector3.h
+++ b/dep/include/g3dlite/G3D/Vector3.h
@@ -41,7 +41,6 @@ b = v.xz();
j = b.xx();
</PRE>
-
<B>Warning</B>
Do not subclass-- this implementation makes assumptions about the
@@ -160,7 +159,6 @@ public:
*/
Vector3 fastDirection() const;
-
/**
See also G3D::Ray::reflect.
The length is 1.
@@ -174,7 +172,6 @@ public:
*/
Vector3 reflectionDirection(const Vector3& normal) const;
-
/**
Returns Vector3::zero() if the length is nearly zero, otherwise
returns a unit vector.
@@ -302,7 +299,6 @@ public:
*/
static Vector3 cosRandom(const Vector3& normal);
-
/**
Random vector distributed over the hemisphere about normal.
*/
diff --git a/dep/include/g3dlite/G3D/Vector3.inl b/dep/include/g3dlite/G3D/Vector3.inl
index e2f328165bb..9211c2a70fd 100644
--- a/dep/include/g3dlite/G3D/Vector3.inl
+++ b/dep/include/g3dlite/G3D/Vector3.inl
@@ -1,4 +1,4 @@
-/**
+/**
@file Vector3.inl
@maintainer Morgan McGuire, matrix@graphics3d.com
@@ -66,7 +66,6 @@ inline float& Vector3::operator[] (int i) {
return ((float*)this)[i];
}
-
//----------------------------------------------------------------------------
inline Vector3& Vector3::operator= (const Vector3& rkVector) {
x = rkVector.x;
diff --git a/dep/include/g3dlite/G3D/Vector4.inl b/dep/include/g3dlite/G3D/Vector4.inl
index 48ebf542723..576cca83b56 100644
--- a/dep/include/g3dlite/G3D/Vector4.inl
+++ b/dep/include/g3dlite/G3D/Vector4.inl
@@ -1,4 +1,4 @@
-/**
+/**
@file Vector4.inl
@maintainer Morgan McGuire, matrix@graphics3d.com
@@ -131,10 +131,9 @@ inline Vector4& Vector4::operator-= (const Vector4& rkVector) {
//----------------------------------------------------------------------------
inline Vector4 Vector4::lerp(const Vector4& v, float alpha) const {
- return (*this) + (v - *this) * alpha;
+ return (*this) + (v - *this) * alpha;
}
-
//----------------------------------------------------------------------------
inline Vector4& Vector4::operator*= (float fScalar) {
x *= fScalar;
@@ -144,7 +143,6 @@ inline Vector4& Vector4::operator*= (float fScalar) {
return *this;
}
-
//----------------------------------------------------------------------------
inline float Vector4::dot(const Vector4& rkVector) const {
return x*rkVector.x + y*rkVector.y + z*rkVector.z + w*rkVector.w;
diff --git a/dep/include/g3dlite/G3D/format.h b/dep/include/g3dlite/G3D/format.h
index fd129381791..b2948bfcd25 100644
--- a/dep/include/g3dlite/G3D/format.h
+++ b/dep/include/g3dlite/G3D/format.h
@@ -51,7 +51,6 @@ std::string vformat(
const char* fmt,
va_list argPtr) G3D_CHECK_VPRINTF_ARGS;
-
}; // namespace
#endif
diff --git a/dep/include/g3dlite/G3D/g3dmath.h b/dep/include/g3dlite/G3D/g3dmath.h
index 38ee23fc3c1..ecf355157c1 100644
--- a/dep/include/g3dlite/G3D/g3dmath.h
+++ b/dep/include/g3dlite/G3D/g3dmath.h
@@ -100,12 +100,10 @@ __inline long int lrintf(float flt) {
return (long int)floorf(flt+0.5f);
}
-
#endif
#endif
-
const double fuzzyEpsilon = 0.00001;
/** Returns a reference to a static double.
@@ -225,7 +223,6 @@ inline int iSign(float f) {
return iSign((double)f);
}
-
/**
Fast round to integer using the lrint routine.
Typically 6x faster than casting to integer.
@@ -459,7 +456,6 @@ inline float dot(float a, float b) {
return a * b;
}
-
/**
a * b (for DirectX/Cg support)
*/
@@ -478,7 +474,6 @@ inline double rsqrt(double x) {
return 1.0 / sqrt(x);
}
-
/**
sin(x)/x
*/
@@ -512,7 +507,6 @@ inline double wrap(double t, double hi) {
return wrap(t, 0, hi);
}
-
} // namespace
#ifdef _MSC_VER
diff --git a/dep/include/g3dlite/G3D/g3dmath.inl b/dep/include/g3dlite/G3D/g3dmath.inl
index ad685bc5ce4..9bf661a7ebc 100644
--- a/dep/include/g3dlite/G3D/g3dmath.inl
+++ b/dep/include/g3dlite/G3D/g3dmath.inl
@@ -1,8 +1,8 @@
/**
@file g3dmath.inl
-
+
@maintainer Morgan McGuire, matrix@graphics3d.com
-
+
@created 2001-06-02
@edited 2006-01-14
*/
@@ -159,7 +159,6 @@ inline float uniformRandom(float low, float hi) {
return (hi - low) * float(::rand()) / float(RAND_MAX) + low;
}
-
//----------------------------------------------------------------------------
inline double G3D_DEPRECATED symmetricRandom () {
return 2.0 * double(::rand()) / double(RAND_MAX) - 1.0;
diff --git a/dep/include/g3dlite/G3D/platform.h b/dep/include/g3dlite/G3D/platform.h
index 16f9b208d18..136413d1d9d 100644
--- a/dep/include/g3dlite/G3D/platform.h
+++ b/dep/include/g3dlite/G3D/platform.h
@@ -49,7 +49,6 @@
#error Unknown platform
#endif
-
// Default to compiling with SSE, but if you want to compile
// without installing SP5.0 and the Processor Pack on Windows, compile with NO_SSE
// defined (can be passed to the compiler command line with /D "NO_SSE")
@@ -73,7 +72,6 @@
# endif
#endif
-
// Verify that the supported compilers are being used and that this is a known
// processor.
@@ -102,7 +100,6 @@
# define G3D_CHECK_VPRINTF_ARGS __attribute__((__format__(__printf__, 1, 0)))
#endif
-
#ifdef G3D_OSX
#ifndef __GNUC__
#error G3D only supports the gcc compiler on OS X.
@@ -132,7 +129,6 @@
# define G3D_CHECK_VPRINTF_ARGS __attribute__((__format__(__printf__, 1, 0)))
#endif
-
#ifdef G3D_WIN32
// Microsoft Visual C++ 7.1 _MSC_VER = 1310
// Microsoft Visual C++ 7.0 _MSC_VER = 1300
@@ -234,7 +230,6 @@
# define WIN32_LEAN_AND_MEAN 1
# endif
-
# define NOMINMAX 1
# include <windows.h>
# undef WIN32_LEAN_AND_MEAN
diff --git a/dep/include/mersennetwister/MersenneTwister.h b/dep/include/mersennetwister/MersenneTwister.h
index 0fbd9242e45..a4a3bbdd415 100644
--- a/dep/include/mersennetwister/MersenneTwister.h
+++ b/dep/include/mersennetwister/MersenneTwister.h
@@ -80,7 +80,6 @@ protected:
uint32 *pNext; // next value to get from state
int left; // number of values left before reload needed
-
//Methods
public:
MTRand( const uint32& oneSeed ); // initialize with a simple uint32
@@ -218,7 +217,6 @@ inline MTRand::uint32 MTRand::randInt( const uint32& n )
return i;
}
-
inline void MTRand::seed( const uint32 oneSeed )
{
// Seed the generator with a simple uint32
@@ -226,7 +224,6 @@ inline void MTRand::seed( const uint32 oneSeed )
reload();
}
-
inline void MTRand::seed( uint32 *const bigSeed, const uint32 seedLength )
{
// Seed the generator with an array of uint32's
@@ -239,7 +236,7 @@ inline void MTRand::seed( uint32 *const bigSeed, const uint32 seedLength )
register int i = 1;
register uint32 j = 0;
register int k = ( N > int(seedLength) ? N : int(seedLength) );
- for( ; k; --k )
+ for (; k; --k )
{
state[i] =
state[i] ^ ( (state[i-1] ^ (state[i-1] >> 30)) * 1664525UL );
@@ -249,7 +246,7 @@ inline void MTRand::seed( uint32 *const bigSeed, const uint32 seedLength )
if( i >= N ) { state[0] = state[N-1]; i = 1; }
if( j >= seedLength ) j = 0;
}
- for( k = N - 1; k; --k )
+ for (k = N - 1; k; --k )
{
state[i] =
state[i] ^ ( (state[i-1] ^ (state[i-1] >> 30)) * 1566083941UL );
@@ -262,14 +259,12 @@ inline void MTRand::seed( uint32 *const bigSeed, const uint32 seedLength )
reload();
}
-
inline void MTRand::seed()
{
// Seed the generator with hash of time() and clock() values
seed( hash( time(NULL), clock() ) );
}
-
inline void MTRand::initialize( const uint32 seed )
{
// Initialize generator state with seed
@@ -280,30 +275,28 @@ inline void MTRand::initialize( const uint32 seed )
register uint32 *r = state;
register int i = 1;
*s++ = seed & 0xffffffffUL;
- for( ; i < N; ++i )
+ for (; i < N; ++i )
{
*s++ = ( 1812433253UL * ( *r ^ (*r >> 30) ) + i ) & 0xffffffffUL;
r++;
}
}
-
inline void MTRand::reload()
{
// Generate N new values in state
// Made clearer and faster by Matthew Bellew (matthew.bellew@home.com)
register uint32 *p = state;
register int i;
- for( i = N - M; i--; ++p )
+ for (i = N - M; i--; ++p )
*p = twist( p[M], p[0], p[1] );
- for( i = M; --i; ++p )
+ for (i = M; --i; ++p )
*p = twist( p[M-N], p[0], p[1] );
*p = twist( p[M-N], p[0], state[0] );
left = N, pNext = state;
}
-
inline MTRand::uint32 MTRand::hash( time_t t, clock_t c )
{
// Get a uint32 from t and c
@@ -314,14 +307,14 @@ inline MTRand::uint32 MTRand::hash( time_t t, clock_t c )
uint32 h1 = 0;
unsigned char *p = (unsigned char *) &t;
- for( size_t i = 0; i < sizeof(t); ++i )
+ for (size_t i = 0; i < sizeof(t); ++i )
{
h1 *= UCHAR_MAX + 2U;
h1 += p[i];
}
uint32 h2 = 0;
p = (unsigned char *) &c;
- for( size_t j = 0; j < sizeof(c); ++j )
+ for (size_t j = 0; j < sizeof(c); ++j )
{
h2 *= UCHAR_MAX + 2U;
h2 += p[j];
@@ -329,23 +322,21 @@ inline MTRand::uint32 MTRand::hash( time_t t, clock_t c )
return ( h1 + differ++ ) ^ h2;
}
-
inline void MTRand::save( uint32* saveArray ) const
{
register uint32 *sa = saveArray;
register const uint32 *s = state;
register int i = N;
- for( ; i--; *sa++ = *s++ ) {}
+ for (; i--; *sa++ = *s++ ) {}
*sa = left;
}
-
inline void MTRand::load( uint32 *const loadArray )
{
register uint32 *s = state;
register uint32 *la = loadArray;
register int i = N;
- for( ; i--; *s++ = *la++ ) {}
+ for (; i--; *s++ = *la++ ) {}
left = *la;
pNext = &state[N-left];
}
@@ -355,16 +346,15 @@ inline std::ostream& operator<<( std::ostream& os, const MTRand& mtrand )
{
register const MTRand::uint32 *s = mtrand.state;
register int i = mtrand.N;
- for( ; i--; os << *s++ << "\t" ) {}
+ for (; i--; os << *s++ << "\t" ) {}
return os << mtrand.left;
}
-
inline std::istream& operator>>( std::istream& is, MTRand& mtrand )
{
register MTRand::uint32 *s = mtrand.state;
register int i = mtrand.N;
- for( ; i--; is >> *s++ ) {}
+ for (; i--; is >> *s++ ) {}
is >> mtrand.left;
mtrand.pNext = &mtrand.state[mtrand.N-mtrand.left];
return is;
diff --git a/dep/include/sockets/Base64.h b/dep/include/sockets/Base64.h
index b1fd5364fc2..d4323aaa019 100644
--- a/dep/include/sockets/Base64.h
+++ b/dep/include/sockets/Base64.h
@@ -68,7 +68,6 @@ static const char *bstr;
static const char rstr[128];
};
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/include/sockets/Exception.h b/dep/include/sockets/Exception.h
index ae48ab765ba..bb881b2d74f 100644
--- a/dep/include/sockets/Exception.h
+++ b/dep/include/sockets/Exception.h
@@ -29,8 +29,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace SOCKETS_NAMESPACE {
#endif
-
-
class Exception
{
public:
@@ -48,8 +46,6 @@ private:
};
-
-
#ifdef SOCKETS_NAMESPACE
} // namespace SOCKETS_NAMESPACE {
#endif
diff --git a/dep/include/sockets/File.h b/dep/include/sockets/File.h
index e1d00ec38c7..ed322efa2d8 100644
--- a/dep/include/sockets/File.h
+++ b/dep/include/sockets/File.h
@@ -38,7 +38,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace SOCKETS_NAMESPACE {
#endif
-
/** IFile implementation of a disk file.
\ingroup file */
class File : public IFile
@@ -74,8 +73,6 @@ private:
};
-
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/include/sockets/IFile.h b/dep/include/sockets/IFile.h
index e1e39727b52..657c8a4b1d9 100644
--- a/dep/include/sockets/IFile.h
+++ b/dep/include/sockets/IFile.h
@@ -62,7 +62,6 @@ public:
};
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/include/sockets/ISocketHandler.h b/dep/include/sockets/ISocketHandler.h
index bb1aa42bafc..940783c104b 100644
--- a/dep/include/sockets/ISocketHandler.h
+++ b/dep/include/sockets/ISocketHandler.h
@@ -54,7 +54,6 @@ typedef enum {
class SocketAddress;
class Mutex;
-
/** Socket container class, event generator.
\ingroup basic */
class ISocketHandler
@@ -223,7 +222,6 @@ public:
};
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/include/sockets/Ipv4Address.h b/dep/include/sockets/Ipv4Address.h
index ba2292425a0..71d925254e9 100644
--- a/dep/include/sockets/Ipv4Address.h
+++ b/dep/include/sockets/Ipv4Address.h
@@ -26,12 +26,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "sockets-config.h"
#include "SocketAddress.h"
-
#ifdef SOCKETS_NAMESPACE
namespace SOCKETS_NAMESPACE {
#endif
-
/* Ipv4 address implementation.
\ingroup basic */
class Ipv4Address : public SocketAddress
@@ -89,8 +87,6 @@ private:
};
-
-
#ifdef SOCKETS_NAMESPACE
} // namespace SOCKETS_NAMESPACE {
#endif
diff --git a/dep/include/sockets/Ipv6Address.h b/dep/include/sockets/Ipv6Address.h
index 9bd651786bc..20c68d8c92d 100644
--- a/dep/include/sockets/Ipv6Address.h
+++ b/dep/include/sockets/Ipv6Address.h
@@ -35,7 +35,6 @@ typedef unsigned __int32 uint32_t;
namespace SOCKETS_NAMESPACE {
#endif
-
/** Ipv6 address implementation.
\ingroup basic */
class Ipv6Address : public SocketAddress
@@ -96,8 +95,6 @@ private:
};
-
-
#ifdef SOCKETS_NAMESPACE
} // namespace SOCKETS_NAMESPACE {
#endif
diff --git a/dep/include/sockets/ListenSocket.h b/dep/include/sockets/ListenSocket.h
index 80aa48f20b4..8934a809d0e 100644
--- a/dep/include/sockets/ListenSocket.h
+++ b/dep/include/sockets/ListenSocket.h
@@ -51,7 +51,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace SOCKETS_NAMESPACE {
#endif
-
/** Binds incoming port number to new Socket class X.
\ingroup basic */
template <class X>
@@ -410,8 +409,6 @@ private:
bool m_bHasCreate;
};
-
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/include/sockets/Lock.h b/dep/include/sockets/Lock.h
index e819537ef26..f3bb9273920 100644
--- a/dep/include/sockets/Lock.h
+++ b/dep/include/sockets/Lock.h
@@ -50,8 +50,6 @@ private:
};
-
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/include/sockets/Mutex.h b/dep/include/sockets/Mutex.h
index 8fce2ce08ba..e42a57c3262 100644
--- a/dep/include/sockets/Mutex.h
+++ b/dep/include/sockets/Mutex.h
@@ -60,7 +60,6 @@ private:
#endif
};
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/include/sockets/Parse.h b/dep/include/sockets/Parse.h
index 4b42ea768b2..52bd9327e28 100644
--- a/dep/include/sockets/Parse.h
+++ b/dep/include/sockets/Parse.h
@@ -43,7 +43,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace SOCKETS_NAMESPACE {
#endif
-
/***************************************************/
/* interface of class Parse */
@@ -92,7 +91,6 @@ private:
bool pa_quote;
};
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/include/sockets/ResolvServer.h b/dep/include/sockets/ResolvServer.h
index b713a8ad382..409c9b7a619 100644
--- a/dep/include/sockets/ResolvServer.h
+++ b/dep/include/sockets/ResolvServer.h
@@ -62,8 +62,6 @@ private:
};
-
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/include/sockets/ResolvSocket.h b/dep/include/sockets/ResolvSocket.h
index 38ff3335c28..60743736e08 100644
--- a/dep/include/sockets/ResolvSocket.h
+++ b/dep/include/sockets/ResolvSocket.h
@@ -95,8 +95,6 @@ private:
};
-
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/include/sockets/SctpSocket.h b/dep/include/sockets/SctpSocket.h
index 50757fc4b13..ed507fb1880 100644
--- a/dep/include/sockets/SctpSocket.h
+++ b/dep/include/sockets/SctpSocket.h
@@ -36,7 +36,6 @@ namespace SOCKETS_NAMESPACE {
class SocketAddress;
-
class SctpSocket : public StreamSocket
{
public:
@@ -99,7 +98,6 @@ private:
char *m_buf; ///< Temporary receive buffer
};
-
#ifdef SOCKETS_NAMESPACE
} // namespace SOCKETS_NAMESPACE
#endif
diff --git a/dep/include/sockets/Socket.h b/dep/include/sockets/Socket.h
index 8a7fdc9d2fd..23a806b5ea1 100644
--- a/dep/include/sockets/Socket.h
+++ b/dep/include/sockets/Socket.h
@@ -43,17 +43,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "SocketAddress.h"
#include "Thread.h"
-
#ifdef SOCKETS_NAMESPACE
namespace SOCKETS_NAMESPACE {
#endif
-
class ISocketHandler;
class SocketAddress;
class IFile;
-
/** \defgroup basic Basic sockets */
/** Socket base class.
\ingroup basic */
@@ -471,7 +468,6 @@ public:
// TCP options in TcpSocket.h/TcpSocket.cpp
-
#ifdef HAVE_OPENSSL
/** @name SSL Support */
//@{
@@ -734,7 +730,6 @@ static WSAInitializer m_winsock_init; ///< Winsock initialization singleton cla
}
#endif
-
#endif // _SOCKETS_Socket_H
diff --git a/dep/include/sockets/SocketAddress.h b/dep/include/sockets/SocketAddress.h
index 496600b112c..abdbbfd2cf6 100644
--- a/dep/include/sockets/SocketAddress.h
+++ b/dep/include/sockets/SocketAddress.h
@@ -32,7 +32,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace SOCKETS_NAMESPACE {
#endif
-
/**
This class and its subclasses is intended to be used as replacement
for the internal data type 'ipaddr_t' and various implementations of
@@ -86,8 +85,6 @@ public:
};
-
-
#ifdef SOCKETS_NAMESPACE
} // namespace SOCKETS_NAMESPACE {
#endif
diff --git a/dep/include/sockets/SocketHandler.h b/dep/include/sockets/SocketHandler.h
index 1812c9c386f..5598ec4249b 100644
--- a/dep/include/sockets/SocketHandler.h
+++ b/dep/include/sockets/SocketHandler.h
@@ -41,7 +41,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace SOCKETS_NAMESPACE {
#endif
-
class Socket;
#ifdef ENABLE_RESOLVER
class ResolvServer;
@@ -257,7 +256,6 @@ private:
#endif
};
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/include/sockets/StdLog.h b/dep/include/sockets/StdLog.h
index 8266479f21c..3ff68d6e9ea 100644
--- a/dep/include/sockets/StdLog.h
+++ b/dep/include/sockets/StdLog.h
@@ -46,7 +46,6 @@ typedef enum
LOG_LEVEL_INFO
} loglevel_t;
-
class ISocketHandler;
class Socket;
@@ -65,7 +64,6 @@ public:
loglevel_t = LOG_LEVEL_WARNING) = 0;
};
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/include/sockets/StdoutLog.h b/dep/include/sockets/StdoutLog.h
index aee865be6af..aeb25b3e6e6 100644
--- a/dep/include/sockets/StdoutLog.h
+++ b/dep/include/sockets/StdoutLog.h
@@ -37,7 +37,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace SOCKETS_NAMESPACE {
#endif
-
/** StdLog implementation, logs to stdout.
\ingroup logging */
class StdoutLog : public StdLog
@@ -47,8 +46,6 @@ public:
};
-
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/include/sockets/StreamSocket.h b/dep/include/sockets/StreamSocket.h
index e839040e2b0..bcce10ffbc5 100644
--- a/dep/include/sockets/StreamSocket.h
+++ b/dep/include/sockets/StreamSocket.h
@@ -3,12 +3,10 @@
#include "Socket.h"
-
#ifdef SOCKETS_NAMESPACE
namespace SOCKETS_NAMESPACE {
#endif
-
/** SOCK_STREAM Socket base class.
\ingroup basic */
class StreamSocket : public Socket
@@ -117,12 +115,10 @@ private:
int m_shutdown; ///< Shutdown status
};
-
#ifdef SOCKETS_NAMESPACE
} // namespace SOCKETS_NAMESPACE {
#endif
-
#endif // _StreamSocket_H
diff --git a/dep/include/sockets/TcpSocket.h b/dep/include/sockets/TcpSocket.h
index 4caeb548aaa..de1be8bd8b9 100644
--- a/dep/include/sockets/TcpSocket.h
+++ b/dep/include/sockets/TcpSocket.h
@@ -41,14 +41,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define TCP_BUFSIZE_READ 16400
#define TCP_OUTPUT_CAPACITY 1024000
-
#ifdef SOCKETS_NAMESPACE
namespace SOCKETS_NAMESPACE {
#endif
class SocketAddress;
-
/** Socket implementation for TCP.
\ingroup basic */
class TcpSocket : public StreamSocket
@@ -349,7 +347,6 @@ static SSLInitializer m_ssl_init;
};
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/include/sockets/Thread.h b/dep/include/sockets/Thread.h
index e065a257a85..efb766e9ee6 100644
--- a/dep/include/sockets/Thread.h
+++ b/dep/include/sockets/Thread.h
@@ -91,7 +91,6 @@ private:
bool m_b_destructor;
};
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/include/sockets/UdpSocket.h b/dep/include/sockets/UdpSocket.h
index fd9965e96e8..3b06c6955bd 100644
--- a/dep/include/sockets/UdpSocket.h
+++ b/dep/include/sockets/UdpSocket.h
@@ -206,7 +206,6 @@ private:
bool m_b_read_ts;
};
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/include/sockets/Utility.h b/dep/include/sockets/Utility.h
index be0f6a05498..724a94e4b32 100644
--- a/dep/include/sockets/Utility.h
+++ b/dep/include/sockets/Utility.h
@@ -177,7 +177,6 @@ private:
static bool m_local_resolved; ///< ResolveLocal has been called if true
};
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/include/sockets/socket_include.h b/dep/include/sockets/socket_include.h
index dcfd4acfbd6..89855a54108 100644
--- a/dep/include/sockets/socket_include.h
+++ b/dep/include/sockets/socket_include.h
@@ -41,7 +41,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
in read operations - helps on ECOS */
#define SOCKETS_DYNAMIC_TEMP
-
// platform specific stuff
#if (defined(__unix__) || defined(unix)) && !defined(USG)
#include <sys/param.h>
@@ -81,7 +80,6 @@ typedef int SOCKET;
namespace SOCKETS_NAMESPACE {
#endif
-
// WIN32 adapt
#define closesocket close
#define INVALID_SOCKET -1
@@ -97,14 +95,12 @@ namespace SOCKETS_NAMESPACE {
#endif // !_WIN32
-
// ----------------------------------------
// Generic
#ifndef SOL_IP
#define SOL_IP IPPROTO_IP
#endif
-
// ----------------------------------------
// OS specific adaptions
@@ -151,13 +147,13 @@ namespace SOCKETS_NAMESPACE {
# endif
#elif defined (__NetBSD__) || defined (__OpenBSD__)
-# if !defined(MSG_NOSIGNAL)
-# define MSG_NOSIGNAL 0
-# endif
-# include <netinet/in.h>
-typedef in_addr_t ipaddr_t;
-typedef in_port_t port_t;
-#elif defined MACOSX
+# if !defined(MSG_NOSIGNAL)
+# define MSG_NOSIGNAL 0
+# endif
+# include <netinet/in.h>
+typedef in_addr_t ipaddr_t;
+typedef in_port_t port_t;
+#elif defined MACOSX
// ----------------------------------------
// Mac OS X
#include <string.h>
@@ -219,7 +215,6 @@ namespace SOCKETS_NAMESPACE {
#endif
#endif // _MSC_VER < 1200
-
#define MSG_NOSIGNAL 0
//#define SHUT_RDWR 2
#define SHUT_WR 1
@@ -231,7 +226,6 @@ const char *StrError(int x);
namespace SOCKETS_NAMESPACE {
#endif
-
// class WSAInitializer is a part of the Socket class (on win32)
// as a static instance - so whenever an application uses a Socket,
// winsock is initialized
@@ -269,7 +263,6 @@ namespace SOCKETS_NAMESPACE {
}
#endif
-
#endif
#ifdef SOCKETS_NAMESPACE
@@ -278,12 +271,10 @@ namespace SOCKETS_NAMESPACE {
/** List type containing file descriptors. */
typedef std::list<SOCKET> socket_v;
-
#ifdef SOCKETS_NAMESPACE
}
#endif
-
// getaddrinfo / getnameinfo replacements
#ifdef NO_GETADDRINFO
#ifndef AI_NUMERICHOST
@@ -294,7 +285,6 @@ namespace SOCKETS_NAMESPACE {
#endif
#endif
-
#endif // _SOCKETS_socket_include_H
diff --git a/dep/include/sockets/sockets-config.h b/dep/include/sockets/sockets-config.h
index 464ed34cabb..1c8dc439092 100644
--- a/dep/include/sockets/sockets-config.h
+++ b/dep/include/sockets/sockets-config.h
@@ -46,57 +46,45 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/* OpenSSL support. */
//#define HAVE_OPENSSL
-
/* Ipv6 support. */
//#define ENABLE_IPV6
-
/* SCTP support. */
//#define USE_SCTP
-
/* Define NO_GETADDRINFO if your operating system does not support
the "getaddrinfo" and "getnameinfo" function calls. */
#define NO_GETADDRINFO
-
/* Connection pool support. */
#define ENABLE_POOL
-
/* Socks4 client support. */
//#define ENABLE_SOCKS4
-
/* Asynchronous resolver. */
#define ENABLE_RESOLVER
-
/* Enable TCP reconnect on lost connection.
Socket::OnReconnect
Socket::OnDisconnect
*/
#define ENABLE_RECONNECT
-
/* Enable socket thread detach functionality. */
#define ENABLE_DETACH
-
/* Enable socket to socket triggers. Not yet in use. */
//#define ENABLE_TRIGGERS
-
/* Enabled exceptions. */
//#define ENABLE_EXCEPTIONS
-
/* Resolver uses the detach function so either enable both or disable both. */
#ifndef ENABLE_DETACH
#undef ENABLE_RESOLVER
#endif
-
#endif // _SOCKETS_CONFIG_H
diff --git a/dep/src/g3dlite/AABox.cpp b/dep/src/g3dlite/AABox.cpp
index f2f2b70535c..2279e9a51f0 100644
--- a/dep/src/g3dlite/AABox.cpp
+++ b/dep/src/g3dlite/AABox.cpp
@@ -19,15 +19,12 @@
#include "G3D/Plane.h"
#include "G3D/Sphere.h"
-
namespace G3D {
Box AABox::toBox() const {
return Box(lo, hi);
}
-
-
void AABox::split(const Vector3::Axis& axis, float location, AABox& low, AABox& high) const {
// Low, medium, and high along the chosen axis
float L = G3D::min(location, lo[axis]);
@@ -82,7 +79,6 @@ Vector3 AABox::randomSurfacePoint() const {
}
}
-
Vector3 AABox::randomInteriorPoint() const {
return Vector3(
(float)random(lo.x, hi.x),
@@ -91,7 +87,6 @@ Vector3 AABox::randomInteriorPoint() const {
}
#endif
-
bool AABox::intersects(const AABox& other) const {
// Must be overlap along all three axes.
// Try to find a separating axis.
@@ -110,7 +105,6 @@ bool AABox::intersects(const AABox& other) const {
return true;
}
-
bool AABox::culledBy(
const Array<Plane>& plane,
int& cullingPlaneIndex,
@@ -120,7 +114,6 @@ bool AABox::culledBy(
return culledBy(plane.getCArray(), plane.size(), cullingPlaneIndex, inMask, outMask);
}
-
bool AABox::culledBy(
const Array<Plane>& plane,
int& cullingPlaneIndex,
@@ -129,10 +122,8 @@ bool AABox::culledBy(
return culledBy(plane.getCArray(), plane.size(), cullingPlaneIndex, inMask);
}
-
int AABox::dummy = 0;
-
bool AABox::culledBy(
const class Plane* plane,
int numPlanes,
@@ -213,7 +204,6 @@ bool AABox::culledBy(
return false;
}
-
bool AABox::culledBy(
const class Plane* plane,
int numPlanes,
@@ -278,7 +268,6 @@ bool AABox::culledBy(
return false;
}
-
bool AABox::intersects(const class Sphere& sphere) const {
double d = 0;
@@ -295,6 +284,5 @@ bool AABox::intersects(const class Sphere& sphere) const {
return d <= square(sphere.radius);
}
-
} // namespace
diff --git a/dep/src/g3dlite/Box.cpp b/dep/src/g3dlite/Box.cpp
index fd3067048c0..725a7e95c3a 100644
--- a/dep/src/g3dlite/Box.cpp
+++ b/dep/src/g3dlite/Box.cpp
@@ -27,12 +27,10 @@ namespace G3D {
Box::Box() {
}
-
Box::Box(const AABox& b) {
init(b.low(), b.high());
}
-
Box::Box(
const Vector3& min,
const Vector3& max) {
@@ -61,7 +59,7 @@ void Box::init(
_axis[2] = Vector3::unitZ();
_volume = _extent.x * _extent.y * _extent.z;
- _area = 2 *
+ _area = 2 *
(_extent.x * _extent.y +
_extent.y * _extent.z +
_extent.z * _extent.x);
@@ -69,17 +67,14 @@ void Box::init(
_center = (max + min) / 2;
}
-
float Box::volume() const {
return _volume;
}
-
float Box::surfaceArea() const {
return _area;
}
-
void Box::getLocalFrame(CoordinateFrame& frame) const {
frame.rotation = Matrix3(
@@ -90,14 +85,12 @@ void Box::getLocalFrame(CoordinateFrame& frame) const {
frame.translation = _center;
}
-
CoordinateFrame Box::localFrame() const {
CoordinateFrame out;
getLocalFrame(out);
return out;
}
-
void Box::getFaceCorners(int f, Vector3& v0, Vector3& v1, Vector3& v2, Vector3& v3) const {
switch (f) {
case 0:
@@ -129,7 +122,6 @@ void Box::getFaceCorners(int f, Vector3& v0, Vector3& v1, Vector3& v2, Vector3&
}
}
-
bool Box::culledBy(
const Array<Plane>& plane,
int& cullingPlaneIndex,
@@ -139,7 +131,6 @@ bool Box::culledBy(
return culledBy(plane.getCArray(), plane.size(), cullingPlaneIndex, inMask, outMask);
}
-
bool Box::culledBy(
const Array<Plane>& plane,
int& cullingPlaneIndex,
@@ -148,7 +139,6 @@ bool Box::culledBy(
return culledBy(plane.getCArray(), plane.size(), cullingPlaneIndex, inMask);
}
-
int32 Box::dummy = 0;
bool Box::culledBy(
@@ -169,7 +159,7 @@ bool Box::culledBy(
// Only test planes that are not masked
if ((inMask & 1) != 0) {
-
+
Vector3 corner;
int numContained = 0;
@@ -211,7 +201,6 @@ bool Box::culledBy(
return false;
}
-
bool Box::culledBy(
const class Plane* plane,
int numPlanes,
@@ -227,7 +216,7 @@ bool Box::culledBy(
// Only test planes that are not masked
if ((inMask & 1) != 0) {
-
+
bool culled = true;
int v;
@@ -256,7 +245,6 @@ bool Box::culledBy(
return false;
}
-
bool Box::contains(
const Vector3& point) const {
@@ -276,7 +264,7 @@ bool Box::contains(
Vector3 osPoint = M.inverse() * (point - _corner[0]);
return
- (osPoint.x >= 0) &&
+ (osPoint.x >= 0) &&
(osPoint.y >= 0) &&
(osPoint.z >= 0) &&
(osPoint.x <= 1) &&
@@ -317,7 +305,6 @@ void Box::getRandomSurfacePoint(Vector3& P, Vector3& N) const {
}
}
-
Vector3 Box::randomInteriorPoint() const {
Vector3 sum = _center;
@@ -329,7 +316,6 @@ Vector3 Box::randomInteriorPoint() const {
}
#endif
-
void Box::getBounds(class AABox& aabb) const {
Vector3 lo = _corner[0];
@@ -344,6 +330,5 @@ void Box::getBounds(class AABox& aabb) const {
aabb = AABox(lo, hi);
}
-
} // namespace
diff --git a/dep/src/g3dlite/Crypto.cpp b/dep/src/g3dlite/Crypto.cpp
index bff3a5a966c..03851193e57 100644
--- a/dep/src/g3dlite/Crypto.cpp
+++ b/dep/src/g3dlite/Crypto.cpp
@@ -3,7 +3,6 @@
@author Morgan McGuire, matrix@graphics3d.com
-
@created 2006-03-28
@edited 2006-04-06
*/
@@ -14,7 +13,6 @@
namespace G3D {
-
int Crypto::smallPrime(int n) {
debugAssert(n < numSmallPrimes() && n >= 0);
@@ -57,7 +55,6 @@ int Crypto::smallPrime(int n) {
return table[n];
}
-
int Crypto::numSmallPrimes() {
return 303;
}
diff --git a/dep/src/g3dlite/Matrix3.cpp b/dep/src/g3dlite/Matrix3.cpp
index 630c1883c0b..76864e1b60c 100644
--- a/dep/src/g3dlite/Matrix3.cpp
+++ b/dep/src/g3dlite/Matrix3.cpp
@@ -49,7 +49,6 @@ bool Matrix3::fuzzyEq(const Matrix3& b) const {
return true;
}
-
bool Matrix3::isOrthonormal() const {
Vector3 X = getColumn(0);
Vector3 Y = getColumn(1);
@@ -123,7 +122,6 @@ void Matrix3::set(
elt[2][2] = fEntry22;
}
-
//----------------------------------------------------------------------------
Vector3 Matrix3::getColumn (int iCol) const {
assert((0 <= iCol) && (iCol < 3));
@@ -142,7 +140,6 @@ void Matrix3::setColumn(int iCol, const Vector3 &vector) {
elt[2][iCol] = vector.z;
}
-
void Matrix3::setRow(int iRow, const Vector3 &vector) {
debugAssert((iRow >= 0) && (iRow < 3));
elt[iRow][0] = vector.x;
@@ -150,7 +147,6 @@ void Matrix3::setRow(int iRow, const Vector3 &vector) {
elt[iRow][2] = vector.z;
}
-
//----------------------------------------------------------------------------
bool Matrix3::operator== (const Matrix3& rkMatrix) const {
for (int iRow = 0; iRow < 3; iRow++) {
@@ -290,7 +286,6 @@ Matrix3 operator* (float fScalar, const Matrix3& rkMatrix) {
return (double)fScalar * rkMatrix;
}
-
Matrix3 operator* (int fScalar, const Matrix3& rkMatrix) {
return (double)fScalar * rkMatrix;
}
@@ -1680,8 +1675,6 @@ std::string Matrix3::toString() const {
elt[2][0], elt[2][1], elt[2][2]);
}
-
-
} // namespace
diff --git a/dep/src/g3dlite/Plane.cpp b/dep/src/g3dlite/Plane.cpp
index 10ee7ff0f0c..5ae60b0f762 100644
--- a/dep/src/g3dlite/Plane.cpp
+++ b/dep/src/g3dlite/Plane.cpp
@@ -60,7 +60,6 @@ Plane::Plane(
_distance = _normal.dot(point0.xyz());
}
-
Plane::Plane(
const Vector3& point0,
const Vector3& point1,
@@ -70,7 +69,6 @@ Plane::Plane(
_distance = _normal.dot(point0);
}
-
Plane::Plane(
const Vector3& __normal,
const Vector3& point) {
@@ -79,7 +77,6 @@ Plane::Plane(
_distance = _normal.dot(point);
}
-
Plane Plane::fromEquation(float a, float b, float c, float d) {
Vector3 n(a, b, c);
float magnitude = n.magnitude();
@@ -88,13 +85,11 @@ Plane Plane::fromEquation(float a, float b, float c, float d) {
return Plane(n, -d);
}
-
void Plane::flip() {
_normal = -_normal;
_distance = -_distance;
}
-
void Plane::getEquation(Vector3& n, float& d) const {
double _d;
getEquation(n, _d);
@@ -106,7 +101,6 @@ void Plane::getEquation(Vector3& n, double& d) const {
d = -_distance;
}
-
void Plane::getEquation(float& a, float& b, float& c, float& d) const {
double _a, _b, _c, _d;
getEquation(_a, _b, _c, _d);
@@ -123,7 +117,6 @@ void Plane::getEquation(double& a, double& b, double& c, double& d) const {
d = -_distance;
}
-
std::string Plane::toString() const {
return format("Plane(%g, %g, %g, %g)", _normal.x, _normal.y, _normal.z, _distance);
}
diff --git a/dep/src/g3dlite/System.cpp b/dep/src/g3dlite/System.cpp
index 88fd39b52ca..e55be13adc5 100644
--- a/dep/src/g3dlite/System.cpp
+++ b/dep/src/g3dlite/System.cpp
@@ -76,7 +76,6 @@ namespace G3D {
static char versionCstr[1024];
System::OutOfMemoryCallback System::outOfMemoryCallback = NULL;
-
void System::init() {
// Cannot use most G3D data structures or utility functions in here because
// they are not initialized.
@@ -102,21 +101,15 @@ void System::init() {
}
-
-
void System::memcpy(void* dst, const void* src, size_t numBytes) {
::memcpy(dst, src, numBytes);
}
-
void System::memset(void* dst, uint8 value, size_t numBytes) {
::memset(dst, value, numBytes);
}
-
-
-
////////////////////////////////////////////////////////////////
class BufferPool {
public:
@@ -231,7 +224,6 @@ private:
poolSize = 0;
}
-
/** Allocate out of a specific pool-> Return NULL if no suitable
memory was found.
@@ -292,7 +284,6 @@ public:
medPoolSize = 0;
-
// Initialize the tiny heap as a bunch of pointers into one
// pre-allocated buffer.
tinyHeap = ::malloc(maxTinyBuffers * tinyBufferSize);
@@ -308,7 +299,6 @@ public:
# endif
}
-
~BufferPool() {
::free(tinyHeap);
# ifdef G3D_WIN32
@@ -318,7 +308,6 @@ public:
# endif
}
-
void* realloc(void* ptr, size_t bytes) {
if (ptr == NULL) {
return malloc(bytes);
@@ -355,7 +344,6 @@ public:
}
}
-
void* malloc(size_t bytes) {
lock();
++totalMallocs;
@@ -414,7 +402,6 @@ public:
ptr = ::malloc(bytes + 4);
}
-
if (ptr == NULL) {
if ((System::outOfMemoryCallback != NULL) &&
(System::outOfMemoryCallback(bytes + 4, true) == true)) {
@@ -436,7 +423,6 @@ public:
return (uint8*)ptr + 4;
}
-
void free(void* ptr) {
if (ptr == NULL) {
// Free does nothing on null pointers
@@ -527,7 +513,6 @@ std::string System::mallocStatus() {
#endif
}
-
void System::resetMallocPerformanceCounters() {
#ifndef NO_BUFFERPOOL
bufferpool->totalMallocs = 0;
@@ -537,7 +522,6 @@ void System::resetMallocPerformanceCounters() {
#endif
}
-
#ifndef NO_BUFFERPOOL
inline void initMem() {
// Putting the test here ensures that the system is always
@@ -550,7 +534,6 @@ inline void initMem() {
}
#endif
-
void* System::malloc(size_t bytes) {
#ifndef NO_BUFFERPOOL
initMem();
@@ -570,7 +553,6 @@ void* System::calloc(size_t n, size_t x) {
#endif
}
-
void* System::realloc(void* block, size_t bytes) {
#ifndef NO_BUFFERPOOL
initMem();
@@ -580,7 +562,6 @@ void* System::realloc(void* block, size_t bytes) {
#endif
}
-
void System::free(void* p) {
#ifndef NO_BUFFERPOOL
bufferpool->free(p);
@@ -589,7 +570,6 @@ void System::free(void* p) {
#endif
}
-
void* System::alignedMalloc(size_t bytes, size_t alignment) {
alwaysAssertM(isPow2(alignment), "alignment must be a power of 2");
@@ -646,7 +626,6 @@ void* System::alignedMalloc(size_t bytes, size_t alignment) {
return (void*)alignedPtr;
}
-
void System::alignedFree(void* _ptr) {
if (_ptr == NULL) {
return;
@@ -666,6 +645,5 @@ void System::alignedFree(void* _ptr) {
System::free(truePtr);
}
-
} // namespace
diff --git a/dep/src/g3dlite/Triangle.cpp b/dep/src/g3dlite/Triangle.cpp
index bb5b8f94635..2e221b12f1d 100644
--- a/dep/src/g3dlite/Triangle.cpp
+++ b/dep/src/g3dlite/Triangle.cpp
@@ -17,7 +17,6 @@
namespace G3D {
-
void Triangle::init(const Vector3& v0, const Vector3& v1, const Vector3& v2) {
_plane = Plane(v0, v1, v2);
@@ -46,36 +45,29 @@ void Triangle::init(const Vector3& v0, const Vector3& v1, const Vector3& v2) {
}
-
Triangle::Triangle() {
init(Vector3::zero(), Vector3::zero(), Vector3::zero());
}
-
Triangle::Triangle(const Vector3& v0, const Vector3& v1, const Vector3& v2) {
init(v0, v1, v2);
}
-
Triangle::~Triangle() {
}
-
double Triangle::area() const {
return _area;
}
-
const Vector3& Triangle::normal() const {
return _plane.normal();
}
-
const Plane& Triangle::plane() const {
return _plane;
}
-
Vector3 Triangle::center() const {
return (_vertex[0] + _vertex[1] + _vertex[2]) / 3.0;
}
@@ -96,7 +88,6 @@ Vector3 Triangle::randomPoint() const {
return edge01 * s + edge02 * t + _vertex[0];
}
-
void Triangle::getBounds(AABox& out) const {
Vector3 lo = _vertex[0];
Vector3 hi = lo;
diff --git a/dep/src/g3dlite/Vector3.cpp b/dep/src/g3dlite/Vector3.cpp
index 09c3003888b..b0ca1990a3f 100644
--- a/dep/src/g3dlite/Vector3.cpp
+++ b/dep/src/g3dlite/Vector3.cpp
@@ -62,7 +62,6 @@ Vector3::Axis Vector3::primaryAxis() const {
return a;
}
-
unsigned int Vector3::hashCode() const {
unsigned int xhash = (*(int*)(void*)(&x));
unsigned int yhash = (*(int*)(void*)(&y));
@@ -75,21 +74,18 @@ std::ostream& operator<<(std::ostream& os, const Vector3& v) {
return os << v.toString();
}
-
//----------------------------------------------------------------------------
double frand() {
return rand() / (double) RAND_MAX;
}
-
Vector3::Vector3(const class Vector3int16& v) {
x = v.x;
y = v.y;
z = v.z;
}
-
Vector3 Vector3::random() {
Vector3 result;
@@ -298,7 +294,6 @@ std::string Vector3::toString() const {
return G3D::format("(%g, %g, %g)", x, y, z);
}
-
//----------------------------------------------------------------------------
Matrix3 Vector3::cross() const {
@@ -307,7 +302,6 @@ Matrix3 Vector3::cross() const {
-y, x, 0);
}
-
//----------------------------------------------------------------------------
// 2-char swizzles
@@ -437,8 +431,5 @@ Vector4 Vector3::zzzz() const { return Vector4 (z, z, z, z); }
-
-
-
} // namespace
diff --git a/dep/src/g3dlite/Vector4.cpp b/dep/src/g3dlite/Vector4.cpp
index 91f916d1040..b38e6f7cb57 100644
--- a/dep/src/g3dlite/Vector4.cpp
+++ b/dep/src/g3dlite/Vector4.cpp
@@ -35,7 +35,6 @@ Vector4::Vector4(const class Color4& c) {
}
#endif
-
Vector4::Vector4(const Vector2& v1, const Vector2& v2) {
x = v1.x;
y = v1.y;
@@ -43,7 +42,6 @@ Vector4::Vector4(const Vector2& v1, const Vector2& v2) {
w = v2.y;
}
-
Vector4::Vector4(const Vector2& v1, float fz, float fw) {
x = v1.x;
y = v1.y;
@@ -83,7 +81,6 @@ Vector4& Vector4::operator/= (float fScalar) {
return *this;
}
-
//----------------------------------------------------------------------------
std::string Vector4::toString() const {
@@ -434,6 +431,5 @@ Vector4 Vector4::ywww() const { return Vector4 (y, w, w, w); }
Vector4 Vector4::zwww() const { return Vector4 (z, w, w, w); }
Vector4 Vector4::wwww() const { return Vector4 (w, w, w, w); }
-
}; // namespace
diff --git a/dep/src/sockets/Base64.cpp b/dep/src/sockets/Base64.cpp
index cb66b93af6f..f7f12f5edff 100644
--- a/dep/src/sockets/Base64.cpp
+++ b/dep/src/sockets/Base64.cpp
@@ -33,7 +33,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace SOCKETS_NAMESPACE {
#endif
-
const char *Base64::bstr =
"ABCDEFGHIJKLMNOPQ"
"RSTUVWXYZabcdefgh"
@@ -50,12 +49,10 @@ const char Base64::rstr[] = {
0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0};
-
Base64::Base64()
{
}
-
void Base64::encode(FILE *fil, std::string& output, bool add_crlf)
{
size_t remain;
@@ -94,13 +91,11 @@ void Base64::encode(FILE *fil, std::string& output, bool add_crlf)
}
}
-
void Base64::encode(const std::string& str_in, std::string& str_out, bool add_crlf)
{
encode(str_in.c_str(), str_in.size(), str_out, add_crlf);
}
-
void Base64::encode(const char* input,size_t l,std::string& output, bool add_crlf)
{
size_t i = 0;
@@ -136,7 +131,6 @@ void Base64::encode(const char* input,size_t l,std::string& output, bool add_crl
}
}
-
void Base64::encode(const unsigned char* input,size_t l,std::string& output,bool add_crlf)
{
size_t i = 0;
@@ -172,7 +166,6 @@ void Base64::encode(const unsigned char* input,size_t l,std::string& output,bool
}
}
-
void Base64::decode(const std::string& input,std::string& output)
{
size_t i = 0;
@@ -205,7 +198,6 @@ void Base64::decode(const std::string& input,std::string& output)
}
}
-
void Base64::decode(const std::string& input, unsigned char *output, size_t& sz)
{
size_t i = 0;
@@ -251,7 +243,6 @@ void Base64::decode(const std::string& input, unsigned char *output, size_t& sz)
sz = j;
}
-
size_t Base64::decode_length(const std::string& str64)
{
if (str64.empty() || str64.size() % 4)
@@ -264,10 +255,8 @@ size_t Base64::decode_length(const std::string& str64)
return l;
}
-
#ifdef SOCKETS_NAMESPACE
}
#endif
-
diff --git a/dep/src/sockets/Exception.cpp b/dep/src/sockets/Exception.cpp
index 33a7b4a133c..4d79aeef813 100644
--- a/dep/src/sockets/Exception.cpp
+++ b/dep/src/sockets/Exception.cpp
@@ -29,19 +29,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace SOCKETS_NAMESPACE {
#endif
-
-
Exception::Exception(const std::string& description) : m_description(description)
{
}
-
const std::string Exception::ToString() const
{
return m_description;
}
-
#ifdef SOCKETS_NAMESPACE
} // namespace SOCKETS_NAMESPACE {
#endif
diff --git a/dep/src/sockets/Ipv4Address.cpp b/dep/src/sockets/Ipv4Address.cpp
index b89cc2a449b..03935038951 100644
--- a/dep/src/sockets/Ipv4Address.cpp
+++ b/dep/src/sockets/Ipv4Address.cpp
@@ -27,13 +27,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <netdb.h>
#endif
-
#ifdef SOCKETS_NAMESPACE
namespace SOCKETS_NAMESPACE {
#endif
-
-
Ipv4Address::Ipv4Address(port_t port) : m_valid(true)
{
memset(&m_addr, 0, sizeof(m_addr));
@@ -41,7 +38,6 @@ Ipv4Address::Ipv4Address(port_t port) : m_valid(true)
m_addr.sin_port = htons( port );
}
-
Ipv4Address::Ipv4Address(ipaddr_t a,port_t port) : m_valid(true)
{
memset(&m_addr, 0, sizeof(m_addr));
@@ -50,7 +46,6 @@ Ipv4Address::Ipv4Address(ipaddr_t a,port_t port) : m_valid(true)
memcpy(&m_addr.sin_addr, &a, sizeof(struct in_addr));
}
-
Ipv4Address::Ipv4Address(struct in_addr& a,port_t port) : m_valid(true)
{
memset(&m_addr, 0, sizeof(m_addr));
@@ -59,7 +54,6 @@ Ipv4Address::Ipv4Address(struct in_addr& a,port_t port) : m_valid(true)
m_addr.sin_addr = a;
}
-
Ipv4Address::Ipv4Address(const std::string& host,port_t port) : m_valid(false)
{
memset(&m_addr, 0, sizeof(m_addr));
@@ -75,43 +69,36 @@ Ipv4Address::Ipv4Address(const std::string& host,port_t port) : m_valid(false)
}
}
-
Ipv4Address::Ipv4Address(struct sockaddr_in& sa)
{
m_addr = sa;
m_valid = sa.sin_family == AF_INET;
}
-
Ipv4Address::~Ipv4Address()
{
}
-
Ipv4Address::operator struct sockaddr *()
{
return (struct sockaddr *)&m_addr;
}
-
Ipv4Address::operator socklen_t()
{
return sizeof(struct sockaddr_in);
}
-
void Ipv4Address::SetPort(port_t port)
{
m_addr.sin_port = htons( port );
}
-
port_t Ipv4Address::GetPort()
{
return ntohs( m_addr.sin_port );
}
-
bool Ipv4Address::Resolve(const std::string& hostname,struct in_addr& a)
{
struct sockaddr_in sa;
@@ -129,7 +116,6 @@ bool Ipv4Address::Resolve(const std::string& hostname,struct in_addr& a)
return true;
}
-
bool Ipv4Address::Reverse(struct in_addr& a,std::string& name)
{
struct sockaddr_in sa;
@@ -139,7 +125,6 @@ bool Ipv4Address::Reverse(struct in_addr& a,std::string& name)
return Utility::reverse((struct sockaddr *)&sa, sizeof(sa), name);
}
-
std::string Ipv4Address::Convert(bool include_port)
{
if (include_port)
@@ -147,7 +132,6 @@ std::string Ipv4Address::Convert(bool include_port)
return Convert(m_addr.sin_addr);
}
-
std::string Ipv4Address::Convert(struct in_addr& a)
{
struct sockaddr_in sa;
@@ -159,25 +143,21 @@ std::string Ipv4Address::Convert(struct in_addr& a)
return name;
}
-
void Ipv4Address::SetAddress(struct sockaddr *sa)
{
memcpy(&m_addr, sa, sizeof(struct sockaddr_in));
}
-
int Ipv4Address::GetFamily()
{
return m_addr.sin_family;
}
-
bool Ipv4Address::IsValid()
{
return m_valid;
}
-
bool Ipv4Address::operator==(SocketAddress& a)
{
if (a.GetFamily() != GetFamily())
@@ -193,13 +173,11 @@ bool Ipv4Address::operator==(SocketAddress& a)
return true;
}
-
std::auto_ptr<SocketAddress> Ipv4Address::GetCopy()
{
return std::auto_ptr<SocketAddress>(new Ipv4Address(m_addr));
}
-
std::string Ipv4Address::Reverse()
{
std::string tmp;
@@ -207,7 +185,6 @@ std::string Ipv4Address::Reverse()
return tmp;
}
-
#ifdef SOCKETS_NAMESPACE
} // namespace SOCKETS_NAMESPACE {
#endif
diff --git a/dep/src/sockets/Ipv6Address.cpp b/dep/src/sockets/Ipv6Address.cpp
index 6c92de24871..3208b5098fa 100644
--- a/dep/src/sockets/Ipv6Address.cpp
+++ b/dep/src/sockets/Ipv6Address.cpp
@@ -34,7 +34,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace SOCKETS_NAMESPACE {
#endif
-
Ipv6Address::Ipv6Address(port_t port) : m_valid(true)
{
memset(&m_addr, 0, sizeof(m_addr));
@@ -42,7 +41,6 @@ Ipv6Address::Ipv6Address(port_t port) : m_valid(true)
m_addr.sin6_port = htons( port );
}
-
Ipv6Address::Ipv6Address(struct in6_addr& a,port_t port) : m_valid(true)
{
memset(&m_addr, 0, sizeof(m_addr));
@@ -51,7 +49,6 @@ Ipv6Address::Ipv6Address(struct in6_addr& a,port_t port) : m_valid(true)
m_addr.sin6_addr = a;
}
-
Ipv6Address::Ipv6Address(const std::string& host,port_t port) : m_valid(false)
{
memset(&m_addr, 0, sizeof(m_addr));
@@ -67,43 +64,36 @@ Ipv6Address::Ipv6Address(const std::string& host,port_t port) : m_valid(false)
}
}
-
Ipv6Address::Ipv6Address(struct sockaddr_in6& sa)
{
m_addr = sa;
m_valid = sa.sin6_family == AF_INET6;
}
-
Ipv6Address::~Ipv6Address()
{
}
-
Ipv6Address::operator struct sockaddr *()
{
return (struct sockaddr *)&m_addr;
}
-
Ipv6Address::operator socklen_t()
{
return sizeof(struct sockaddr_in6);
}
-
void Ipv6Address::SetPort(port_t port)
{
m_addr.sin6_port = htons( port );
}
-
port_t Ipv6Address::GetPort()
{
return ntohs( m_addr.sin6_port );
}
-
bool Ipv6Address::Resolve(const std::string& hostname,struct in6_addr& a)
{
struct sockaddr_in6 sa;
@@ -121,7 +111,6 @@ bool Ipv6Address::Resolve(const std::string& hostname,struct in6_addr& a)
return true;
}
-
bool Ipv6Address::Reverse(struct in6_addr& a,std::string& name)
{
struct sockaddr_in6 sa;
@@ -131,7 +120,6 @@ bool Ipv6Address::Reverse(struct in6_addr& a,std::string& name)
return Utility::reverse((struct sockaddr *)&sa, sizeof(sa), name);
}
-
std::string Ipv6Address::Convert(bool include_port)
{
if (include_port)
@@ -139,7 +127,6 @@ std::string Ipv6Address::Convert(bool include_port)
return Convert(m_addr.sin6_addr);
}
-
std::string Ipv6Address::Convert(struct in6_addr& a,bool mixed)
{
char slask[100]; // l2ip temporary
@@ -187,51 +174,43 @@ std::string Ipv6Address::Convert(struct in6_addr& a,bool mixed)
return slask;
}
-
void Ipv6Address::SetAddress(struct sockaddr *sa)
{
memcpy(&m_addr, sa, sizeof(struct sockaddr_in6));
}
-
int Ipv6Address::GetFamily()
{
return m_addr.sin6_family;
}
-
void Ipv6Address::SetFlowinfo(uint32_t x)
{
m_addr.sin6_flowinfo = x;
}
-
uint32_t Ipv6Address::GetFlowinfo()
{
return m_addr.sin6_flowinfo;
}
-
#ifndef _WIN32
void Ipv6Address::SetScopeId(uint32_t x)
{
m_addr.sin6_scope_id = x;
}
-
uint32_t Ipv6Address::GetScopeId()
{
return m_addr.sin6_scope_id;
}
#endif
-
bool Ipv6Address::IsValid()
{
return m_valid;
}
-
bool Ipv6Address::operator==(SocketAddress& a)
{
if (a.GetFamily() != GetFamily())
@@ -247,13 +226,11 @@ bool Ipv6Address::operator==(SocketAddress& a)
return true;
}
-
std::auto_ptr<SocketAddress> Ipv6Address::GetCopy()
{
return std::auto_ptr<SocketAddress>(new Ipv6Address(m_addr));
}
-
std::string Ipv6Address::Reverse()
{
std::string tmp;
@@ -261,7 +238,6 @@ std::string Ipv6Address::Reverse()
return tmp;
}
-
#ifdef SOCKETS_NAMESPACE
} // namespace SOCKETS_NAMESPACE {
#endif
diff --git a/dep/src/sockets/Lock.cpp b/dep/src/sockets/Lock.cpp
index 597ca30afc6..b75664cfbdc 100644
--- a/dep/src/sockets/Lock.cpp
+++ b/dep/src/sockets/Lock.cpp
@@ -34,21 +34,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace SOCKETS_NAMESPACE {
#endif
-
Lock::Lock(Mutex& m) : m_mutex(m)
{
m_mutex.Lock();
}
-
Lock::~Lock()
{
m_mutex.Unlock();
}
-
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/src/sockets/Mutex.cpp b/dep/src/sockets/Mutex.cpp
index 3bfe64d04c7..681e85cee5b 100644
--- a/dep/src/sockets/Mutex.cpp
+++ b/dep/src/sockets/Mutex.cpp
@@ -33,7 +33,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace SOCKETS_NAMESPACE {
#endif
-
Mutex::Mutex()
{
#ifdef _WIN32
@@ -43,7 +42,6 @@ Mutex::Mutex()
#endif
}
-
Mutex::~Mutex()
{
#ifdef _WIN32
@@ -53,7 +51,6 @@ Mutex::~Mutex()
#endif
}
-
void Mutex::Lock()
{
#ifdef _WIN32
@@ -64,7 +61,6 @@ void Mutex::Lock()
#endif
}
-
void Mutex::Unlock()
{
#ifdef _WIN32
@@ -74,7 +70,6 @@ void Mutex::Unlock()
#endif
}
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/src/sockets/Parse.cpp b/dep/src/sockets/Parse.cpp
index ccbd553b0e6..2967859f23d 100644
--- a/dep/src/sockets/Parse.cpp
+++ b/dep/src/sockets/Parse.cpp
@@ -33,12 +33,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "Parse.h"
-
#ifdef SOCKETS_NAMESPACE
namespace SOCKETS_NAMESPACE {
#endif
-
/* implementation of class Parse */
Parse::Parse()
@@ -93,7 +91,6 @@ Parse::Parse(const std::string&s,const std::string&sp,short /*nospace*/)
{
}
-
Parse::~Parse()
{
}
@@ -319,4 +316,3 @@ void Parse::getline(std::string&s)
#endif
-
diff --git a/dep/src/sockets/ResolvServer.cpp b/dep/src/sockets/ResolvServer.cpp
index 492d6705080..3c8a7de6bc0 100644
--- a/dep/src/sockets/ResolvServer.cpp
+++ b/dep/src/sockets/ResolvServer.cpp
@@ -41,7 +41,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace SOCKETS_NAMESPACE {
#endif
-
ResolvServer::ResolvServer(port_t port)
:Thread()
,m_quit(false)
@@ -50,12 +49,10 @@ ResolvServer::ResolvServer(port_t port)
{
}
-
ResolvServer::~ResolvServer()
{
}
-
void ResolvServer::Run()
{
// StdoutLog log;
@@ -76,19 +73,16 @@ void ResolvServer::Run()
SetRunning(false);
}
-
void ResolvServer::Quit()
{
m_quit = true;
}
-
bool ResolvServer::Ready()
{
return m_ready;
}
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/src/sockets/ResolvSocket.cpp b/dep/src/sockets/ResolvSocket.cpp
index 236e93f9704..636de276426 100644
--- a/dep/src/sockets/ResolvSocket.cpp
+++ b/dep/src/sockets/ResolvSocket.cpp
@@ -53,13 +53,11 @@ namespace SOCKETS_NAMESPACE {
#define DEB(x)
//#endif
-
// static
ResolvSocket::cache_t ResolvSocket::m_cache;
ResolvSocket::timeout_t ResolvSocket::m_cache_to;
Mutex ResolvSocket::m_cache_mutex;
-
ResolvSocket::ResolvSocket(ISocketHandler& h)
:TcpSocket(h)
,m_bServer(false)
@@ -72,7 +70,6 @@ ResolvSocket::ResolvSocket(ISocketHandler& h)
SetLineProtocol();
}
-
ResolvSocket::ResolvSocket(ISocketHandler& h, Socket *parent, const std::string& host, port_t port, bool ipv6)
:TcpSocket(h)
,m_bServer(false)
@@ -87,7 +84,6 @@ ResolvSocket::ResolvSocket(ISocketHandler& h, Socket *parent, const std::string&
SetLineProtocol();
}
-
ResolvSocket::ResolvSocket(ISocketHandler& h, Socket *parent, ipaddr_t a)
:TcpSocket(h)
,m_bServer(false)
@@ -102,7 +98,6 @@ ResolvSocket::ResolvSocket(ISocketHandler& h, Socket *parent, ipaddr_t a)
SetLineProtocol();
}
-
#ifdef ENABLE_IPV6
ResolvSocket::ResolvSocket(ISocketHandler& h, Socket *parent, in6_addr& a)
:TcpSocket(h)
@@ -117,12 +112,10 @@ ResolvSocket::ResolvSocket(ISocketHandler& h, Socket *parent, in6_addr& a)
}
#endif
-
ResolvSocket::~ResolvSocket()
{
}
-
void ResolvSocket::OnLine(const std::string& line)
{
Parse pa(line, ":");
@@ -268,7 +261,6 @@ DEB(fprintf(stderr, " *** Update cache for [%s][%s] = '%s'\n", m_query.c_str(),
#endif
}
-
void ResolvSocket::OnDetached()
{
DEB( fprintf(stderr, " *** ResolvSocket::OnDetached(); query=%s, data=%s\n", m_query.c_str(), m_data.c_str());)
@@ -370,7 +362,6 @@ DEB( fprintf(stderr, " *** ResolvSocket::OnDetached(); query=%s, data=%s\n",
SetCloseAndDelete();
}
-
void ResolvSocket::OnConnect()
{
if (!m_resolv_host.empty())
@@ -405,7 +396,6 @@ void ResolvSocket::OnConnect()
Send( msg );
}
-
void ResolvSocket::OnDelete()
{
if (m_parent)
@@ -427,7 +417,6 @@ DEB(fprintf(stderr, " *** Update cache for [%s][%s] = '%s'\n", m_query.c_str(),
}
}
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/src/sockets/Socket.cpp b/dep/src/sockets/Socket.cpp
index bf1a73abf6e..f53cd27621e 100644
--- a/dep/src/sockets/Socket.cpp
+++ b/dep/src/sockets/Socket.cpp
@@ -60,13 +60,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace SOCKETS_NAMESPACE {
#endif
-
// statics
#ifdef _WIN32
WSAInitializer Socket::m_winsock_init;
#endif
-
Socket::Socket(ISocketHandler& h)
//:m_flags(0)
:m_handler(h)
@@ -111,7 +109,6 @@ Socket::Socket(ISocketHandler& h)
{
}
-
Socket::~Socket()
{
Handler().Remove(this);
@@ -125,22 +122,18 @@ Socket::~Socket()
}
}
-
void Socket::Init()
{
}
-
void Socket::OnRead()
{
}
-
void Socket::OnWrite()
{
}
-
void Socket::OnException()
{
// %! exception doesn't always mean something bad happened, this code should be reworked
@@ -150,22 +143,18 @@ void Socket::OnException()
SetCloseAndDelete();
}
-
void Socket::OnDelete()
{
}
-
void Socket::OnConnect()
{
}
-
void Socket::OnAccept()
{
}
-
int Socket::Close()
{
if (m_socket == INVALID_SOCKET) // this could happen
@@ -191,7 +180,6 @@ int Socket::Close()
return n;
}
-
SOCKET Socket::CreateSocket(int af,int type, const std::string& protocol)
{
struct protoent *p = NULL;
@@ -232,31 +220,26 @@ SOCKET Socket::CreateSocket(int af,int type, const std::string& protocol)
return s;
}
-
void Socket::Attach(SOCKET s)
{
m_socket = s;
}
-
SOCKET Socket::GetSocket()
{
return m_socket;
}
-
void Socket::SetDeleteByHandler(bool x)
{
m_bDel = x;
}
-
bool Socket::DeleteByHandler()
{
return m_bDel;
}
-
void Socket::SetCloseAndDelete(bool x)
{
if (x != m_bClose)
@@ -270,25 +253,21 @@ void Socket::SetCloseAndDelete(bool x)
}
}
-
bool Socket::CloseAndDelete()
{
return m_bClose;
}
-
void Socket::SetRemoteAddress(SocketAddress& ad) //struct sockaddr* sa, socklen_t l)
{
m_remote_address = ad.GetCopy();
}
-
std::auto_ptr<SocketAddress> Socket::GetRemoteSocketAddress()
{
return m_remote_address -> GetCopy();
}
-
ISocketHandler& Socket::Handler() const
{
#ifdef ENABLE_DETACH
@@ -298,13 +277,11 @@ ISocketHandler& Socket::Handler() const
return m_handler;
}
-
ISocketHandler& Socket::MasterHandler() const
{
return m_handler;
}
-
ipaddr_t Socket::GetRemoteIP4()
{
ipaddr_t l = 0;
@@ -323,7 +300,6 @@ ipaddr_t Socket::GetRemoteIP4()
return l;
}
-
#ifdef ENABLE_IPV6
#ifdef IPPROTO_IPV6
struct in6_addr Socket::GetRemoteIP6()
@@ -347,7 +323,6 @@ struct in6_addr Socket::GetRemoteIP6()
#endif
#endif
-
port_t Socket::GetRemotePort()
{
if (!m_remote_address.get())
@@ -357,7 +332,6 @@ port_t Socket::GetRemotePort()
return m_remote_address -> GetPort();
}
-
std::string Socket::GetRemoteAddress()
{
if (!m_remote_address.get())
@@ -367,7 +341,6 @@ std::string Socket::GetRemoteAddress()
return m_remote_address -> Convert(false);
}
-
std::string Socket::GetRemoteHostname()
{
if (!m_remote_address.get())
@@ -377,7 +350,6 @@ std::string Socket::GetRemoteHostname()
return m_remote_address -> Reverse();
}
-
bool Socket::SetNonblocking(bool bNb)
{
#ifdef _WIN32
@@ -410,7 +382,6 @@ bool Socket::SetNonblocking(bool bNb)
#endif
}
-
bool Socket::SetNonblocking(bool bNb, SOCKET s)
{
#ifdef _WIN32
@@ -443,13 +414,11 @@ bool Socket::SetNonblocking(bool bNb, SOCKET s)
#endif
}
-
void Socket::Set(bool bRead, bool bWrite, bool bException)
{
Handler().Set(m_socket, bRead, bWrite, bException);
}
-
bool Socket::Ready()
{
if (m_socket != INVALID_SOCKET && !CloseAndDelete())
@@ -457,138 +426,115 @@ bool Socket::Ready()
return false;
}
-
void Socket::OnLine(const std::string& )
{
}
-
void Socket::OnConnectFailed()
{
}
-
Socket *Socket::GetParent()
{
return m_parent;
}
-
void Socket::SetParent(Socket *x)
{
m_parent = x;
}
-
port_t Socket::GetPort()
{
Handler().LogError(this, "GetPort", 0, "GetPort only implemented for ListenSocket", LOG_LEVEL_WARNING);
return 0;
}
-
bool Socket::OnConnectRetry()
{
return true;
}
-
#ifdef ENABLE_RECONNECT
void Socket::OnReconnect()
{
}
#endif
-
time_t Socket::Uptime()
{
return time(NULL) - m_tCreate;
}
-
#ifdef ENABLE_IPV6
void Socket::SetIpv6(bool x)
{
m_ipv6 = x;
}
-
bool Socket::IsIpv6()
{
return m_ipv6;
}
#endif
-
void Socket::DisableRead(bool x)
{
m_b_disable_read = x;
}
-
bool Socket::IsDisableRead()
{
return m_b_disable_read;
}
-
void Socket::SendBuf(const char *,size_t,int)
{
}
-
void Socket::Send(const std::string&,int)
{
}
-
void Socket::SetConnected(bool x)
{
m_connected = x;
}
-
bool Socket::IsConnected()
{
return m_connected;
}
-
void Socket::OnDisconnect()
{
}
-
void Socket::SetLost()
{
m_bLost = true;
}
-
bool Socket::Lost()
{
return m_bLost;
}
-
void Socket::SetErasedByHandler(bool x)
{
m_b_erased_by_handler = x;
}
-
bool Socket::ErasedByHandler()
{
return m_b_erased_by_handler;
}
-
time_t Socket::TimeSinceClose()
{
return time(NULL) - m_tClose;
}
-
void Socket::SetClientRemoteAddress(SocketAddress& ad)
{
if (!ad.IsValid())
@@ -598,7 +544,6 @@ void Socket::SetClientRemoteAddress(SocketAddress& ad)
m_client_remote_address = ad.GetCopy();
}
-
std::auto_ptr<SocketAddress> Socket::GetClientRemoteAddress()
{
if (!m_client_remote_address.get())
@@ -608,83 +553,69 @@ std::auto_ptr<SocketAddress> Socket::GetClientRemoteAddress()
return m_client_remote_address -> GetCopy();
}
-
uint64_t Socket::GetBytesSent(bool)
{
return 0;
}
-
uint64_t Socket::GetBytesReceived(bool)
{
return 0;
}
-
#ifdef HAVE_OPENSSL
void Socket::OnSSLConnect()
{
}
-
void Socket::OnSSLAccept()
{
}
-
bool Socket::SSLNegotiate()
{
return false;
}
-
bool Socket::IsSSL()
{
return m_b_enable_ssl;
}
-
void Socket::EnableSSL(bool x)
{
m_b_enable_ssl = x;
}
-
bool Socket::IsSSLNegotiate()
{
return m_b_ssl;
}
-
void Socket::SetSSLNegotiate(bool x)
{
m_b_ssl = x;
}
-
bool Socket::IsSSLServer()
{
return m_b_ssl_server;
}
-
void Socket::SetSSLServer(bool x)
{
m_b_ssl_server = x;
}
-
void Socket::OnSSLConnectFailed()
{
}
-
void Socket::OnSSLAcceptFailed()
{
}
#endif // HAVE_OPENSSL
-
#ifdef ENABLE_POOL
void Socket::CopyConnection(Socket *sock)
{
@@ -699,127 +630,106 @@ void Socket::CopyConnection(Socket *sock)
SetRemoteAddress( *sock -> GetRemoteSocketAddress() );
}
-
void Socket::SetIsClient()
{
m_bClient = true;
}
-
void Socket::SetSocketType(int x)
{
m_socket_type = x;
}
-
int Socket::GetSocketType()
{
return m_socket_type;
}
-
void Socket::SetSocketProtocol(const std::string& x)
{
m_socket_protocol = x;
}
-
const std::string& Socket::GetSocketProtocol()
{
return m_socket_protocol;
}
-
void Socket::SetRetain()
{
if (m_bClient) m_bRetain = true;
}
-
bool Socket::Retain()
{
return m_bRetain;
}
-
#endif // ENABLE_POOL
-
#ifdef ENABLE_SOCKS4
void Socket::OnSocks4Connect()
{
Handler().LogError(this, "OnSocks4Connect", 0, "Use with TcpSocket only");
}
-
void Socket::OnSocks4ConnectFailed()
{
Handler().LogError(this, "OnSocks4ConnectFailed", 0, "Use with TcpSocket only");
}
-
bool Socket::OnSocks4Read()
{
Handler().LogError(this, "OnSocks4Read", 0, "Use with TcpSocket only");
return true;
}
-
void Socket::SetSocks4Host(const std::string& host)
{
Utility::u2ip(host, m_socks4_host);
}
-
bool Socket::Socks4()
{
return m_bSocks4;
}
-
void Socket::SetSocks4(bool x)
{
m_bSocks4 = x;
}
-
void Socket::SetSocks4Host(ipaddr_t a)
{
m_socks4_host = a;
}
-
void Socket::SetSocks4Port(port_t p)
{
m_socks4_port = p;
}
-
void Socket::SetSocks4Userid(const std::string& x)
{
m_socks4_userid = x;
}
-
ipaddr_t Socket::GetSocks4Host()
{
return m_socks4_host;
}
-
port_t Socket::GetSocks4Port()
{
return m_socks4_port;
}
-
const std::string& Socket::GetSocks4Userid()
{
return m_socks4_userid;
}
#endif // ENABLE_SOCKS4
-
#ifdef ENABLE_DETACH
bool Socket::Detach()
{
@@ -833,7 +743,6 @@ bool Socket::Detach()
return true;
}
-
void Socket::DetachSocket()
{
SetDetached();
@@ -841,43 +750,36 @@ void Socket::DetachSocket()
m_pThread -> SetRelease(true);
}
-
void Socket::OnDetached()
{
}
-
void Socket::SetDetach(bool x)
{
Handler().AddList(m_socket, LIST_DETACH, x);
m_detach = x;
}
-
bool Socket::IsDetach()
{
return m_detach;
}
-
void Socket::SetDetached(bool x)
{
m_detached = x;
}
-
const bool Socket::IsDetached() const
{
return m_detached;
}
-
void Socket::SetSlaveHandler(ISocketHandler *p)
{
m_slave_handler = p;
}
-
Socket::SocketThread::SocketThread(Socket *p)
:Thread(false)
,m_socket(p)
@@ -885,7 +787,6 @@ Socket::SocketThread::SocketThread(Socket *p)
// Creator will release
}
-
Socket::SocketThread::~SocketThread()
{
if (IsRunning())
@@ -900,7 +801,6 @@ Socket::SocketThread::~SocketThread()
}
}
-
void Socket::SocketThread::Run()
{
SocketHandler h;
@@ -919,14 +819,12 @@ void Socket::SocketThread::Run()
}
#endif // ENABLE_DETACH
-
#ifdef ENABLE_RESOLVER
int Socket::Resolve(const std::string& host,port_t port)
{
return Handler().Resolve(this, host, port);
}
-
#ifdef ENABLE_IPV6
int Socket::Resolve6(const std::string& host,port_t port)
{
@@ -934,13 +832,11 @@ int Socket::Resolve6(const std::string& host,port_t port)
}
#endif
-
int Socket::Resolve(ipaddr_t a)
{
return Handler().Resolve(this, a);
}
-
#ifdef ENABLE_IPV6
int Socket::Resolve(in6_addr& a)
{
@@ -948,33 +844,27 @@ int Socket::Resolve(in6_addr& a)
}
#endif
-
void Socket::OnResolved(int,ipaddr_t,port_t)
{
}
-
#ifdef ENABLE_IPV6
void Socket::OnResolved(int,in6_addr&,port_t)
{
}
#endif
-
void Socket::OnReverseResolved(int,const std::string&)
{
}
-
void Socket::OnResolveFailed(int)
{
}
#endif // ENABLE_RESOLVER
-
/* IP options */
-
bool Socket::SetIpOptions(const void *p, socklen_t len)
{
#ifdef IP_OPTIONS
@@ -990,7 +880,6 @@ bool Socket::SetIpOptions(const void *p, socklen_t len)
#endif
}
-
#ifdef IP_PKTINFO
bool Socket::SetIpPktinfo(bool x)
{
@@ -1004,7 +893,6 @@ bool Socket::SetIpPktinfo(bool x)
}
#endif
-
#ifdef IP_RECVTOS
bool Socket::SetIpRecvTOS(bool x)
{
@@ -1018,7 +906,6 @@ bool Socket::SetIpRecvTOS(bool x)
}
#endif
-
#ifdef IP_RECVTTL
bool Socket::SetIpRecvTTL(bool x)
{
@@ -1032,7 +919,6 @@ bool Socket::SetIpRecvTTL(bool x)
}
#endif
-
#ifdef IP_RECVOPTS
bool Socket::SetIpRecvopts(bool x)
{
@@ -1046,7 +932,6 @@ bool Socket::SetIpRecvopts(bool x)
}
#endif
-
#ifdef IP_RETOPTS
bool Socket::SetIpRetopts(bool x)
{
@@ -1060,7 +945,6 @@ bool Socket::SetIpRetopts(bool x)
}
#endif
-
bool Socket::SetIpTOS(unsigned char tos)
{
#ifdef IP_TOS
@@ -1076,7 +960,6 @@ bool Socket::SetIpTOS(unsigned char tos)
#endif
}
-
unsigned char Socket::IpTOS()
{
unsigned char tos = 0;
@@ -1092,7 +975,6 @@ unsigned char Socket::IpTOS()
return tos;
}
-
bool Socket::SetIpTTL(int ttl)
{
#ifdef IP_TTL
@@ -1108,7 +990,6 @@ bool Socket::SetIpTTL(int ttl)
#endif
}
-
int Socket::IpTTL()
{
int ttl = 0;
@@ -1124,7 +1005,6 @@ int Socket::IpTTL()
return ttl;
}
-
bool Socket::SetIpHdrincl(bool x)
{
#ifdef IP_HDRINCL
@@ -1141,7 +1021,6 @@ bool Socket::SetIpHdrincl(bool x)
#endif
}
-
#ifdef IP_RECVERR
bool Socket::SetIpRecverr(bool x)
{
@@ -1155,7 +1034,6 @@ bool Socket::SetIpRecverr(bool x)
}
#endif
-
#ifdef IP_MTU_DISCOVER
bool Socket::SetIpMtudiscover(bool x)
{
@@ -1169,7 +1047,6 @@ bool Socket::SetIpMtudiscover(bool x)
}
#endif
-
#ifdef IP_MTU
int Socket::IpMtu()
{
@@ -1183,7 +1060,6 @@ int Socket::IpMtu()
}
#endif
-
#ifdef IP_ROUTER_ALERT
bool Socket::SetIpRouterAlert(bool x)
{
@@ -1197,7 +1073,6 @@ bool Socket::SetIpRouterAlert(bool x)
}
#endif
-
bool Socket::SetIpMulticastTTL(int ttl)
{
#ifdef IP_MULTICAST_TTL
@@ -1213,7 +1088,6 @@ bool Socket::SetIpMulticastTTL(int ttl)
#endif
}
-
int Socket::IpMulticastTTL()
{
int ttl = 0;
@@ -1229,7 +1103,6 @@ int Socket::IpMulticastTTL()
return ttl;
}
-
bool Socket::SetMulticastLoop(bool x)
{
#ifdef IP_MULTICAST_LOOP
@@ -1246,7 +1119,6 @@ bool Socket::SetMulticastLoop(bool x)
#endif
}
-
#ifdef LINUX
bool Socket::IpAddMembership(struct ip_mreqn& ref)
{
@@ -1264,7 +1136,6 @@ bool Socket::IpAddMembership(struct ip_mreqn& ref)
}
#endif
-
bool Socket::IpAddMembership(struct ip_mreq& ref)
{
#ifdef IP_ADD_MEMBERSHIP
@@ -1280,7 +1151,6 @@ bool Socket::IpAddMembership(struct ip_mreq& ref)
#endif
}
-
#ifdef LINUX
bool Socket::IpDropMembership(struct ip_mreqn& ref)
{
@@ -1298,7 +1168,6 @@ bool Socket::IpDropMembership(struct ip_mreqn& ref)
}
#endif
-
bool Socket::IpDropMembership(struct ip_mreq& ref)
{
#ifdef IP_DROP_MEMBERSHIP
@@ -1314,10 +1183,8 @@ bool Socket::IpDropMembership(struct ip_mreq& ref)
#endif
}
-
/* SOCKET options */
-
bool Socket::SetSoReuseaddr(bool x)
{
#ifdef SO_REUSEADDR
@@ -1334,7 +1201,6 @@ bool Socket::SetSoReuseaddr(bool x)
#endif
}
-
bool Socket::SetSoKeepalive(bool x)
{
#ifdef SO_KEEPALIVE
@@ -1351,7 +1217,6 @@ bool Socket::SetSoKeepalive(bool x)
#endif
}
-
#ifdef SO_NOSIGPIPE
bool Socket::SetSoNosigpipe(bool x)
{
@@ -1365,7 +1230,6 @@ bool Socket::SetSoNosigpipe(bool x)
}
#endif
-
bool Socket::SoAcceptconn()
{
int value = 0;
@@ -1381,7 +1245,6 @@ bool Socket::SoAcceptconn()
return value ? true : false;
}
-
#ifdef SO_BSDCOMPAT
bool Socket::SetSoBsdcompat(bool x)
{
@@ -1395,7 +1258,6 @@ bool Socket::SetSoBsdcompat(bool x)
}
#endif
-
#ifdef SO_BINDTODEVICE
bool Socket::SetSoBindtodevice(const std::string& intf)
{
@@ -1408,7 +1270,6 @@ bool Socket::SetSoBindtodevice(const std::string& intf)
}
#endif
-
bool Socket::SetSoBroadcast(bool x)
{
#ifdef SO_BROADCAST
@@ -1425,7 +1286,6 @@ bool Socket::SetSoBroadcast(bool x)
#endif
}
-
bool Socket::SetSoDebug(bool x)
{
#ifdef SO_DEBUG
@@ -1442,7 +1302,6 @@ bool Socket::SetSoDebug(bool x)
#endif
}
-
int Socket::SoError()
{
int value = 0;
@@ -1458,7 +1317,6 @@ int Socket::SoError()
return value;
}
-
bool Socket::SetSoDontroute(bool x)
{
#ifdef SO_DONTROUTE
@@ -1475,7 +1333,6 @@ bool Socket::SetSoDontroute(bool x)
#endif
}
-
bool Socket::SetSoLinger(int onoff, int linger)
{
#ifdef SO_LINGER
@@ -1494,7 +1351,6 @@ bool Socket::SetSoLinger(int onoff, int linger)
#endif
}
-
bool Socket::SetSoOobinline(bool x)
{
#ifdef SO_OOBINLINE
@@ -1511,7 +1367,6 @@ bool Socket::SetSoOobinline(bool x)
#endif
}
-
#ifdef SO_PASSCRED
bool Socket::SetSoPasscred(bool x)
{
@@ -1525,7 +1380,6 @@ bool Socket::SetSoPasscred(bool x)
}
#endif
-
#ifdef SO_PEERCRED
bool Socket::SoPeercred(struct ucred& ucr)
{
@@ -1538,7 +1392,6 @@ bool Socket::SoPeercred(struct ucred& ucr)
}
#endif
-
#ifdef SO_PRIORITY
bool Socket::SetSoPriority(int x)
{
@@ -1551,7 +1404,6 @@ bool Socket::SetSoPriority(int x)
}
#endif
-
bool Socket::SetSoRcvlowat(int x)
{
#ifdef SO_RCVLOWAT
@@ -1567,7 +1419,6 @@ bool Socket::SetSoRcvlowat(int x)
#endif
}
-
bool Socket::SetSoSndlowat(int x)
{
#ifdef SO_SNDLOWAT
@@ -1583,7 +1434,6 @@ bool Socket::SetSoSndlowat(int x)
#endif
}
-
bool Socket::SetSoRcvtimeo(struct timeval& tv)
{
#ifdef SO_RCVTIMEO
@@ -1599,7 +1449,6 @@ bool Socket::SetSoRcvtimeo(struct timeval& tv)
#endif
}
-
bool Socket::SetSoSndtimeo(struct timeval& tv)
{
#ifdef SO_SNDTIMEO
@@ -1615,7 +1464,6 @@ bool Socket::SetSoSndtimeo(struct timeval& tv)
#endif
}
-
bool Socket::SetSoRcvbuf(int x)
{
#ifdef SO_RCVBUF
@@ -1631,7 +1479,6 @@ bool Socket::SetSoRcvbuf(int x)
#endif
}
-
int Socket::SoRcvbuf()
{
int value = 0;
@@ -1647,7 +1494,6 @@ int Socket::SoRcvbuf()
return value;
}
-
#ifdef SO_RCVBUFFORCE
bool Socket::SetSoRcvbufforce(int x)
{
@@ -1660,7 +1506,6 @@ bool Socket::SetSoRcvbufforce(int x)
}
#endif
-
bool Socket::SetSoSndbuf(int x)
{
#ifdef SO_SNDBUF
@@ -1676,7 +1521,6 @@ bool Socket::SetSoSndbuf(int x)
#endif
}
-
int Socket::SoSndbuf()
{
int value = 0;
@@ -1692,7 +1536,6 @@ int Socket::SoSndbuf()
return value;
}
-
#ifdef SO_SNDBUFFORCE
bool Socket::SetSoSndbufforce(int x)
{
@@ -1705,7 +1548,6 @@ bool Socket::SetSoSndbufforce(int x)
}
#endif
-
#ifdef SO_TIMESTAMP
bool Socket::SetSoTimestamp(bool x)
{
@@ -1719,7 +1561,6 @@ bool Socket::SetSoTimestamp(bool x)
}
#endif
-
int Socket::SoType()
{
int value = 0;
@@ -1735,31 +1576,26 @@ int Socket::SoType()
return value;
}
-
#ifdef ENABLE_TRIGGERS
void Socket::Subscribe(int id)
{
Handler().Subscribe(id, this);
}
-
void Socket::Unsubscribe(int id)
{
Handler().Unsubscribe(id, this);
}
-
void Socket::OnTrigger(int, const TriggerData&)
{
}
-
void Socket::OnCancelled(int)
{
}
#endif
-
void Socket::SetTimeout(time_t secs)
{
if (!secs)
@@ -1772,17 +1608,14 @@ void Socket::SetTimeout(time_t secs)
m_timeout_limit = secs;
}
-
void Socket::OnTimeout()
{
}
-
void Socket::OnConnectTimeout()
{
}
-
bool Socket::Timeout(time_t tnow)
{
if (tnow - m_timeout_start > m_timeout_limit)
@@ -1790,7 +1623,6 @@ bool Socket::Timeout(time_t tnow)
return false;
}
-
/** Returns local port number for bound socket file descriptor. */
port_t Socket::GetSockPort()
{
@@ -1813,7 +1645,6 @@ port_t Socket::GetSockPort()
return ntohs(sa.sin_port);
}
-
/** Returns local ipv4 address for bound socket file descriptor. */
ipaddr_t Socket::GetSockIP4()
{
@@ -1834,7 +1665,6 @@ ipaddr_t Socket::GetSockIP4()
return a;
}
-
/** Returns local ipv4 address as text for bound socket file descriptor. */
std::string Socket::GetSockAddress()
{
@@ -1854,7 +1684,6 @@ std::string Socket::GetSockAddress()
return addr.Convert();
}
-
#ifdef ENABLE_IPV6
#ifdef IPPROTO_IPV6
/** Returns local ipv6 address for bound socket file descriptor. */
@@ -1873,7 +1702,6 @@ struct in6_addr Socket::GetSockIP6()
return a;
}
-
/** Returns local ipv6 address as text for bound socket file descriptor. */
std::string Socket::GetSockAddress6()
{
@@ -1891,7 +1719,6 @@ std::string Socket::GetSockAddress6()
#endif
#endif
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/src/sockets/SocketHandler.cpp b/dep/src/sockets/SocketHandler.cpp
index 84d110cfe72..acf71fb2efa 100644
--- a/dep/src/sockets/SocketHandler.cpp
+++ b/dep/src/sockets/SocketHandler.cpp
@@ -50,14 +50,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace SOCKETS_NAMESPACE {
#endif
-
//#ifdef _DEBUG
//#define DEB(x) x; fflush(stderr);
//#else
#define DEB(x)
//#endif
-
SocketHandler::SocketHandler(StdLog *p)
:m_stdlog(p)
,m_mutex(m_mutex)
@@ -90,7 +88,6 @@ SocketHandler::SocketHandler(StdLog *p)
FD_ZERO(&m_efds);
}
-
SocketHandler::SocketHandler(Mutex& mutex,StdLog *p)
:m_stdlog(p)
,m_mutex(mutex)
@@ -124,7 +121,6 @@ SocketHandler::SocketHandler(Mutex& mutex,StdLog *p)
FD_ZERO(&m_efds);
}
-
SocketHandler::~SocketHandler()
{
#ifdef ENABLE_RESOLVER
@@ -182,33 +178,28 @@ DEB( fprintf(stderr, "/Emptying sockets list in SocketHandler destructor,
}
}
-
Mutex& SocketHandler::GetMutex() const
{
return m_mutex;
}
-
#ifdef ENABLE_DETACH
void SocketHandler::SetSlave(bool x)
{
m_slave = x;
}
-
bool SocketHandler::IsSlave()
{
return m_slave;
}
#endif
-
void SocketHandler::RegStdLog(StdLog *log)
{
m_stdlog = log;
}
-
void SocketHandler::LogError(Socket *p,const std::string& user_text,int err,const std::string& sys_err,loglevel_t t)
{
if (m_stdlog)
@@ -217,7 +208,6 @@ void SocketHandler::LogError(Socket *p,const std::string& user_text,int err,cons
}
}
-
void SocketHandler::Add(Socket *p)
{
if (p -> GetSocket() == INVALID_SOCKET)
@@ -238,7 +228,6 @@ void SocketHandler::Add(Socket *p)
m_add[p -> GetSocket()] = p;
}
-
void SocketHandler::Get(SOCKET s,bool& r,bool& w,bool& e)
{
if (s >= 0)
@@ -249,7 +238,6 @@ void SocketHandler::Get(SOCKET s,bool& r,bool& w,bool& e)
}
}
-
void SocketHandler::Set(SOCKET s,bool bRead,bool bWrite,bool bException)
{
DEB( fprintf(stderr, "Set(%d, %s, %s, %s)\n", s, bRead ? "true" : "false", bWrite ? "true" : "false", bException ? "true" : "false");)
@@ -291,7 +279,6 @@ DEB( fprintf(stderr, "Set(%d, %s, %s, %s)\n", s, bRead ? "true" : "false", bW
}
}
-
int SocketHandler::Select(long sec,long usec)
{
struct timeval tv;
@@ -300,7 +287,6 @@ int SocketHandler::Select(long sec,long usec)
return Select(&tv);
}
-
int SocketHandler::Select()
{
if (!m_fds_callonconnect.empty() ||
@@ -317,7 +303,6 @@ int SocketHandler::Select()
return Select(NULL);
}
-
int SocketHandler::Select(struct timeval *tsel)
{
size_t ignore = 0;
@@ -965,7 +950,6 @@ DEB( fprintf(stderr, "Close() before OnDelete\n");)
return n;
}
-
#ifdef ENABLE_RESOLVER
bool SocketHandler::Resolving(Socket *p0)
{
@@ -974,7 +958,6 @@ bool SocketHandler::Resolving(Socket *p0)
}
#endif
-
bool SocketHandler::Valid(Socket *p0)
{
for (socket_m::iterator it = m_sockets.begin(); it != m_sockets.end(); it++)
@@ -986,13 +969,11 @@ bool SocketHandler::Valid(Socket *p0)
return false;
}
-
bool SocketHandler::OkToAccept(Socket *)
{
return true;
}
-
size_t SocketHandler::GetCount()
{
/*
@@ -1003,33 +984,28 @@ printf(" m_delete : %d\n", m_delete.size());
return m_sockets.size() + m_add.size() + m_delete.size();
}
-
#ifdef ENABLE_SOCKS4
void SocketHandler::SetSocks4Host(ipaddr_t a)
{
m_socks4_host = a;
}
-
void SocketHandler::SetSocks4Host(const std::string& host)
{
Utility::u2ip(host, m_socks4_host);
}
-
void SocketHandler::SetSocks4Port(port_t port)
{
m_socks4_port = port;
}
-
void SocketHandler::SetSocks4Userid(const std::string& id)
{
m_socks4_userid = id;
}
#endif
-
#ifdef ENABLE_RESOLVER
int SocketHandler::Resolve(Socket *p,const std::string& host,port_t port)
{
@@ -1049,7 +1025,6 @@ DEB( fprintf(stderr, " *** Resolve '%s:%d' id#%d m_resolve_q size: %d p: %p
return resolv -> GetId();
}
-
#ifdef ENABLE_IPV6
int SocketHandler::Resolve6(Socket *p,const std::string& host,port_t port)
{
@@ -1069,7 +1044,6 @@ int SocketHandler::Resolve6(Socket *p,const std::string& host,port_t port)
}
#endif
-
int SocketHandler::Resolve(Socket *p,ipaddr_t a)
{
// check cache
@@ -1087,7 +1061,6 @@ int SocketHandler::Resolve(Socket *p,ipaddr_t a)
return resolv -> GetId();
}
-
#ifdef ENABLE_IPV6
int SocketHandler::Resolve(Socket *p,in6_addr& a)
{
@@ -1107,7 +1080,6 @@ int SocketHandler::Resolve(Socket *p,in6_addr& a)
}
#endif
-
void SocketHandler::EnableResolver(port_t port)
{
if (!m_resolver)
@@ -1117,60 +1089,51 @@ void SocketHandler::EnableResolver(port_t port)
}
}
-
bool SocketHandler::ResolverReady()
{
return m_resolver ? m_resolver -> Ready() : false;
}
#endif // ENABLE_RESOLVER
-
#ifdef ENABLE_SOCKS4
void SocketHandler::SetSocks4TryDirect(bool x)
{
m_bTryDirect = x;
}
-
ipaddr_t SocketHandler::GetSocks4Host()
{
return m_socks4_host;
}
-
port_t SocketHandler::GetSocks4Port()
{
return m_socks4_port;
}
-
const std::string& SocketHandler::GetSocks4Userid()
{
return m_socks4_userid;
}
-
bool SocketHandler::Socks4TryDirect()
{
return m_bTryDirect;
}
#endif
-
#ifdef ENABLE_RESOLVER
bool SocketHandler::ResolverEnabled()
{
return m_resolver ? true : false;
}
-
port_t SocketHandler::GetResolverPort()
{
return m_resolver_port;
}
#endif // ENABLE_RESOLVER
-
#ifdef ENABLE_POOL
ISocketHandler::PoolSocket *SocketHandler::FindConnection(int type,const std::string& protocol,SocketAddress& ad)
{
@@ -1193,20 +1156,17 @@ ISocketHandler::PoolSocket *SocketHandler::FindConnection(int type,const std::st
return NULL;
}
-
void SocketHandler::EnablePool(bool x)
{
m_b_enable_pool = x;
}
-
bool SocketHandler::PoolEnabled()
{
return m_b_enable_pool;
}
#endif
-
void SocketHandler::Remove(Socket *p)
{
#ifdef ENABLE_RESOLVER
@@ -1247,7 +1207,6 @@ void SocketHandler::Remove(Socket *p)
}
}
-
void SocketHandler::CheckSanity()
{
CheckList(m_fds, "active sockets"); // active sockets
@@ -1261,7 +1220,6 @@ void SocketHandler::CheckSanity()
CheckList(m_fds_close, "checklist close and delete");
}
-
void SocketHandler::CheckList(socket_v& ref,const std::string& listname)
{
for (socket_v::iterator it = ref.begin(); it != ref.end(); it++)
@@ -1288,7 +1246,6 @@ void SocketHandler::CheckList(socket_v& ref,const std::string& listname)
}
}
-
void SocketHandler::AddList(SOCKET s,list_t which_one,bool add)
{
if (s == INVALID_SOCKET)
@@ -1345,7 +1302,6 @@ DEB( fprintf(stderr, "AddList; %5d: %s: %s\n", s, (which_one == LIST_CALLONC
//DEB( fprintf(stderr, "/AddList\n");)
}
-
#ifdef ENABLE_TRIGGERS
int SocketHandler::TriggerID(Socket *src)
{
@@ -1354,7 +1310,6 @@ int SocketHandler::TriggerID(Socket *src)
return id;
}
-
bool SocketHandler::Subscribe(int id, Socket *dst)
{
if (m_trigger_src.find(id) != m_trigger_src.end())
@@ -1372,7 +1327,6 @@ bool SocketHandler::Subscribe(int id, Socket *dst)
return false;
}
-
bool SocketHandler::Unsubscribe(int id, Socket *dst)
{
if (m_trigger_src.find(id) != m_trigger_src.end())
@@ -1390,7 +1344,6 @@ bool SocketHandler::Unsubscribe(int id, Socket *dst)
return false;
}
-
void SocketHandler::Trigger(int id, Socket::TriggerData& data, bool erase)
{
if (m_trigger_src.find(id) != m_trigger_src.end())
@@ -1417,7 +1370,6 @@ void SocketHandler::Trigger(int id, Socket::TriggerData& data, bool erase)
}
#endif // ENABLE_TRIGGERS
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/src/sockets/StdoutLog.cpp b/dep/src/sockets/StdoutLog.cpp
index 998613f0fb2..e745a6d3358 100644
--- a/dep/src/sockets/StdoutLog.cpp
+++ b/dep/src/sockets/StdoutLog.cpp
@@ -44,8 +44,6 @@ namespace SOCKETS_NAMESPACE {
#endif
-
-
void StdoutLog::error(ISocketHandler *,Socket *sock,const std::string& call,int err,const std::string& sys_err,loglevel_t lvl)
{
time_t t = time(NULL);
@@ -93,10 +91,8 @@ void StdoutLog::error(ISocketHandler *,Socket *sock,const std::string& call,int
}
}
-
#ifdef SOCKETS_NAMESPACE
}
#endif
-
diff --git a/dep/src/sockets/StreamSocket.cpp b/dep/src/sockets/StreamSocket.cpp
index c8a3c32e496..009abadad8f 100644
--- a/dep/src/sockets/StreamSocket.cpp
+++ b/dep/src/sockets/StreamSocket.cpp
@@ -1,12 +1,10 @@
#include "StreamSocket.h"
#include "ISocketHandler.h"
-
#ifdef SOCKETS_NAMESPACE
namespace SOCKETS_NAMESPACE {
#endif
-
StreamSocket::StreamSocket(ISocketHandler& h) : Socket(h)
,m_bConnecting(false)
,m_connect_timeout(5)
@@ -20,12 +18,10 @@ StreamSocket::StreamSocket(ISocketHandler& h) : Socket(h)
{
}
-
StreamSocket::~StreamSocket()
{
}
-
void StreamSocket::SetConnecting(bool x)
{
if (x != m_bConnecting)
@@ -42,13 +38,11 @@ void StreamSocket::SetConnecting(bool x)
}
}
-
bool StreamSocket::Connecting()
{
return m_bConnecting;
}
-
bool StreamSocket::Ready()
{
if (GetSocket() != INVALID_SOCKET && !Connecting() && !CloseAndDelete())
@@ -56,113 +50,94 @@ bool StreamSocket::Ready()
return false;
}
-
void StreamSocket::SetConnectTimeout(int x)
{
m_connect_timeout = x;
}
-
int StreamSocket::GetConnectTimeout()
{
return m_connect_timeout;
}
-
void StreamSocket::SetFlushBeforeClose(bool x)
{
m_flush_before_close = x;
}
-
bool StreamSocket::GetFlushBeforeClose()
{
return m_flush_before_close;
}
-
int StreamSocket::GetConnectionRetry()
{
return m_connection_retry;
}
-
void StreamSocket::SetConnectionRetry(int x)
{
m_connection_retry = x;
}
-
int StreamSocket::GetConnectionRetries()
{
return m_retries;
}
-
void StreamSocket::IncreaseConnectionRetries()
{
m_retries++;
}
-
void StreamSocket::ResetConnectionRetries()
{
m_retries = 0;
}
-
void StreamSocket::SetCallOnConnect(bool x)
{
Handler().AddList(GetSocket(), LIST_CALLONCONNECT, x);
m_call_on_connect = x;
}
-
bool StreamSocket::CallOnConnect()
{
return m_call_on_connect;
}
-
void StreamSocket::SetRetryClientConnect(bool x)
{
Handler().AddList(GetSocket(), LIST_RETRY, x);
m_b_retry_connect = x;
}
-
bool StreamSocket::RetryClientConnect()
{
return m_b_retry_connect;
}
-
void StreamSocket::SetLineProtocol(bool x)
{
m_line_protocol = x;
}
-
bool StreamSocket::LineProtocol()
{
return m_line_protocol;
}
-
void StreamSocket::SetShutdown(int x)
{
m_shutdown = x;
}
-
int StreamSocket::GetShutdown()
{
return m_shutdown;
}
-
-
#ifdef SOCKETS_NAMESPACE
} // namespace SOCKETS_NAMESPACE {
#endif
diff --git a/dep/src/sockets/TcpSocket.cpp b/dep/src/sockets/TcpSocket.cpp
index c4efa05d5bf..5f067b53124 100644
--- a/dep/src/sockets/TcpSocket.cpp
+++ b/dep/src/sockets/TcpSocket.cpp
@@ -58,20 +58,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace SOCKETS_NAMESPACE {
#endif
-
//#ifdef _DEBUG
//#define DEB(x) x
//#else
#define DEB(x)
//#endif
-
// statics
#ifdef HAVE_OPENSSL
SSLInitializer TcpSocket::m_ssl_init;
#endif
-
// thanks, q
#ifdef _MSC_VER
#pragma warning(disable:4355)
@@ -109,7 +106,6 @@ TcpSocket::TcpSocket(ISocketHandler& h) : StreamSocket(h)
#pragma warning(default:4355)
#endif
-
#ifdef _MSC_VER
#pragma warning(disable:4355)
#endif
@@ -146,7 +142,6 @@ TcpSocket::TcpSocket(ISocketHandler& h,size_t isize,size_t osize) : StreamSocket
#pragma warning(default:4355)
#endif
-
TcpSocket::~TcpSocket()
{
#ifdef SOCKETS_DYNAMIC_TEMP
@@ -168,7 +163,6 @@ TcpSocket::~TcpSocket()
#endif
}
-
bool TcpSocket::Open(ipaddr_t ip,port_t port,bool skip_socks)
{
Ipv4Address ad(ip, port);
@@ -176,7 +170,6 @@ bool TcpSocket::Open(ipaddr_t ip,port_t port,bool skip_socks)
return Open(ad, local, skip_socks);
}
-
#ifdef ENABLE_IPV6
#ifdef IPPROTO_IPV6
bool TcpSocket::Open(in6_addr ip,port_t port,bool skip_socks)
@@ -187,14 +180,12 @@ bool TcpSocket::Open(in6_addr ip,port_t port,bool skip_socks)
#endif
#endif
-
bool TcpSocket::Open(SocketAddress& ad,bool skip_socks)
{
Ipv4Address bind_ad("0.0.0.0", 0);
return Open(ad, bind_ad, skip_socks);
}
-
bool TcpSocket::Open(SocketAddress& ad,SocketAddress& bind_ad,bool skip_socks)
{
if (!ad.IsValid())
@@ -320,7 +311,6 @@ bool TcpSocket::Open(SocketAddress& ad,SocketAddress& bind_ad,bool skip_socks)
return true; //!Connecting();
}
-
bool TcpSocket::Open(const std::string &host,port_t port)
{
#ifdef ENABLE_IPV6
@@ -369,7 +359,6 @@ bool TcpSocket::Open(const std::string &host,port_t port)
#endif
}
-
#ifdef ENABLE_RESOLVER
void TcpSocket::OnResolved(int id,ipaddr_t a,port_t port)
{
@@ -401,7 +390,6 @@ DEB( fprintf(stderr, "TcpSocket::OnResolved id %d addr %x port %d\n", id, a,
}
}
-
#ifdef ENABLE_IPV6
void TcpSocket::OnResolved(int id,in6_addr& a,port_t port)
{
@@ -429,7 +417,6 @@ void TcpSocket::OnResolved(int id,in6_addr& a,port_t port)
#endif
#endif
-
void TcpSocket::OnRead()
{
int n = 0;
@@ -542,7 +529,6 @@ DEB( fprintf(stderr, "SSL read problem, errcode = %d\n",n);)
OnRead( buf, n );
}
-
void TcpSocket::OnRead( char *buf, size_t n )
{
// unbuffered
@@ -620,12 +606,10 @@ void TcpSocket::OnRead( char *buf, size_t n )
#endif
}
-
void TcpSocket::OnWriteComplete()
{
}
-
void TcpSocket::OnWrite()
{
if (Connecting())
@@ -718,7 +702,6 @@ void TcpSocket::OnWrite()
}
}
-
int TcpSocket::TryWrite(const char *buf, size_t len)
{
int n = 0;
@@ -787,7 +770,6 @@ DEB( int errnr = SSL_get_error(m_ssl, n);
return n;
}
-
void TcpSocket::Buffer(const char *buf, size_t len)
{
size_t ptr = 0;
@@ -819,13 +801,11 @@ void TcpSocket::Buffer(const char *buf, size_t len)
}
}
-
void TcpSocket::Send(const std::string &str,int i)
{
SendBuf(str.c_str(),str.size(),i);
}
-
void TcpSocket::SendBuf(const char *buf,size_t len,int)
{
if (!Ready() && !Connecting())
@@ -876,12 +856,10 @@ void TcpSocket::SendBuf(const char *buf,size_t len,int)
}
}
-
void TcpSocket::OnLine(const std::string& )
{
}
-
#ifdef _MSC_VER
#pragma warning(disable:4355)
#endif
@@ -894,7 +872,6 @@ TcpSocket::TcpSocket(const TcpSocket& s)
#pragma warning(default:4355)
#endif
-
#ifdef ENABLE_SOCKS4
void TcpSocket::OnSocks4Connect()
{
@@ -929,7 +906,6 @@ void TcpSocket::OnSocks4Connect()
m_socks4_state = 0;
}
-
void TcpSocket::OnSocks4ConnectFailed()
{
Handler().LogError(this,"OnSocks4ConnectFailed",0,"connection to socks4 server failed, trying direct connection",LOG_LEVEL_WARNING);
@@ -945,7 +921,6 @@ void TcpSocket::OnSocks4ConnectFailed()
}
}
-
bool TcpSocket::OnSocks4Read()
{
switch (m_socks4_state)
@@ -1005,7 +980,6 @@ bool TcpSocket::OnSocks4Read()
}
#endif
-
void TcpSocket::Sendf(const char *format, ...)
{
va_list ap;
@@ -1020,7 +994,6 @@ void TcpSocket::Sendf(const char *format, ...)
Send( slask );
}
-
#ifdef HAVE_OPENSSL
void TcpSocket::OnSSLConnect()
{
@@ -1064,7 +1037,6 @@ DEB( fprintf(stderr, " m_sbio is NULL\n");)
}
}
-
void TcpSocket::OnSSLAccept()
{
SetNonblocking(true);
@@ -1103,7 +1075,6 @@ DEB( fprintf(stderr, " m_sbio is NULL\n");)
}
}
-
bool TcpSocket::SSLNegotiate()
{
if (!IsSSLServer()) // client
@@ -1200,20 +1171,17 @@ DEB( fprintf(stderr, "SSL_accept() failed - closing socket, retur
return false;
}
-
void TcpSocket::InitSSLClient()
{
InitializeContext("", SSLv23_method());
}
-
void TcpSocket::InitSSLServer()
{
Handler().LogError(this, "InitSSLServer", 0, "You MUST implement your own InitSSLServer method", LOG_LEVEL_FATAL);
SetCloseAndDelete();
}
-
void TcpSocket::InitializeContext(const std::string& context, SSL_METHOD *meth_in)
{
/* Create our context*/
@@ -1230,7 +1198,6 @@ void TcpSocket::InitializeContext(const std::string& context, SSL_METHOD *meth_i
}
}
-
void TcpSocket::InitializeContext(const std::string& context,const std::string& keyfile,const std::string& password,SSL_METHOD *meth_in)
{
/* Create our context*/
@@ -1266,7 +1233,6 @@ void TcpSocket::InitializeContext(const std::string& context,const std::string&
}
}
-
void TcpSocket::InitializeContext(const std::string& context,const std::string& certfile,const std::string& keyfile,const std::string& password,SSL_METHOD *meth_in)
{
/* Create our context*/
@@ -1302,7 +1268,6 @@ void TcpSocket::InitializeContext(const std::string& context,const std::string&
}
}
-
int TcpSocket::SSL_password_cb(char *buf,int num,int rwflag,void *userdata)
{
Socket *p0 = static_cast<Socket *>(userdata);
@@ -1317,7 +1282,6 @@ int TcpSocket::SSL_password_cb(char *buf,int num,int rwflag,void *userdata)
}
#endif // HAVE_OPENSSL
-
int TcpSocket::Close()
{
if (GetSocket() == INVALID_SOCKET) // this could happen
@@ -1356,7 +1320,6 @@ int TcpSocket::Close()
return Socket::Close();
}
-
#ifdef HAVE_OPENSSL
SSL_CTX *TcpSocket::GetSslContext()
{
@@ -1373,7 +1336,6 @@ SSL *TcpSocket::GetSsl()
}
#endif
-
#ifdef ENABLE_RECONNECT
void TcpSocket::SetReconnect(bool x)
{
@@ -1381,24 +1343,20 @@ void TcpSocket::SetReconnect(bool x)
}
#endif
-
void TcpSocket::OnRawData(const char *buf_in,size_t len)
{
}
-
size_t TcpSocket::GetInputLength()
{
return ibuf.GetLength();
}
-
size_t TcpSocket::GetOutputLength()
{
return m_output_length;
}
-
uint64_t TcpSocket::GetBytesReceived(bool clear)
{
uint64_t z = m_bytes_received;
@@ -1407,7 +1365,6 @@ uint64_t TcpSocket::GetBytesReceived(bool clear)
return z;
}
-
uint64_t TcpSocket::GetBytesSent(bool clear)
{
uint64_t z = m_bytes_sent;
@@ -1416,27 +1373,23 @@ uint64_t TcpSocket::GetBytesSent(bool clear)
return z;
}
-
#ifdef ENABLE_RECONNECT
bool TcpSocket::Reconnect()
{
return m_b_reconnect;
}
-
void TcpSocket::SetIsReconnect(bool x)
{
m_b_is_reconnect = x;
}
-
bool TcpSocket::IsReconnect()
{
return m_b_is_reconnect;
}
#endif
-
#ifdef HAVE_OPENSSL
const std::string& TcpSocket::GetPassword()
{
@@ -1444,13 +1397,11 @@ const std::string& TcpSocket::GetPassword()
}
#endif
-
void TcpSocket::DisableInputBuffer(bool x)
{
m_b_input_buffer_disabled = x;
}
-
void TcpSocket::OnOptions(int family,int type,int protocol,SOCKET s)
{
DEB( fprintf(stderr, "Socket::OnOptions()\n");)
@@ -1461,14 +1412,12 @@ DEB( fprintf(stderr, "Socket::OnOptions()\n");)
SetSoKeepalive(true);
}
-
void TcpSocket::SetLineProtocol(bool x)
{
StreamSocket::SetLineProtocol(x);
DisableInputBuffer(x);
}
-
bool TcpSocket::SetTcpNodelay(bool x)
{
#ifdef TCP_NODELAY
@@ -1485,7 +1434,6 @@ bool TcpSocket::SetTcpNodelay(bool x)
#endif
}
-
TcpSocket::CircularBuffer::CircularBuffer(size_t size)
:buf(new char[2 * size])
,m_max(size)
@@ -1496,13 +1444,11 @@ TcpSocket::CircularBuffer::CircularBuffer(size_t size)
{
}
-
TcpSocket::CircularBuffer::~CircularBuffer()
{
delete[] buf;
}
-
bool TcpSocket::CircularBuffer::Write(const char *s,size_t l)
{
if (m_q + l > m_max)
@@ -1532,7 +1478,6 @@ bool TcpSocket::CircularBuffer::Write(const char *s,size_t l)
return true;
}
-
bool TcpSocket::CircularBuffer::Read(char *s,size_t l)
{
if (l > m_q)
@@ -1598,31 +1543,26 @@ bool TcpSocket::CircularBuffer::Remove(size_t l)
return Read(NULL, l);
}
-
size_t TcpSocket::CircularBuffer::GetLength()
{
return m_q;
}
-
const char *TcpSocket::CircularBuffer::GetStart()
{
return buf + m_b;
}
-
size_t TcpSocket::CircularBuffer::GetL()
{
return (m_b + m_q > m_max) ? m_max - m_b : m_q;
}
-
size_t TcpSocket::CircularBuffer::Space()
{
return m_max - m_q;
}
-
unsigned long TcpSocket::CircularBuffer::ByteCounter(bool clear)
{
if (clear)
@@ -1634,7 +1574,6 @@ unsigned long TcpSocket::CircularBuffer::ByteCounter(bool clear)
return m_count;
}
-
std::string TcpSocket::CircularBuffer::ReadString(size_t l)
{
char *sz = new char[l + 1];
@@ -1649,7 +1588,6 @@ std::string TcpSocket::CircularBuffer::ReadString(size_t l)
return tmp;
}
-
void TcpSocket::OnConnectTimeout()
{
Handler().LogError(this, "connect", -1, "connect timeout", LOG_LEVEL_FATAL);
@@ -1687,7 +1625,6 @@ void TcpSocket::OnConnectTimeout()
SetConnecting(false);
}
-
#ifdef _WIN32
void TcpSocket::OnException()
{
@@ -1723,24 +1660,20 @@ void TcpSocket::OnException()
}
#endif // _WIN32
-
int TcpSocket::Protocol()
{
return IPPROTO_TCP;
}
-
void TcpSocket::SetTransferLimit(size_t sz)
{
m_transfer_limit = sz;
}
-
void TcpSocket::OnTransferLimit()
{
}
-
#ifdef SOCKETS_NAMESPACE
}
#endif
diff --git a/dep/src/sockets/Thread.cpp b/dep/src/sockets/Thread.cpp
index a387a7e3824..773e9f214fa 100644
--- a/dep/src/sockets/Thread.cpp
+++ b/dep/src/sockets/Thread.cpp
@@ -37,12 +37,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "Thread.h"
-
#ifdef SOCKETS_NAMESPACE
namespace SOCKETS_NAMESPACE {
#endif
-
Thread::Thread(bool release)
:m_thread(0)
,m_running(true)
@@ -68,7 +66,6 @@ Thread::Thread(bool release)
m_release = release;
}
-
Thread::~Thread()
{
m_b_destructor = true;
@@ -88,7 +85,6 @@ Thread::~Thread()
#endif
}
-
threadfunc_t STDPREFIX Thread::StartThread(threadparam_t zz)
{
Thread *p = (Thread *)zz;
@@ -116,52 +112,43 @@ threadfunc_t STDPREFIX Thread::StartThread(threadparam_t zz)
return (threadfunc_t)NULL;
}
-
bool Thread::IsRunning()
{
return m_running;
}
-
void Thread::SetRunning(bool x)
{
m_running = x;
}
-
bool Thread::IsReleased()
{
return m_release;
}
-
void Thread::SetRelease(bool x)
{
m_release = x;
}
-
bool Thread::DeleteOnExit()
{
return m_b_delete_on_exit;
}
-
void Thread::SetDeleteOnExit(bool x)
{
m_b_delete_on_exit = x;
}
-
bool Thread::IsDestructor()
{
return m_b_destructor;
}
-
#ifdef SOCKETS_NAMESPACE
}
#endif
-
diff --git a/dep/src/sockets/UdpSocket.cpp b/dep/src/sockets/UdpSocket.cpp
index f4c3d2f9657..a3d393c00e2 100644
--- a/dep/src/sockets/UdpSocket.cpp
+++ b/dep/src/sockets/UdpSocket.cpp
@@ -47,12 +47,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// include this to see strange sights
//#include <linux/in6.h>
-
#ifdef SOCKETS_NAMESPACE
namespace SOCKETS_NAMESPACE {
#endif
-
UdpSocket::UdpSocket(ISocketHandler& h, int ibufsz, bool ipv6, int retries) : Socket(h)
, m_ibuf(new char[ibufsz])
, m_ibufsz(ibufsz)
@@ -69,14 +67,12 @@ UdpSocket::UdpSocket(ISocketHandler& h, int ibufsz, bool ipv6, int retries) : So
#endif
}
-
UdpSocket::~UdpSocket()
{
Close();
delete[] m_ibuf;
}
-
int UdpSocket::Bind(port_t &port, int range)
{
#ifdef ENABLE_IPV6
@@ -92,7 +88,6 @@ int UdpSocket::Bind(port_t &port, int range)
return Bind(ad, range);
}
-
int UdpSocket::Bind(const std::string& intf, port_t &port, int range)
{
#ifdef ENABLE_IPV6
@@ -118,14 +113,12 @@ int UdpSocket::Bind(const std::string& intf, port_t &port, int range)
return -1;
}
-
int UdpSocket::Bind(ipaddr_t a, port_t &port, int range)
{
Ipv4Address ad(a, port);
return Bind(ad, range);
}
-
#ifdef ENABLE_IPV6
#ifdef IPPROTO_IPV6
int UdpSocket::Bind(in6_addr a, port_t &port, int range)
@@ -136,7 +129,6 @@ int UdpSocket::Bind(in6_addr a, port_t &port, int range)
#endif
#endif
-
int UdpSocket::Bind(SocketAddress& ad, int range)
{
if (GetSocket() == INVALID_SOCKET)
@@ -169,7 +161,6 @@ int UdpSocket::Bind(SocketAddress& ad, int range)
return -1;
}
-
/** if you wish to use Send, first Open a connection */
bool UdpSocket::Open(ipaddr_t l, port_t port)
{
@@ -177,7 +168,6 @@ bool UdpSocket::Open(ipaddr_t l, port_t port)
return Open(ad);
}
-
bool UdpSocket::Open(const std::string& host, port_t port)
{
#ifdef ENABLE_IPV6
@@ -201,7 +191,6 @@ bool UdpSocket::Open(const std::string& host, port_t port)
return false;
}
-
#ifdef ENABLE_IPV6
#ifdef IPPROTO_IPV6
bool UdpSocket::Open(struct in6_addr& a, port_t port)
@@ -212,7 +201,6 @@ bool UdpSocket::Open(struct in6_addr& a, port_t port)
#endif
#endif
-
bool UdpSocket::Open(SocketAddress& ad)
{
if (GetSocket() == INVALID_SOCKET)
@@ -234,7 +222,6 @@ bool UdpSocket::Open(SocketAddress& ad)
return false;
}
-
void UdpSocket::CreateConnection()
{
#ifdef ENABLE_IPV6
@@ -267,7 +254,6 @@ void UdpSocket::CreateConnection()
}
}
-
/** send to specified address */
void UdpSocket::SendToBuf(const std::string& h, port_t p, const char *data, int len, int flags)
{
@@ -291,7 +277,6 @@ void UdpSocket::SendToBuf(const std::string& h, port_t p, const char *data, int
}
}
-
/** send to specified address */
void UdpSocket::SendToBuf(ipaddr_t a, port_t p, const char *data, int len, int flags)
{
@@ -299,7 +284,6 @@ void UdpSocket::SendToBuf(ipaddr_t a, port_t p, const char *data, int len, int f
SendToBuf(ad, data, len, flags);
}
-
#ifdef ENABLE_IPV6
#ifdef IPPROTO_IPV6
void UdpSocket::SendToBuf(in6_addr a, port_t p, const char *data, int len, int flags)
@@ -310,7 +294,6 @@ void UdpSocket::SendToBuf(in6_addr a, port_t p, const char *data, int len, int f
#endif
#endif
-
void UdpSocket::SendToBuf(SocketAddress& ad, const char *data, int len, int flags)
{
if (GetSocket() == INVALID_SOCKET)
@@ -327,19 +310,16 @@ void UdpSocket::SendToBuf(SocketAddress& ad, const char *data, int len, int flag
}
}
-
void UdpSocket::SendTo(const std::string& a, port_t p, const std::string& str, int flags)
{
SendToBuf(a, p, str.c_str(), (int)str.size(), flags);
}
-
void UdpSocket::SendTo(ipaddr_t a, port_t p, const std::string& str, int flags)
{
SendToBuf(a, p, str.c_str(), (int)str.size(), flags);
}
-
#ifdef ENABLE_IPV6
#ifdef IPPROTO_IPV6
void UdpSocket::SendTo(in6_addr a, port_t p, const std::string& str, int flags)
@@ -349,13 +329,11 @@ void UdpSocket::SendTo(in6_addr a, port_t p, const std::string& str, int flags)
#endif
#endif
-
void UdpSocket::SendTo(SocketAddress& ad, const std::string& str, int flags)
{
SendToBuf(ad, str.c_str(), (int)str.size(), flags);
}
-
/** send to connected address */
void UdpSocket::SendBuf(const char *data, size_t len, int flags)
{
@@ -370,13 +348,11 @@ void UdpSocket::SendBuf(const char *data, size_t len, int flags)
}
}
-
void UdpSocket::Send(const std::string& str, int flags)
{
SendBuf(str.c_str(), (int)str.size(), flags);
}
-
#if defined(LINUX) || defined(MACOSX)
int UdpSocket::ReadTS(char *ioBuf, int inBufSize, struct sockaddr *from, socklen_t fromlen, struct timeval *ts)
{
@@ -442,7 +418,6 @@ int UdpSocket::ReadTS(char *ioBuf, int inBufSize, struct sockaddr *from, socklen
}
#endif
-
void UdpSocket::OnRead()
{
#ifdef ENABLE_IPV6
@@ -555,7 +530,6 @@ void UdpSocket::OnRead()
}
}
-
void UdpSocket::SetBroadcast(bool b)
{
int one = 1;
@@ -581,7 +555,6 @@ void UdpSocket::SetBroadcast(bool b)
}
}
-
bool UdpSocket::IsBroadcast()
{
int is_broadcast = 0;
@@ -598,7 +571,6 @@ bool UdpSocket::IsBroadcast()
return is_broadcast != 0;
}
-
void UdpSocket::SetMulticastTTL(int ttl)
{
if (GetSocket() == INVALID_SOCKET)
@@ -611,7 +583,6 @@ void UdpSocket::SetMulticastTTL(int ttl)
}
}
-
int UdpSocket::GetMulticastTTL()
{
int ttl = 0;
@@ -628,7 +599,6 @@ int UdpSocket::GetMulticastTTL()
return ttl;
}
-
void UdpSocket::SetMulticastLoop(bool x)
{
if (GetSocket() == INVALID_SOCKET)
@@ -655,7 +625,6 @@ void UdpSocket::SetMulticastLoop(bool x)
}
}
-
bool UdpSocket::IsMulticastLoop()
{
if (GetSocket() == INVALID_SOCKET)
@@ -685,7 +654,6 @@ bool UdpSocket::IsMulticastLoop()
return is_loop ? true : false;
}
-
void UdpSocket::AddMulticastMembership(const std::string& group, const std::string& local_if, int if_index)
{
if (GetSocket() == INVALID_SOCKET)
@@ -726,7 +694,6 @@ void UdpSocket::AddMulticastMembership(const std::string& group, const std::stri
}
}
-
void UdpSocket::DropMulticastMembership(const std::string& group, const std::string& local_if, int if_index)
{
if (GetSocket() == INVALID_SOCKET)
@@ -767,7 +734,6 @@ void UdpSocket::DropMulticastMembership(const std::string& group, const std::str
}
}
-
#ifdef ENABLE_IPV6
#ifdef IPPROTO_IPV6
void UdpSocket::SetMulticastHops(int hops)
@@ -787,7 +753,6 @@ void UdpSocket::SetMulticastHops(int hops)
}
}
-
int UdpSocket::GetMulticastHops()
{
if (GetSocket() == INVALID_SOCKET)
@@ -810,44 +775,36 @@ int UdpSocket::GetMulticastHops()
#endif // IPPROTO_IPV6
#endif
-
bool UdpSocket::IsBound()
{
return m_bind_ok;
}
-
void UdpSocket::OnRawData(const char *buf, size_t len, struct sockaddr *sa, socklen_t sa_len)
{
}
-
void UdpSocket::OnRawData(const char *buf, size_t len, struct sockaddr *sa, socklen_t sa_len, struct timeval *ts)
{
}
-
port_t UdpSocket::GetPort()
{
return m_port;
}
-
int UdpSocket::GetLastSizeWritten()
{
return m_last_size_written;
}
-
void UdpSocket::SetTimestamp(bool x)
{
m_b_read_ts = x;
}
-
#ifdef SOCKETS_NAMESPACE
}
#endif
-
diff --git a/dep/src/sockets/Utility.cpp b/dep/src/sockets/Utility.cpp
index 6473f0a2564..7c093fc0832 100644
--- a/dep/src/sockets/Utility.cpp
+++ b/dep/src/sockets/Utility.cpp
@@ -45,7 +45,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace SOCKETS_NAMESPACE {
#endif
-
// defines for the random number generator
#define TWIST_IA 397
#define TWIST_IB (TWIST_LEN - TWIST_IA)
@@ -55,7 +54,6 @@ namespace SOCKETS_NAMESPACE {
#define TWIST(b,i,j) ((b)[i] & UMASK) | ((b)[j] & LMASK)
#define MAGIC_TWIST(s) (((s) & 1) * MATRIX_A)
-
// statics
std::string Utility::m_host;
bool Utility::m_local_resolved = false;
@@ -68,7 +66,6 @@ std::string Utility::m_local_addr6;
#endif
#endif
-
std::string Utility::base64(const std::string& str_in)
{
std::string str;
@@ -77,7 +74,6 @@ std::string Utility::base64(const std::string& str_in)
return str;
}
-
std::string Utility::base64d(const std::string& str_in)
{
std::string str;
@@ -86,7 +82,6 @@ std::string Utility::base64d(const std::string& str_in)
return str;
}
-
std::string Utility::l2string(long l)
{
std::string str;
@@ -96,7 +91,6 @@ std::string Utility::l2string(long l)
return str;
}
-
std::string Utility::bigint2string(uint64_t l)
{
std::string str;
@@ -114,7 +108,6 @@ std::string Utility::bigint2string(uint64_t l)
return str;
}
-
uint64_t Utility::atoi64(const std::string& str)
{
uint64_t l = 0;
@@ -125,7 +118,6 @@ uint64_t Utility::atoi64(const std::string& str)
return l;
}
-
unsigned int Utility::hex2unsigned(const std::string& str)
{
unsigned int r = 0;
@@ -136,7 +128,6 @@ unsigned int Utility::hex2unsigned(const std::string& str)
return r;
}
-
/*
* Encode string per RFC1738 URL encoding rules
* tnx rstaveley
@@ -167,7 +158,6 @@ static char hex[] = "0123456789ABCDEF";
return dst;
} // rfc1738_encode
-
/*
* Decode string per RFC1738 URL encoding rules
* tnx rstaveley
@@ -198,7 +188,6 @@ std::string Utility::rfc1738_decode(const std::string& src)
return dst;
} // rfc1738_decode
-
bool Utility::isipv4(const std::string& str)
{
int dots = 0;
@@ -216,7 +205,6 @@ bool Utility::isipv4(const std::string& str)
return true;
}
-
bool Utility::isipv6(const std::string& str)
{
size_t qc = 0;
@@ -256,7 +244,6 @@ bool Utility::isipv6(const std::string& str)
return true;
}
-
bool Utility::u2ip(const std::string& str, ipaddr_t& l)
{
struct sockaddr_in sa;
@@ -265,7 +252,6 @@ bool Utility::u2ip(const std::string& str, ipaddr_t& l)
return r;
}
-
#ifdef ENABLE_IPV6
#ifdef IPPROTO_IPV6
bool Utility::u2ip(const std::string& str, struct in6_addr& l)
@@ -278,7 +264,6 @@ bool Utility::u2ip(const std::string& str, struct in6_addr& l)
#endif
#endif
-
void Utility::l2ip(const ipaddr_t ip, std::string& str)
{
struct sockaddr_in sa;
@@ -288,7 +273,6 @@ void Utility::l2ip(const ipaddr_t ip, std::string& str)
Utility::reverse( (struct sockaddr *)&sa, sizeof(sa), str, NI_NUMERICHOST);
}
-
void Utility::l2ip(const in_addr& ip, std::string& str)
{
struct sockaddr_in sa;
@@ -298,7 +282,6 @@ void Utility::l2ip(const in_addr& ip, std::string& str)
Utility::reverse( (struct sockaddr *)&sa, sizeof(sa), str, NI_NUMERICHOST);
}
-
#ifdef ENABLE_IPV6
#ifdef IPPROTO_IPV6
void Utility::l2ip(const struct in6_addr& ip, std::string& str,bool mixed)
@@ -347,7 +330,6 @@ void Utility::l2ip(const struct in6_addr& ip, std::string& str,bool mixed)
str = slask;
}
-
int Utility::in6_addr_compare(in6_addr a,in6_addr b)
{
for (size_t i = 0; i < 16; i++)
@@ -362,7 +344,6 @@ int Utility::in6_addr_compare(in6_addr a,in6_addr b)
#endif
#endif
-
void Utility::ResolveLocal()
{
char h[256];
@@ -391,7 +372,6 @@ void Utility::ResolveLocal()
m_local_resolved = true;
}
-
const std::string& Utility::GetLocalHostname()
{
if (!m_local_resolved)
@@ -401,7 +381,6 @@ const std::string& Utility::GetLocalHostname()
return m_host;
}
-
ipaddr_t Utility::GetLocalIP()
{
if (!m_local_resolved)
@@ -411,7 +390,6 @@ ipaddr_t Utility::GetLocalIP()
return m_ip;
}
-
const std::string& Utility::GetLocalAddress()
{
if (!m_local_resolved)
@@ -421,7 +399,6 @@ const std::string& Utility::GetLocalAddress()
return m_addr;
}
-
#ifdef ENABLE_IPV6
#ifdef IPPROTO_IPV6
const struct in6_addr& Utility::GetLocalIP6()
@@ -433,7 +410,6 @@ const struct in6_addr& Utility::GetLocalIP6()
return m_local_ip6;
}
-
const std::string& Utility::GetLocalAddress6()
{
if (!m_local_resolved)
@@ -445,7 +421,6 @@ const std::string& Utility::GetLocalAddress6()
#endif
#endif
-
void Utility::SetEnv(const std::string& var,const std::string& value)
{
#if (defined(SOLARIS8) || defined(SOLARIS))
@@ -469,7 +444,6 @@ void Utility::SetEnv(const std::string& var,const std::string& value)
#endif
}
-
std::string Utility::Sa2String(struct sockaddr *sa)
{
#ifdef ENABLE_IPV6
@@ -495,7 +469,6 @@ std::string Utility::Sa2String(struct sockaddr *sa)
return "";
}
-
void Utility::GetTime(struct timeval *p)
{
#ifdef _WIN32
@@ -511,7 +484,6 @@ void Utility::GetTime(struct timeval *p)
#endif
}
-
std::auto_ptr<SocketAddress> Utility::CreateAddress(struct sockaddr *sa,socklen_t sa_len)
{
switch (sa -> sa_family)
@@ -538,7 +510,6 @@ std::auto_ptr<SocketAddress> Utility::CreateAddress(struct sockaddr *sa,socklen_
return std::auto_ptr<SocketAddress>(NULL);
}
-
bool Utility::u2ip(const std::string& host, struct sockaddr_in& sa, int ai_flags)
{
memset(&sa, 0, sizeof(sa));
@@ -631,7 +602,6 @@ bool Utility::u2ip(const std::string& host, struct sockaddr_in& sa, int ai_flags
#endif // NO_GETADDRINFO
}
-
#ifdef ENABLE_IPV6
#ifdef IPPROTO_IPV6
bool Utility::u2ip(const std::string& host, struct sockaddr_in6& sa, int ai_flags)
@@ -747,14 +717,12 @@ bool Utility::u2ip(const std::string& host, struct sockaddr_in6& sa, int ai_flag
#endif // IPPROTO_IPV6
#endif // ENABLE_IPV6
-
bool Utility::reverse(struct sockaddr *sa, socklen_t sa_len, std::string& hostname, int flags)
{
std::string service;
return Utility::reverse(sa, sa_len, hostname, service, flags);
}
-
bool Utility::reverse(struct sockaddr *sa, socklen_t sa_len, std::string& hostname, std::string& service, int flags)
{
hostname = "";
@@ -870,7 +838,6 @@ bool Utility::reverse(struct sockaddr *sa, socklen_t sa_len, std::string& hostna
#endif // NO_GETADDRINFO
}
-
bool Utility::u2service(const std::string& name, int& service, int ai_flags)
{
#ifdef NO_GETADDRINFO
@@ -903,7 +870,6 @@ bool Utility::u2service(const std::string& name, int& service, int ai_flags)
#endif // NO_GETADDRINFO
}
-
unsigned long Utility::ThreadID()
{
#ifdef _WIN32
@@ -913,7 +879,6 @@ unsigned long Utility::ThreadID()
#endif
}
-
std::string Utility::ToLower(const std::string& str)
{
std::string r;
@@ -927,7 +892,6 @@ std::string Utility::ToLower(const std::string& str)
return r;
}
-
std::string Utility::ToUpper(const std::string& str)
{
std::string r;
@@ -941,7 +905,6 @@ std::string Utility::ToUpper(const std::string& str)
return r;
}
-
std::string Utility::ToString(double d)
{
char tmp[100];
@@ -949,14 +912,12 @@ std::string Utility::ToString(double d)
return tmp;
}
-
unsigned long Utility::Rnd()
{
static Utility::Rng generator( (unsigned long)time(NULL) );
return generator.Get();
}
-
Utility::Rng::Rng(unsigned long seed) : m_value( 0 )
{
m_tmp[0]= seed & 0xffffffffUL;
@@ -966,7 +927,6 @@ Utility::Rng::Rng(unsigned long seed) : m_value( 0 )
}
}
-
unsigned long Utility::Rng::Get()
{
unsigned long val = m_tmp[m_value];
diff --git a/dep/src/sockets/socket_include.cpp b/dep/src/sockets/socket_include.cpp
index 133ff745d91..290602c1b52 100644
--- a/dep/src/sockets/socket_include.cpp
+++ b/dep/src/sockets/socket_include.cpp
@@ -87,5 +87,3 @@ static char tmp[100];
}
-
-
diff --git a/dep/src/zlib/deflate.c b/dep/src/zlib/deflate.c
index 29ce1f64a57..2ed78a7d2a1 100644
--- a/dep/src/zlib/deflate.c
+++ b/dep/src/zlib/deflate.c
@@ -169,7 +169,6 @@ struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
*/
#define UPDATE_HASH(s,h,c) (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask)
-
/* ===========================================================================
* Insert string str in the dictionary and set match_head to the previous head
* of the hash chain (the most recent string with same hash key). Return
@@ -902,7 +901,6 @@ int ZEXPORT deflateCopy (dest, source)
deflate_state *ss;
ushf *overlay;
-
if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) {
return Z_STREAM_ERROR;
}
@@ -1402,7 +1400,7 @@ local block_state deflate_stored(s, flush)
}
/* Copy as much as possible from input to output: */
- for (;;) {
+ for (; ; ) {
/* Fill the window as much as possible: */
if (s->lookahead <= 1) {
@@ -1452,7 +1450,7 @@ local block_state deflate_fast(s, flush)
IPos hash_head = NIL; /* head of the hash chain */
int bflush; /* set if current block must be flushed */
- for (;;) {
+ for (; ; ) {
/* Make sure that we always have enough lookahead, except
* at the end of the input file. We need MAX_MATCH bytes
* for the next match, plus MIN_MATCH bytes to insert the
@@ -1559,7 +1557,7 @@ local block_state deflate_slow(s, flush)
int bflush; /* set if current block must be flushed */
/* Process the input block. */
- for (;;) {
+ for (; ; ) {
/* Make sure that we always have enough lookahead, except
* at the end of the input file. We need MAX_MATCH bytes
* for the next match, plus MIN_MATCH bytes to insert the
@@ -1690,7 +1688,7 @@ local block_state deflate_rle(s, flush)
uInt prev; /* byte at distance one to match */
Bytef *scan; /* scan for end of run */
- for (;;) {
+ for (; ; ) {
/* Make sure that we always have enough lookahead, except
* at the end of the input file. We need MAX_MATCH bytes
* for the longest encodable run.
diff --git a/dep/src/zlib/deflate.h b/dep/src/zlib/deflate.h
index d56e97db4cb..ad1f46a8dae 100644
--- a/dep/src/zlib/deflate.h
+++ b/dep/src/zlib/deflate.h
@@ -57,7 +57,6 @@
#define FINISH_STATE 666
/* Stream status */
-
/* Data structure describing a single value and its code string. */
typedef struct ct_data_s {
union {
@@ -267,7 +266,6 @@ typedef struct internal_state {
*/
#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
-
#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
/* Minimum amount of lookahead, except at the end of the input file.
* See deflate.c for comments about the MIN_MATCH+1.
diff --git a/dep/src/zlib/example.c b/dep/src/zlib/example.c
index 6c8a0ee7633..73799eac8cc 100644
--- a/dep/src/zlib/example.c
+++ b/dep/src/zlib/example.c
@@ -190,7 +190,7 @@ void test_deflate(compr, comprLen)
CHECK_ERR(err, "deflate");
}
/* Finish the stream, still forcing small buffers: */
- for (;;) {
+ for (; ; ) {
c_stream.avail_out = 1;
err = deflate(&c_stream, Z_FINISH);
if (err == Z_STREAM_END) break;
@@ -319,7 +319,7 @@ void test_large_inflate(compr, comprLen, uncompr, uncomprLen)
err = inflateInit(&d_stream);
CHECK_ERR(err, "inflateInit");
- for (;;) {
+ for (; ; ) {
d_stream.next_out = uncompr; /* discard the output */
d_stream.avail_out = (uInt)uncomprLen;
err = inflate(&d_stream, Z_NO_FLUSH);
@@ -482,7 +482,7 @@ void test_dict_inflate(compr, comprLen, uncompr, uncomprLen)
d_stream.next_out = uncompr;
d_stream.avail_out = (uInt)uncomprLen;
- for (;;) {
+ for (; ; ) {
err = inflate(&d_stream, Z_NO_FLUSH);
if (err == Z_STREAM_END) break;
if (err == Z_NEED_DICT) {
diff --git a/dep/src/zlib/gzio.c b/dep/src/zlib/gzio.c
index 7e90f4928fc..64dcae88107 100644
--- a/dep/src/zlib/gzio.c
+++ b/dep/src/zlib/gzio.c
@@ -72,7 +72,6 @@ typedef struct gz_stream {
int last; /* true if push-back is last character */
} gz_stream;
-
local gzFile gz_open OF((const char *path, const char *mode, int fd));
local int do_flush OF((gzFile file, int flush));
local int get_byte OF((gz_stream *s));
@@ -495,7 +494,6 @@ int ZEXPORT gzread (file, buf, len)
return (int)(len - s->stream.avail_out);
}
-
/* ===========================================================================
Reads one byte from the compressed file. gzgetc returns this byte
or -1 in case of end of file or error.
@@ -508,7 +506,6 @@ int ZEXPORT gzgetc(file)
return gzread(file, &c, 1) == 1 ? c : -1;
}
-
/* ===========================================================================
Push one byte back onto the stream.
*/
@@ -527,7 +524,6 @@ int ZEXPORT gzungetc(c, file)
return c;
}
-
/* ===========================================================================
Reads bytes from the compressed file until len-1 characters are
read, or a newline character is read and transferred to buf, or an
@@ -550,7 +546,6 @@ char * ZEXPORT gzgets(file, buf, len)
return b == buf && len > 0 ? Z_NULL : b;
}
-
#ifndef NO_GZCOMPRESS
/* ===========================================================================
Writes the given number of uncompressed bytes into the compressed file.
@@ -591,7 +586,6 @@ int ZEXPORT gzwrite (file, buf, len)
return (int)(len - s->stream.avail_in);
}
-
/* ===========================================================================
Converts, formats, and writes the args to the compressed file under
control of the format string, as in fprintf. gzprintf returns the number of
@@ -684,7 +678,6 @@ int ZEXPORT gzputc(file, c)
return gzwrite(file, &cc, 1) == 1 ? (int)cc : -1;
}
-
/* ===========================================================================
Writes the given null-terminated string to the compressed file, excluding
the terminating null character.
@@ -697,7 +690,6 @@ int ZEXPORT gzputs(file, s)
return gzwrite(file, (char*)s, (unsigned)strlen(s));
}
-
/* ===========================================================================
Flushes all pending output into the compressed file. The parameter
flush is as in the deflate() function.
@@ -714,7 +706,7 @@ local int do_flush (file, flush)
s->stream.avail_in = 0; /* should be zero already anyway */
- for (;;) {
+ for (; ; ) {
len = Z_BUFSIZE - s->stream.avail_out;
if (len != 0) {
diff --git a/dep/src/zlib/infback.c b/dep/src/zlib/infback.c
index 455dbc9ee84..781be49c171 100644
--- a/dep/src/zlib/infback.c
+++ b/dep/src/zlib/infback.c
@@ -278,7 +278,7 @@ void FAR *out_desc;
left = state->wsize;
/* Inflate until end of block marked as last */
- for (;;)
+ for (; ; )
switch (state->mode) {
case TYPE:
/* determine and dispatch block type */
@@ -388,7 +388,7 @@ void FAR *out_desc;
/* get length and distance code code lengths */
state->have = 0;
while (state->have < state->nlen + state->ndist) {
- for (;;) {
+ for (; ; ) {
this = state->lencode[BITS(state->lenbits)];
if ((unsigned)(this.bits) <= bits) break;
PULLBYTE();
@@ -473,14 +473,14 @@ void FAR *out_desc;
}
/* get a literal, length, or end-of-block code */
- for (;;) {
+ for (; ; ) {
this = state->lencode[BITS(state->lenbits)];
if ((unsigned)(this.bits) <= bits) break;
PULLBYTE();
}
if (this.op && (this.op & 0xf0) == 0) {
last = this;
- for (;;) {
+ for (; ; ) {
this = state->lencode[last.val +
(BITS(last.bits + last.op) >> last.bits)];
if ((unsigned)(last.bits + this.bits) <= bits) break;
@@ -527,14 +527,14 @@ void FAR *out_desc;
Tracevv((stderr, "inflate: length %u\n", state->length));
/* get distance code */
- for (;;) {
+ for (; ; ) {
this = state->distcode[BITS(state->distbits)];
if ((unsigned)(this.bits) <= bits) break;
PULLBYTE();
}
if ((this.op & 0xf0) == 0) {
last = this;
- for (;;) {
+ for (; ; ) {
this = state->distcode[last.val +
(BITS(last.bits + last.op) >> last.bits)];
if ((unsigned)(last.bits + this.bits) <= bits) break;
diff --git a/dep/src/zlib/inflate.c b/dep/src/zlib/inflate.c
index 792fdee8e9c..6b7a57e747c 100644
--- a/dep/src/zlib/inflate.c
+++ b/dep/src/zlib/inflate.c
@@ -62,7 +62,7 @@
* 1.2.beta6 4 Jan 2003
* - Added comments in inffast.c on effectiveness of POSTINC
* - Typecasting all around to reduce compiler warnings
- * - Changed loops from while (1) or do {} while (1) to for (;;), again to
+ * - Changed loops from while (1) or do {} while (1) to for (; ; ), again to
* make compilers happy
* - Changed type of window in inflateBackInit() to unsigned char *
*
@@ -284,7 +284,7 @@ void makefixed()
size = 1U << 9;
printf(" static const code lenfix[%u] = {", size);
low = 0;
- for (;;) {
+ for (; ; ) {
if ((low % 7) == 0) printf("\n ");
printf("{%u,%u,%d}", state.lencode[low].op, state.lencode[low].bits,
state.lencode[low].val);
@@ -295,7 +295,7 @@ void makefixed()
size = 1U << 5;
printf("\n static const code distfix[%u] = {", size);
low = 0;
- for (;;) {
+ for (; ; ) {
if ((low % 6) == 0) printf("\n ");
printf("{%u,%u,%d}", state.distcode[low].op, state.distcode[low].bits,
state.distcode[low].val);
@@ -474,7 +474,7 @@ unsigned out;
much output data as possible before returning. The state machine is
structured roughly as follows:
- for (;;) switch (state) {
+ for (; ; ) switch (state) {
...
case STATEn:
if (not enough input data or output space to make progress)
@@ -584,7 +584,7 @@ int flush;
in = have;
out = left;
ret = Z_OK;
- for (;;)
+ for (; ; )
switch (state->mode) {
case HEAD:
if (state->wrap == 0) {
@@ -875,7 +875,7 @@ int flush;
state->mode = CODELENS;
case CODELENS:
while (state->have < state->nlen + state->ndist) {
- for (;;) {
+ for (; ; ) {
this = state->lencode[BITS(state->lenbits)];
if ((unsigned)(this.bits) <= bits) break;
PULLBYTE();
@@ -954,14 +954,14 @@ int flush;
LOAD();
break;
}
- for (;;) {
+ for (; ; ) {
this = state->lencode[BITS(state->lenbits)];
if ((unsigned)(this.bits) <= bits) break;
PULLBYTE();
}
if (this.op && (this.op & 0xf0) == 0) {
last = this;
- for (;;) {
+ for (; ; ) {
this = state->lencode[last.val +
(BITS(last.bits + last.op) >> last.bits)];
if ((unsigned)(last.bits + this.bits) <= bits) break;
@@ -999,14 +999,14 @@ int flush;
Tracevv((stderr, "inflate: length %u\n", state->length));
state->mode = DIST;
case DIST:
- for (;;) {
+ for (; ; ) {
this = state->distcode[BITS(state->distbits)];
if ((unsigned)(this.bits) <= bits) break;
PULLBYTE();
}
if ((this.op & 0xf0) == 0) {
last = this;
- for (;;) {
+ for (; ; ) {
this = state->distcode[last.val +
(BITS(last.bits + last.op) >> last.bits)];
if ((unsigned)(last.bits + this.bits) <= bits) break;
diff --git a/dep/src/zlib/inftrees.c b/dep/src/zlib/inftrees.c
index 8a9c13ff03d..3a3fabc4bea 100644
--- a/dep/src/zlib/inftrees.c
+++ b/dep/src/zlib/inftrees.c
@@ -213,7 +213,7 @@ unsigned short FAR *work;
return 1;
/* process all codes and make table entries */
- for (;;) {
+ for (; ; ) {
/* create table entry */
this.bits = (unsigned char)(len - drop);
if ((int)(work[sym]) < end) {
diff --git a/dep/src/zlib/trees.c b/dep/src/zlib/trees.c
index 395e4e16814..bf8720a8b32 100644
--- a/dep/src/zlib/trees.c
+++ b/dep/src/zlib/trees.c
@@ -229,7 +229,6 @@ local void send_bits(s, value, length)
}
#endif /* DEBUG */
-
/* the arguments must not have side effects */
/* ===========================================================================
@@ -281,7 +280,7 @@ local void tr_static_init()
}
Assert (dist == 256, "tr_static_init: dist != 256");
dist >>= 7; /* from now on, all distances are divided by 128 */
- for ( ; code < D_CODES; code++) {
+ for (; code < D_CODES; code++) {
base_dist[code] = dist << 7;
for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) {
_dist_code[256 + dist++] = (uch)code;
@@ -414,8 +413,8 @@ local void init_block(s)
int n; /* iterates over tree elements */
/* Initialize the trees. */
- for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0;
- for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0;
+ for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0;
+ for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0;
for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
s->dyn_ltree[END_BLOCK].Freq = 1;
@@ -426,7 +425,6 @@ local void init_block(s)
#define SMALLEST 1
/* Index within the heap array of least frequent node in the Huffman tree */
-
/* ===========================================================================
* Remove the smallest element from the heap and recreate the heap with
* one less element. Updates heap and heap_len.
@@ -597,7 +595,7 @@ local void gen_codes (tree, max_code, bl_count)
"inconsistent bit counts");
Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
- for (n = 0; n <= max_code; n++) {
+ for (n = 0; n <= max_code; n++) {
int len = tree[n].Len;
if (len == 0) continue;
/* Now reverse the bits */
diff --git a/dep/src/zlib/zlib.h b/dep/src/zlib/zlib.h
index 2ad74617098..3898076f565 100644
--- a/dep/src/zlib/zlib.h
+++ b/dep/src/zlib/zlib.h
@@ -22,7 +22,6 @@
Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu
-
The data format used by the zlib library is described by RFCs (Request for
Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
(zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
@@ -238,7 +237,6 @@ ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
perform any compression: this will be done by deflate().
*/
-
ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
/*
deflate compresses as much data as possible, and stops when the input
@@ -324,7 +322,6 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
space to continue compressing.
*/
-
ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
/*
All dynamically allocated data structures for this stream are freed.
@@ -338,7 +335,6 @@ ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
deallocated).
*/
-
/*
ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
@@ -359,7 +355,6 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
avail_in may be modified, but next_out and avail_out are unchanged.)
*/
-
ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
/*
inflate decompresses as much data as possible, and stops when the input
@@ -458,7 +453,6 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
of the data is desired.
*/
-
ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
/*
All dynamically allocated data structures for this stream are freed.
@@ -995,7 +989,6 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
27-31: 0 (reserved)
*/
-
/* utility functions */
/*
@@ -1062,7 +1055,6 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
*/
-
typedef voidp gzFile;
ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
@@ -1308,7 +1300,6 @@ ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
len2.
*/
-
/* various hacks, don't look :) */
/* deflateInit and inflateInit are macros to allow checking the zlib version
@@ -1341,7 +1332,6 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
inflateBackInit_((strm), (windowBits), (window), \
ZLIB_VERSION, sizeof(z_stream))
-
#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
struct internal_state {int dummy;}; /* hack for buggy compilers */
#endif
diff --git a/dep/src/zlib/zutil.c b/dep/src/zlib/zutil.c
index d55f5948a37..9116a331be4 100644
--- a/dep/src/zlib/zutil.c
+++ b/dep/src/zlib/zutil.c
@@ -23,7 +23,6 @@ const char * const z_errmsg[10] = {
"incompatible version",/* Z_VERSION_ERROR (-6) */
""};
-
const char * ZEXPORT zlibVersion()
{
return ZLIB_VERSION;
@@ -181,7 +180,6 @@ void zmemzero(dest, len)
}
#endif
-
#ifdef SYS16BIT
#ifdef __TURBOC__
@@ -261,7 +259,6 @@ void zcfree (voidpf opaque, voidpf ptr)
#endif /* __TURBOC__ */
-
#ifdef M_I86
/* Microsoft C in 16-bit mode */
@@ -288,7 +285,6 @@ void zcfree (voidpf opaque, voidpf ptr)
#endif /* SYS16BIT */
-
#ifndef MY_ZCALLOC /* Any system without a special alloc function */
#ifndef STDC
diff --git a/dep/src/zlib/zutil.h b/dep/src/zlib/zutil.h
index b8a722d904d..7f40ca4d975 100644
--- a/dep/src/zlib/zutil.h
+++ b/dep/src/zlib/zutil.h
@@ -257,7 +257,6 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# define Tracecv(c,x)
#endif
-
voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
void zcfree OF((voidpf opaque, voidpf ptr));
diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp
index 0b48f5f7cef..184102a2036 100644
--- a/src/bindings/scripts/ScriptMgr.cpp
+++ b/src/bindings/scripts/ScriptMgr.cpp
@@ -70,7 +70,7 @@ void ScriptsFree()
delete []SpellSummary;
// Free resources before library unload
- for(uint16 i =0;i<MAX_SCRIPTS;++i)
+ for (uint16 i =0; i<MAX_SCRIPTS; ++i)
delete m_scripts[i];
num_sc_scripts = 0;
@@ -105,7 +105,7 @@ void ScriptsInit(char const* cfg_file = "trinitycore.conf")
bar.step();
outstring_log("");
- for(uint16 i =0;i<MAX_SCRIPTS;++i)
+ for (uint16 i =0; i<MAX_SCRIPTS; ++i)
m_scripts[i]=NULL;
FillSpellSummary();
diff --git a/src/bindings/scripts/base/escort_ai.cpp b/src/bindings/scripts/base/escort_ai.cpp
index 4d6083ab470..21f56eb99f4 100644
--- a/src/bindings/scripts/base/escort_ai.cpp
+++ b/src/bindings/scripts/base/escort_ai.cpp
@@ -127,7 +127,7 @@ void npc_escortAI::JustDied(Unit* pKiller)
{
if (Group* pGroup = pPlayer->GetGroup())
{
- for(GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next())
+ for (GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next())
{
if (Player* pMember = pRef->getSource())
{
@@ -192,7 +192,7 @@ bool npc_escortAI::IsPlayerOrGroupInRange()
{
if (Group* pGroup = pPlayer->GetGroup())
{
- for(GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next())
+ for (GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next())
{
Player* pMember = pRef->getSource();
diff --git a/src/bindings/scripts/base/follower_ai.cpp b/src/bindings/scripts/base/follower_ai.cpp
index 8284af7aec0..1b938d0e855 100644
--- a/src/bindings/scripts/base/follower_ai.cpp
+++ b/src/bindings/scripts/base/follower_ai.cpp
@@ -125,7 +125,7 @@ void FollowerAI::JustDied(Unit* pKiller)
{
if (Group* pGroup = pPlayer->GetGroup())
{
- for(GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next())
+ for (GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next())
{
if (Player* pMember = pRef->getSource())
{
@@ -210,7 +210,7 @@ void FollowerAI::UpdateAI(const uint32 uiDiff)
if (Group* pGroup = pPlayer->GetGroup())
{
- for(GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next())
+ for (GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next())
{
Player* pMember = pRef->getSource();
@@ -317,7 +317,7 @@ Player* FollowerAI::GetLeaderForFollower()
{
if (Group* pGroup = pLeader->GetGroup())
{
- for(GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next())
+ for (GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next())
{
Player* pMember = pRef->getSource();
diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp
index 21c8842fb44..f11af7fea33 100644
--- a/src/bindings/scripts/include/sc_creature.cpp
+++ b/src/bindings/scripts/include/sc_creature.cpp
@@ -20,7 +20,7 @@ struct TSpellSummary
void SummonList::DoZoneInCombat(uint32 entry)
{
- for(iterator i = begin(); i != end();)
+ for (iterator i = begin(); i != end(); )
{
Creature *summon = Unit::GetCreature(*m_creature, *i);
++i;
@@ -32,7 +32,7 @@ void SummonList::DoZoneInCombat(uint32 entry)
void SummonList::DoAction(uint32 entry, uint32 info)
{
- for(iterator i = begin(); i != end();)
+ for (iterator i = begin(); i != end(); )
{
Creature *summon = Unit::GetCreature(*m_creature, *i);
++i;
@@ -44,7 +44,7 @@ void SummonList::DoAction(uint32 entry, uint32 info)
void SummonList::DespawnEntry(uint32 entry)
{
- for(iterator i = begin(); i != end();)
+ for (iterator i = begin(); i != end(); )
{
Creature *summon = Unit::GetCreature(*m_creature, *i);
if(!summon)
@@ -313,7 +313,7 @@ void FillSpellSummary()
SpellEntry const* pTempSpell;
- for(uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i)
+ for (uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i)
{
SpellSummary[i].Effects = 0;
SpellSummary[i].Targets = 0;
@@ -323,7 +323,7 @@ void FillSpellSummary()
if (!pTempSpell)
continue;
- for(uint32 j = 0; j < 3; ++j)
+ for (uint32 j = 0; j < 3; ++j)
{
//Spell targets self
if (pTempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_CASTER )
@@ -402,7 +402,7 @@ void ScriptedAI::DoResetThreat()
std::list<HostilReference*>& threatlist = m_creature->getThreatManager().getThreatList();
- for(std::list<HostilReference*>::iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
+ for (std::list<HostilReference*>::iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
{
Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid());
@@ -453,7 +453,7 @@ void ScriptedAI::DoTeleportAll(float fX, float fY, float fZ, float fO)
return;
Map::PlayerList const &PlayerList = map->GetPlayers();
- for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
+ for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (Player* i_pl = i->getSource())
if (i_pl->isAlive())
i_pl->TeleportTo(m_creature->GetMapId(), fX, fY, fZ, fO, TELE_TO_NOT_LEAVE_COMBAT);
@@ -634,7 +634,7 @@ void BossAI::TeleportCheaters()
float x, y, z;
me->GetPosition(x, y, z);
std::list<HostilReference*> &m_threatlist = me->getThreatManager().getThreatList();
- for(std::list<HostilReference*>::iterator itr = m_threatlist.begin(); itr!= m_threatlist.end(); ++itr)
+ for (std::list<HostilReference*>::iterator itr = m_threatlist.begin(); itr!= m_threatlist.end(); ++itr)
if((*itr)->getTarget()->GetTypeId() == TYPEID_PLAYER && !CheckBoundary((*itr)->getTarget()))
(*itr)->getTarget()->NearTeleportTo(x, y, z, 0);
}
@@ -644,7 +644,7 @@ bool BossAI::CheckBoundary(Unit *who)
if(!boundary || !who)
return true;
- for(BossBoundaryMap::const_iterator itr = boundary->begin(); itr != boundary->end(); ++itr)
+ for (BossBoundaryMap::const_iterator itr = boundary->begin(); itr != boundary->end(); ++itr)
{
switch(itr->first)
{
@@ -718,7 +718,7 @@ void LoadOverridenSQLData()
void LoadOverridenDBCData()
{
SpellEntry *spellInfo;
- for(uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i)
+ for (uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i)
{
spellInfo = GET_SPELL(i);
if(!spellInfo)
@@ -749,7 +749,6 @@ void LoadOverridenDBCData()
}
}
-
Creature* GetClosestCreatureWithEntry(WorldObject* pSource, uint32 Entry, float MaxSearchRange)
{
Creature* pCreature = NULL;
diff --git a/src/bindings/scripts/include/sc_creature.h b/src/bindings/scripts/include/sc_creature.h
index 91073bf4032..32015dbb340 100644
--- a/src/bindings/scripts/include/sc_creature.h
+++ b/src/bindings/scripts/include/sc_creature.h
@@ -180,7 +180,6 @@ struct TRINITY_DLL_DECL Scripted_NoMovementAI : public ScriptedAI
{
Scripted_NoMovementAI(Creature* creature) : ScriptedAI(creature) {}
-
//Called at each attack of m_creature by any victim
void AttackStart(Unit* who);
};
diff --git a/src/bindings/scripts/scripts/custom/npc_wyrmresttempel_taxi.cpp b/src/bindings/scripts/scripts/custom/npc_wyrmresttempel_taxi.cpp
index 1f25d15205d..b74de7e2358 100644
--- a/src/bindings/scripts/scripts/custom/npc_wyrmresttempel_taxi.cpp
+++ b/src/bindings/scripts/scripts/custom/npc_wyrmresttempel_taxi.cpp
@@ -26,7 +26,6 @@ bool GossipSelect_npc_wyrmresttempel_middle_taxi(Player* pPlayer, Creature* pCre
pPlayer->GetSession()->SendDoFlight(6376, 881);
}
-
if (uiAction == GOSSIP_ACTION_INFO_DEF + 2)
{
pPlayer->GetSession()->SendDoFlight(6376, 882);
@@ -46,8 +45,6 @@ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MIDDLE, GOSSIP_SENDER_MAIN, GO
return true;
}
-
-
bool GossipSelect_npc_wyrmresttempel_bottom_taxi(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (uiAction == GOSSIP_ACTION_INFO_DEF + 4)
@@ -55,7 +52,6 @@ bool GossipSelect_npc_wyrmresttempel_bottom_taxi(Player* pPlayer, Creature* pCre
pPlayer->GetSession()->SendDoFlight(6376, 878);
}
-
if (uiAction == GOSSIP_ACTION_INFO_DEF + 3)
{
pPlayer->GetSession()->SendDoFlight(6376, 883);
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp
index a7bb66ac9cf..94f40eee090 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp
@@ -148,7 +148,7 @@ struct TRINITY_DLL_DECL npc_grimstoneAI : public npc_escortAI
MobCount = 0;
MobDeath_Timer = 0;
- for(uint8 i = 0; i < MAX_MOB_AMOUNT; ++i)
+ for (uint8 i = 0; i < MAX_MOB_AMOUNT; ++i)
RingMobGUID[i] = 0;
RingBossGUID = 0;
@@ -241,7 +241,7 @@ struct TRINITY_DLL_DECL npc_grimstoneAI : public npc_escortAI
return;
}
- for(uint8 i = 0; i < MAX_MOB_AMOUNT; ++i)
+ for (uint8 i = 0; i < MAX_MOB_AMOUNT; ++i)
{
Creature *mob = Unit::GetCreature(*m_creature,RingMobGUID[i]);
if (mob && !mob->isAlive() && mob->isDead())
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp
index f14b7603fa7..79ef098260d 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp
@@ -138,7 +138,7 @@ struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
TombTimer = TIMER_TOMBOFTHESEVEN;
TombEventCounter = 0;
- for(uint8 i = 0; i < 7; ++i)
+ for (uint8 i = 0; i < 7; ++i)
TombBossGUIDs[i] = 0;
}
@@ -324,7 +324,7 @@ struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]
>> m_auiEncounter[4] >> m_auiEncounter[5] >> GhostKillCount;
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS)
m_auiEncounter[i] = NOT_STARTED;
if (GhostKillCount > 0 && GhostKillCount < 7)
@@ -353,7 +353,7 @@ struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
{
HandleGameObject(GoTombExitGUID,false);//event reseted, close exit door
HandleGameObject(GoTombEnterGUID,true);//event reseted, open entrance door
- for(uint8 i = 0; i < 7; ++i)
+ for (uint8 i = 0; i < 7; ++i)
{
if (Creature* boss = instance->GetCreature(TombBossGUIDs[i]))
{
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp
index b36b4afe7b1..23dcdd0e91c 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp
@@ -247,7 +247,7 @@ struct TRINITY_DLL_DECL boss_chromaggusAI : public ScriptedAI
std::list<HostilReference*>::iterator i;
- for (i = m_creature->getThreatManager().getThreatList().begin();i != m_creature->getThreatManager().getThreatList().end();)
+ for (i = m_creature->getThreatManager().getThreatList().begin(); i != m_creature->getThreatManager().getThreatList().end(); )
{
Unit* pUnit = NULL;
pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid());
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/eversong_woods.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/eversong_woods.cpp
index b3d598c7669..7914c87fe1a 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/eversong_woods.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/eversong_woods.cpp
@@ -182,7 +182,6 @@ struct TRINITY_DLL_DECL npc_secondTrialAI : public ScriptedAI
uint32 timerJudLight;
uint32 timerCommand;
-
void Reset() {
timer = 2000;
@@ -388,7 +387,6 @@ struct TRINITY_DLL_DECL master_kelerun_bloodmournAI : public ScriptedAI
void SummonedCreatureDespawn(Creature* c) {}
};
-
bool GossipHello_master_kelerun_bloodmourn(Player* pPlayer, Creature* pCreature)
{
// quest only available if not already started
@@ -442,7 +440,7 @@ void npc_secondTrialAI::JustDied(Unit* Killer) {
if (Group *pGroup = CAST_PLR(Killer)->GetGroup())
{
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *pGroupGuy = itr->getSource();
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/hinterlands.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/hinterlands.cpp
index 2a4bf67868b..28adee2f787 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/hinterlands.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/hinterlands.cpp
@@ -79,7 +79,7 @@ struct MANGOS_DLL_DECL npc_00x09hlAI : public npc_escortAI
switch(uiPointId)
{
case 27:
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
{
const Position src = {147.927444f, -3851.513428f, 130.893f, 0};
Position pos;
@@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL npc_00x09hlAI : public npc_escortAI
}
break;
case 44:
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
{
const Position src = {-141.151581f, -4291.213867f, 120.130f, 0};
Position dst;
@@ -231,7 +231,7 @@ struct TRINITY_DLL_DECL npc_rinjiAI : public npc_escortAI
m_afAmbushSpawn[m_iSpawnId].m_fX, m_afAmbushSpawn[m_iSpawnId].m_fY, m_afAmbushSpawn[m_iSpawnId].m_fZ, 0.0f,
TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
- for(int i = 0; i < 2; ++i)
+ for (int i = 0; i < 2; ++i)
{
m_creature->SummonCreature(NPC_OUTRUNNER,
m_afAmbushSpawn[m_iSpawnId].m_fX, m_afAmbushSpawn[m_iSpawnId].m_fY, m_afAmbushSpawn[m_iSpawnId].m_fZ, 0.0f,
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp
index 57a0a1c1c5b..1bb954b51f9 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp
@@ -246,7 +246,7 @@ struct TRINITY_DLL_DECL boss_attumenAI : public ScriptedAI
Unit *target;
std::list<HostilReference *> t_list = m_creature->getThreatManager().getThreatList();
std::vector<Unit *> target_list;
- for(std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
+ for (std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
if (target && !target->IsWithinDist(m_creature, ATTACK_DISTANCE, false))
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp
index 2714b95f3c4..c2ab4a9567b 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp
@@ -62,7 +62,7 @@ struct TRINITY_DLL_DECL boss_moroesAI : public ScriptedAI
{
boss_moroesAI(Creature *c) : ScriptedAI(c)
{
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
AddId[i] = 0;
}
@@ -158,15 +158,14 @@ struct TRINITY_DLL_DECL boss_moroesAI : public ScriptedAI
Creature *pCreature = NULL;
std::vector<uint32> AddList;
-
- for(uint8 i = 0; i < 6; ++i)
+ for (uint8 i = 0; i < 6; ++i)
AddList.push_back(Adds[i]);
while(AddList.size() > 4)
AddList.erase((AddList.begin())+(rand()%AddList.size()));
uint8 i = 0;
- for(std::vector<uint32>::iterator itr = AddList.begin(); itr != AddList.end(); ++itr)
+ for (std::vector<uint32>::iterator itr = AddList.begin(); itr != AddList.end(); ++itr)
{
uint32 entry = *itr;
@@ -180,7 +179,7 @@ struct TRINITY_DLL_DECL boss_moroesAI : public ScriptedAI
}
}else
{
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
Creature *pCreature = m_creature->SummonCreature(AddId[i], Locations[i][0], Locations[i][1], POS_Z, Locations[i][2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
if (pCreature)
@@ -193,7 +192,7 @@ struct TRINITY_DLL_DECL boss_moroesAI : public ScriptedAI
bool isAddlistEmpty()
{
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
if (AddId[i] == 0)
return true;
@@ -203,7 +202,7 @@ struct TRINITY_DLL_DECL boss_moroesAI : public ScriptedAI
void DeSpawnAdds()
{
- for(uint8 i = 0; i < 4 ; ++i)
+ for (uint8 i = 0; i < 4 ; ++i)
{
Creature* Temp = NULL;
if (AddGUID[i])
@@ -217,7 +216,7 @@ struct TRINITY_DLL_DECL boss_moroesAI : public ScriptedAI
void AddsAttack()
{
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
Creature* Temp = NULL;
if (AddGUID[i])
@@ -323,7 +322,7 @@ struct TRINITY_DLL_DECL boss_moroes_guestAI : public ScriptedAI
boss_moroes_guestAI(Creature* c) : ScriptedAI(c)
{
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
GuestGUID[i] = 0;
pInstance = c->GetInstanceData();
@@ -344,7 +343,7 @@ struct TRINITY_DLL_DECL boss_moroes_guestAI : public ScriptedAI
Creature* Moroes = (Unit::GetCreature((*m_creature), GuestGUID[0]));
if (Moroes)
{
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
{
uint64 GUID = CAST_AI(boss_moroesAI, Moroes->AI())->AddGUID[i];
if (GUID && GUID != m_creature->GetGUID())
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp
index b6e3d25c021..4776042cdb0 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp
@@ -62,14 +62,14 @@ struct TRINITY_DLL_DECL boss_netherspiteAI : public ScriptedAI
{
pInstance = c->GetInstanceData();
- for(int i=0; i<3; ++i)
+ for (int i=0; i<3; ++i)
{
PortalGUID[i] = 0;
BeamTarget[i] = 0;
BeamerGUID[i] = 0;
}
// need core fix
- for(int i=0; i<3; ++i)
+ for (int i=0; i<3; ++i)
{
if(SpellEntry *spell = (SpellEntry*)GetSpellStore()->LookupEntry(PlayerBuff[i]))
spell->AttributesEx |= SPELL_ATTR_EX_NEGATIVE;
@@ -134,7 +134,7 @@ struct TRINITY_DLL_DECL boss_netherspiteAI : public ScriptedAI
pos[GREEN_PORTAL] = (r%2 ? 0: (r>1 ? 2: 1));
pos[BLUE_PORTAL] = (r>1 ? 1: 2); // Blue Portal not on the left side (0)
- for(int i=0; i<3; ++i)
+ for (int i=0; i<3; ++i)
if(Creature *portal = m_creature->SummonCreature(PortalID[i],PortalCoord[pos[i]][0],PortalCoord[pos[i]][1],PortalCoord[pos[i]][2],0,TEMPSUMMON_TIMED_DESPAWN,60000))
{
PortalGUID[i] = portal->GetGUID();
@@ -144,7 +144,7 @@ struct TRINITY_DLL_DECL boss_netherspiteAI : public ScriptedAI
void DestroyPortals()
{
- for(int i=0; i<3; ++i)
+ for (int i=0; i<3; ++i)
{
if(Creature *portal = Unit::GetCreature(*m_creature, PortalGUID[i]))
portal->DisappearAndDie();
@@ -157,7 +157,7 @@ struct TRINITY_DLL_DECL boss_netherspiteAI : public ScriptedAI
void UpdatePortals() // Here we handle the beams' behavior
{
- for(int j=0; j<3; ++j) // j = color
+ for (int j=0; j<3; ++j) // j = color
if(Creature *portal = Unit::GetCreature(*m_creature, PortalGUID[j]))
{
// the one who's been casted upon before
@@ -170,7 +170,7 @@ struct TRINITY_DLL_DECL boss_netherspiteAI : public ScriptedAI
Map::PlayerList const& players = map->GetPlayers();
// get the best suitable target
- for(Map::PlayerList::const_iterator i = players.begin(); i!=players.end(); ++i)
+ for (Map::PlayerList::const_iterator i = players.begin(); i!=players.end(); ++i)
{
Player* p = i->getSource();
if(p && p->isAlive() // alive
@@ -235,7 +235,7 @@ struct TRINITY_DLL_DECL boss_netherspiteAI : public ScriptedAI
PortalPhase = false;
DoScriptText(EMOTE_PHASE_BANISH,m_creature);
- for(int i=0; i<3; ++i)
+ for (int i=0; i<3; ++i)
m_creature->RemoveAurasDueToSpell(NetherBuff[i]);
}
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp
index 4f78b626067..c44cbcc7ced 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp
@@ -188,10 +188,10 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
InfernalCleanup();
positions.clear();
- for(uint8 i =0; i < 5; ++i)
+ for (uint8 i =0; i < 5; ++i)
enfeeble_targets[i] = 0;
- for(uint8 i = 0; i < TOTAL_INFERNAL_POINTS; ++i)
+ for (uint8 i = 0; i < TOTAL_INFERNAL_POINTS; ++i)
positions.push_back(&InfernalPoints[i]);
EnfeebleTimer = 30000;
@@ -224,7 +224,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
InfernalCleanup();
positions.clear();
- for(uint8 i = 0; i < TOTAL_INFERNAL_POINTS; ++i)
+ for (uint8 i = 0; i < TOTAL_INFERNAL_POINTS; ++i)
positions.push_back(&InfernalPoints[i]);
if (pInstance)
@@ -242,7 +242,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
void InfernalCleanup()
{
//Infernal Cleanup
- for(std::vector<uint64>::iterator itr = infernals.begin(); itr!= infernals.end(); ++itr)
+ for (std::vector<uint64>::iterator itr = infernals.begin(); itr!= infernals.end(); ++itr)
{
Unit *pInfernal = Unit::GetUnit(*m_creature, *itr);
if (pInfernal && pInfernal->isAlive())
@@ -256,7 +256,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
void AxesCleanup()
{
- for(uint8 i=0; i<2; ++i)
+ for (uint8 i=0; i<2; ++i)
{
Unit *axe = Unit::GetUnit(*m_creature, axes[i]);
if (axe && axe->isAlive())
@@ -291,7 +291,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
//begin + 1 , so we don't target the one with the highest threat
std::list<HostilReference *>::iterator itr = t_list.begin();
std::advance(itr, 1);
- for(; itr!= t_list.end(); ++itr) //store the threat list in a different container
+ for (; itr!= t_list.end(); ++itr) //store the threat list in a different container
{
Unit *target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
//only on alive players
@@ -304,7 +304,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
targets.erase(targets.begin()+rand()%targets.size());
int i = 0;
- for(std::vector<Unit *>::iterator iter = targets.begin(); iter!= targets.end(); ++iter, ++i)
+ for (std::vector<Unit *>::iterator iter = targets.begin(); iter!= targets.end(); ++iter, ++i)
{
Unit *target = *iter;
if (target)
@@ -321,7 +321,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
void EnfeebleResetHealth()
{
- for(uint8 i = 0; i < 5; ++i)
+ for (uint8 i = 0; i < 5; ++i)
{
Unit *target = Unit::GetUnit(*m_creature, enfeeble_targets[i]);
if (target && target->isAlive())
@@ -431,7 +431,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
DoScriptText(SAY_AXE_TOSS2, m_creature);
Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0);
- for(uint32 i=0; i<2; ++i)
+ for (uint32 i=0; i<2; ++i)
{
Creature *axe = m_creature->SummonCreature(MALCHEZARS_AXE, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
if (axe)
@@ -478,7 +478,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (target)
{
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
{
Unit *axe = Unit::GetUnit(*m_creature, axes[i]);
if (axe)
@@ -570,7 +570,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
void Cleanup(Creature *infernal, InfernalPoint *point)
{
- for(std::vector<uint64>::iterator itr = infernals.begin(); itr!= infernals.end(); ++itr)
+ for (std::vector<uint64>::iterator itr = infernals.begin(); itr!= infernals.end(); ++itr)
if (*itr == infernal->GetGUID())
{
infernals.erase(itr);
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp
index 5bdd4304d33..66f50881aa9 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp
@@ -181,7 +181,7 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
return;
//store the threat list in a different container
- for(std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
+ for (std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
Unit *target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
//only on alive players
@@ -194,7 +194,7 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
targets.erase(targets.begin()+rand()%targets.size());
uint32 i = 0;
- for(std::vector<Unit*>::iterator itr = targets.begin(); itr!= targets.end(); ++itr)
+ for (std::vector<Unit*>::iterator itr = targets.begin(); itr!= targets.end(); ++itr)
{
if (*itr)
{
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp
index f60fab0bddb..c19c7f1b14c 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp
@@ -167,7 +167,7 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI
{
boss_terestianAI(Creature *c) : ScriptedAI(c)
{
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
PortalGUID[i] = 0;
pInstance = c->GetInstanceData();
}
@@ -187,7 +187,7 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI
void Reset()
{
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
{
if (PortalGUID[i])
{
@@ -253,7 +253,7 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI
void JustDied(Unit *killer)
{
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
{
if (PortalGUID[i])
{
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/def_karazhan.h b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/def_karazhan.h
index 1c4c1f37eb0..56a6b106332 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/def_karazhan.h
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/def_karazhan.h
@@ -2,7 +2,6 @@
* This program is free software licensed under GPL version 2
* Please see the included DOCS/LICENSE.TXT for more information */
-
#ifndef DEF_KARAZHAN_H
#define DEF_KARAZHAN_H
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp
index 2ee3f3958cf..de82fb9c44b 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp
@@ -286,7 +286,7 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]
>> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7]
>> m_auiEncounter[8] >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11];
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead.
m_auiEncounter[i] = NOT_STARTED;
OUT_LOAD_INST_DATA_COMPLETE;
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/karazhan.cpp
index f392c50ca13..b7bd436f2a8 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/karazhan.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/karazhan/karazhan.cpp
@@ -240,7 +240,7 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
break;
}
- for(; index < count; ++index)
+ for (; index < count; ++index)
{
uint32 entry = ((uint32)Spawns[index][0]);
float PosX = Spawns[index][1];
@@ -294,7 +294,7 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
return;
RaidWiped = true;
- for(Map::PlayerList::const_iterator i = PlayerList.begin();i != PlayerList.end(); ++i)
+ for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
if (i->getSource()->isAlive() && !i->getSource()->isGameMaster())
{
@@ -507,7 +507,6 @@ struct TRINITY_DLL_DECL npc_image_of_medivhAI : public ScriptedAI
YellTimer = 10000;
}
-
uint32 NextStep(uint32 Step)
{
Unit* arca = Unit::GetUnit((*m_creature),ArcanagosGUID);
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp
index 3fc8e2dc4d1..d1d85cf55ee 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp
@@ -181,7 +181,7 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
std::list<HostilReference*>::iterator i = m_threatlist.begin();
- for(i = m_threatlist.begin(); i != m_threatlist.end(); ++i)
+ for (i = m_threatlist.begin(); i != m_threatlist.end(); ++i)
{
Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid());
if (pUnit && pUnit->isAlive())
@@ -383,8 +383,7 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
GravityLapseTimer = 30000;
GravityLapsePhase = 4;
-
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
{
Unit* target = NULL;
target = SelectUnit(SELECT_TARGET_RANDOM,0);
@@ -542,7 +541,6 @@ struct TRINITY_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI
}else Death_Timer -= diff;
}
-
}
if (!UpdateVictim())
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp
index 546f42cae19..49af52a6c55 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp
@@ -135,7 +135,7 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
{
DoScriptText(SAY_AGGRO, m_creature);
- for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
+ for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
{
if (Unit* pAdd = Unit::GetUnit(*m_creature, m_auiLackeyGUID[i]))
{
@@ -166,7 +166,7 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
LackeyEntryList.resize((sizeof(m_auiAddEntries) / sizeof(uint32)));
//fill vector array with entries from Creature array
- for(uint8 i = 0; i < LackeyEntryList.size(); ++i)
+ for (uint8 i = 0; i < LackeyEntryList.size(); ++i)
LackeyEntryList[i] = m_auiAddEntries[i];
//remove random entries
@@ -174,7 +174,7 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
LackeyEntryList.erase(LackeyEntryList.begin() + rand()%LackeyEntryList.size());
//summon all the remaining in vector
- for(std::vector<uint32>::iterator itr = LackeyEntryList.begin(); itr != LackeyEntryList.end(); ++itr)
+ for (std::vector<uint32>::iterator itr = LackeyEntryList.begin(); itr != LackeyEntryList.end(); ++itr)
{
if (Creature* pAdd = m_creature->SummonCreature((*itr), LackeyLocations[j][0], LackeyLocations[j][1], fZLocation, fOrientation, TEMPSUMMON_CORPSE_DESPAWN, 0))
m_auiLackeyGUID[j] = pAdd->GetGUID();
@@ -184,7 +184,7 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
}
else
{
- for(std::vector<uint32>::iterator itr = LackeyEntryList.begin(); itr != LackeyEntryList.end(); ++itr)
+ for (std::vector<uint32>::iterator itr = LackeyEntryList.begin(); itr != LackeyEntryList.end(); ++itr)
{
Unit* pAdd = Unit::GetUnit(*m_creature, m_auiLackeyGUID[j]);
@@ -247,7 +247,7 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
{
uint32 health = m_creature->GetHealth();
Unit* target = m_creature;
- for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
+ for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
{
if (Unit* pAdd = Unit::GetUnit(*m_creature, m_auiLackeyGUID[i]))
{
@@ -386,7 +386,7 @@ struct TRINITY_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI
if (pInstance)
{
- for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
+ for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
{
if (Unit* pAdd = Unit::GetUnit(*m_creature, m_auiLackeyGUIDs[i]))
{
@@ -457,7 +457,7 @@ struct TRINITY_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI
if (Creature* Delrissa = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_DELRISSA))))
{
- for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
+ for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
m_auiLackeyGUIDs[i] = CAST_AI(boss_priestess_delrissaAI, Delrissa->AI())->m_auiLackeyGUID[i];
}
}
@@ -810,7 +810,7 @@ struct TRINITY_DLL_DECL boss_yazzaiAI : public boss_priestess_lackey_commonAI
{
bool InMeleeRange = false;
std::list<HostilReference*>& t_list = m_creature->getThreatManager().getThreatList();
- for(std::list<HostilReference*>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
+ for (std::list<HostilReference*>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
if (Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()))
{
@@ -890,7 +890,7 @@ struct TRINITY_DLL_DECL boss_warlord_salarisAI : public boss_priestess_lackey_co
{
bool InMeleeRange = false;
std::list<HostilReference*>& t_list = m_creature->getThreatManager().getThreatList();
- for(std::list<HostilReference*>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
+ for (std::list<HostilReference*>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
if (Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()))
{
@@ -1218,7 +1218,7 @@ struct TRINITY_DLL_DECL boss_zelfanAI : public boss_priestess_lackey_commonAI
if (Recombobulate_Timer < diff)
{
- for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
+ for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
{
if (Unit* pAdd = Unit::GetUnit(*m_creature, m_auiLackeyGUIDs[i]))
{
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp
index 080e2ad6f68..9cb816fa920 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp
@@ -60,7 +60,7 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI
if (pInstance)
{
uint32 size = pInstance->GetData(DATA_FEL_CRYSTAL_SIZE);
- for(uint8 i = 0; i < size; ++i)
+ for (uint8 i = 0; i < size; ++i)
{
uint64 guid = pInstance->GetData64(DATA_FEL_CRYSTAL);
debug_log("TSCR: Selin: Adding Fel Crystal %u to list", guid);
@@ -90,8 +90,8 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI
{
if (pInstance)
{
- //for(uint8 i = 0; i < CRYSTALS_NUMBER; ++i)
- for(std::list<uint64>::iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr)
+ //for (uint8 i = 0; i < CRYSTALS_NUMBER; ++i)
+ for (std::list<uint64>::iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr)
{
//Unit* pUnit = Unit::GetUnit(*m_creature, FelCrystals[i]);
Unit* pUnit = Unit::GetUnit(*m_creature, *itr);
@@ -133,8 +133,8 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI
CrystalGUID = 0;
Unit* pCrystal = NULL;
Unit* CrystalChosen = NULL;
- //for(uint8 i = 0; i < CRYSTALS_NUMBER; ++i)
- for(std::list<uint64>::iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr)
+ //for (uint8 i = 0; i < CRYSTALS_NUMBER; ++i)
+ for (std::list<uint64>::iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr)
{
pCrystal = NULL;
//pCrystal = Unit::GetUnit(*m_creature, FelCrystals[i]);
@@ -170,8 +170,8 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI
if (Crystals.empty())
return;
- //for(uint8 i = 0; i < CRYSTALS_NUMBER; ++i)
- for(std::list<uint64>::iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr)
+ //for (uint8 i = 0; i < CRYSTALS_NUMBER; ++i)
+ for (std::list<uint64>::iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr)
{
//Creature* pCrystal = (Unit::GetCreature(*m_creature, FelCrystals[i]));
Creature* pCrystal = Unit::GetCreature(*m_creature, *itr);
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp
index 4b7a68b9a61..be71b7a01ad 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp
@@ -77,7 +77,7 @@ struct TRINITY_DLL_DECL instance_magisters_terrace : public ScriptedInstance
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS)
return true;
return false;
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp
index b23d5e72186..cd96acd80a8 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp
@@ -88,7 +88,7 @@ struct TRINITY_DLL_DECL npc_kalecgosAI : public ScriptedAI
SpellEntry const* pSpell = GetSpellStore()->LookupEntry(SPELL_ORB_KILL_CREDIT);
- for(Map::PlayerList::const_iterator i = lList.begin(); i != lList.end(); ++i)
+ for (Map::PlayerList::const_iterator i = lList.begin(); i != lList.end(); ++i)
{
if (Player* pPlayer = i->getSource())
{
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp
index 9376250e3e8..449fb9566dc 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp
@@ -220,7 +220,7 @@ struct TRINITY_DLL_DECL boss_ragnarosAI : public ScriptedAI
DoScriptText(SAY_REINFORCEMENTS1, m_creature);
// summon 10 elementals
- for(uint8 i = 0; i < 9; ++i)
+ for (uint8 i = 0; i < 9; ++i)
{
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
{
@@ -239,7 +239,7 @@ struct TRINITY_DLL_DECL boss_ragnarosAI : public ScriptedAI
{
DoScriptText(SAY_REINFORCEMENTS2, m_creature);
- for(uint8 i = 0; i < 9; ++i)
+ for (uint8 i = 0; i < 9; ++i)
{
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
{
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp
index 6e7df410a98..5dea84aceb6 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp
@@ -93,7 +93,6 @@ struct TRINITY_DLL_DECL instance_molten_core : public ScriptedInstance
return false;
};
-
void OnGameObjectCreate(GameObject* pGo, bool add)
{
switch(pGo->GetEntry())
@@ -125,7 +124,6 @@ struct TRINITY_DLL_DECL instance_molten_core : public ScriptedInstance
}
}
-
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch (pCreature->GetEntry())
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp
index 449ed462a44..541da6747f9 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp
@@ -204,7 +204,7 @@ void npc_unworthy_initiateAI::UpdateAI(const uint32 diff)
float dist = 99.0f;
GameObject *prison = NULL;
- for(uint8 i = 0; i < 12; ++i)
+ for (uint8 i = 0; i < 12; ++i)
{
if (GameObject* temp_prison = me->FindNearestGameObject(acherus_soul_prison[i],30))
{
@@ -733,7 +733,7 @@ struct TRINITY_DLL_DECL npc_scarlet_ghoulAI : public ScriptedAI
if (!MinionList.empty())
{
- for(std::list<Creature*>::iterator itr = MinionList.begin(); itr != MinionList.end(); ++itr)
+ for (std::list<Creature*>::iterator itr = MinionList.begin(); itr != MinionList.end(); ++itr)
{
if (CAST_CRE(*itr)->GetOwner()->GetGUID() == m_creature->GetOwner()->GetGUID())
{
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter2.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter2.cpp
index a592b0cc9b0..fe482b7dc92 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter2.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter2.cpp
@@ -241,7 +241,7 @@ struct TRINITY_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI
void SummonAcolyte(uint32 uiAmount)
{
- for(uint32 i = 0; i < uiAmount; ++i)
+ for (uint32 i = 0; i < uiAmount; ++i)
me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1642.329, -6045.818, 127.583, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
}
@@ -490,7 +490,6 @@ CreatureAI* GetAI_mob_high_inquisitor_valroth(Creature* pCreature)
return new mob_high_inquisitor_valrothAI (pCreature);
}
-
/*######
## npc_a_special_surprise
######*/
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter5.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter5.cpp
index 0f64371f528..35baaef4b64 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter5.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter5.cpp
@@ -242,7 +242,7 @@ void UpdateWorldState(Map *map, uint32 id, uint32 state)
if (!players.isEmpty())
{
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
if (Player* pPlayer = itr->getSource())
pPlayer->SendUpdateWorldState(id,state);
@@ -376,13 +376,13 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
uiEligorGUID = NULL;
uiRayneGUID = NULL;
- for(uint8 i = 0; i < ENCOUNTER_DEFENDER_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_DEFENDER_NUMBER; ++i)
{
if (Creature* pTemp = Unit::GetCreature(*me, uiDefenderGUID[i]))
pTemp->setDeathState(JUST_DIED);
uiDefenderGUID[i] = 0;
}
- for(uint8 i = 0; i < ENCOUNTER_EARTHSHATTER_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_EARTHSHATTER_NUMBER; ++i)
{
if (Creature* pTemp = Unit::GetCreature(*me, uiEarthshatterGUID[i]))
pTemp->setDeathState(JUST_DIED);
@@ -402,25 +402,25 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
uiOrbazGUID = NULL;
uiThassarianGUID = NULL;
uiLichKingGUID = NULL;
- for(uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
{
if (Creature* pTemp = Unit::GetCreature(*me, uiAbominationGUID[i]))
pTemp->setDeathState(JUST_DIED);
uiAbominationGUID[i] = 0;
}
- for(uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
{
if (Creature* pTemp = Unit::GetCreature(*me, uiBehemothGUID[i]))
pTemp->setDeathState(JUST_DIED);
uiBehemothGUID[i] = 0;
}
- for(uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
{
if (Creature* pTemp = Unit::GetCreature(*me, uiGhoulGUID[i]))
pTemp->setDeathState(JUST_DIED);
uiGhoulGUID[i] = 0;
}
- for(uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
{
if (Creature* pTemp = Unit::GetCreature(*me, uiWarriorGUID[i]))
pTemp->setDeathState(JUST_DIED);
@@ -478,13 +478,13 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
if (Creature* pTemp = Unit::GetCreature(*me, uiMaxwellGUID))
DoScriptText(SAY_LIGHT_OF_DAWN08, pTemp);
- for(uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
NPCChangeTarget(uiGhoulGUID[i]);
- for(uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
NPCChangeTarget(uiWarriorGUID[i]);
- for(uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
NPCChangeTarget(uiAbominationGUID[i]);
- for(uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
NPCChangeTarget(uiBehemothGUID[i]);
NPCChangeTarget(uiKoltiraGUID);
NPCChangeTarget(uiOrbazGUID);
@@ -710,16 +710,16 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
pTemp->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
pTemp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z);
}
- for(uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
if (Creature* pTemp = Unit::GetCreature(*me, uiAbominationGUID[i]))
pTemp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z);
- for(uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
if (Creature* pTemp = Unit::GetCreature(*me, uiBehemothGUID[i]))
pTemp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z);
- for(uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
if (Creature* pTemp = Unit::GetCreature(*me, uiGhoulGUID[i]))
pTemp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z);
- for(uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
if (Creature* pTemp = Unit::GetCreature(*me, uiWarriorGUID[i]))
pTemp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z);
JumpToNextStep(5000);
@@ -1344,13 +1344,13 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
// Check targets
if (uiTargetcheck < diff)
{
- for(uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
NPCChangeTarget(uiGhoulGUID[i]);
- for(uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
NPCChangeTarget(uiWarriorGUID[i]);
- for(uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
NPCChangeTarget(uiAbominationGUID[i]);
- for(uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
NPCChangeTarget(uiBehemothGUID[i]);
NPCChangeTarget(uiKoltiraGUID);
NPCChangeTarget(uiOrbazGUID);
@@ -1384,17 +1384,17 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
me->InterruptNonMeleeSpells(false);
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
- for(uint8 i = 0; i < ENCOUNTER_DEFENDER_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_DEFENDER_NUMBER; ++i)
DespawnNPC(uiDefenderGUID[i]);
- for(uint8 i = 0; i < ENCOUNTER_EARTHSHATTER_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_EARTHSHATTER_NUMBER; ++i)
DespawnNPC(uiEarthshatterGUID[i]);
- for(uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
DespawnNPC(uiAbominationGUID[i]);
- for(uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
DespawnNPC(uiBehemothGUID[i]);
- for(uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
DespawnNPC(uiGhoulGUID[i]);
- for(uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
DespawnNPC(uiWarriorGUID[i]);
if (Creature* pTemp = Unit::GetCreature(*me, uiKorfaxGUID))
@@ -1496,7 +1496,7 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
Unit* pTemp = NULL;
// Death
- for(uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
{
if (!(pTemp = Unit::GetCreature(*me, uiGhoulGUID[i])))
{
@@ -1505,7 +1505,7 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
uiGhoulGUID[i] = pTemp->GetGUID();
}
}
- for(uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
{
if (!(pTemp = Unit::GetCreature(*me, uiAbominationGUID[i])))
{
@@ -1514,7 +1514,7 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
uiAbominationGUID[i] = pTemp->GetGUID();
}
}
- for(uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
{
if (!(pTemp = Unit::GetCreature(*me, uiWarriorGUID[i])))
{
@@ -1523,7 +1523,7 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
uiWarriorGUID[i] = pTemp->GetGUID();
}
}
- for(uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
{
if (!(pTemp = Unit::GetCreature(*me, uiBehemothGUID[i])))
{
@@ -1534,7 +1534,7 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
}
// Dawn
- for(uint8 i = 0; i < ENCOUNTER_DEFENDER_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_DEFENDER_NUMBER; ++i)
{
if (!(pTemp = Unit::GetCreature(*me, uiDefenderGUID[i])))
{
@@ -1544,7 +1544,7 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
uiDefenderGUID[i] = pTemp->GetGUID();
}
}
- for(uint8 i = 0; i < ENCOUNTER_EARTHSHATTER_NUMBER; ++i)
+ for (uint8 i = 0; i < ENCOUNTER_EARTHSHATTER_NUMBER; ++i)
{
if (!(pTemp = Unit::GetCreature(*me, uiEarthshatterGUID[i])))
{
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp
index bce58b42632..18bd79a263e 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp
@@ -506,7 +506,7 @@ struct TRINITY_DLL_DECL boss_headless_horsemanAI : public ScriptedAI
std::list<Player*> temp;
std::list<Player*>::iterator j;
- for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
+ for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if ((m_creature->IsWithinLOSInMap(i->getSource()) || !checkLoS) && m_creature->getVictim() != i->getSource() &&
m_creature->IsWithinDistInMap(i->getSource(), range) && i->getSource()->isAlive())
temp.push_back(i->getSource());
@@ -560,7 +560,7 @@ struct TRINITY_DLL_DECL boss_headless_horsemanAI : public ScriptedAI
caster->GetMotionMaster()->MoveFollow(m_creature,6,urand(0,5));
//DoResetThreat();//not sure if need
std::list<HostilReference*>::iterator itr;
- for(itr = caster->getThreatManager().getThreatList().begin(); itr != caster->getThreatManager().getThreatList().end(); ++itr)
+ for (itr = caster->getThreatManager().getThreatList().begin(); itr != caster->getThreatManager().getThreatList().end(); ++itr)
{
Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid());
if (pUnit && pUnit->isAlive() && pUnit != caster)
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp
index fc02cad4a2f..ecbd3695045 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp
@@ -47,7 +47,6 @@ struct TRINITY_DLL_DECL boss_herodAI : public ScriptedAI
uint32 Cleave_Timer;
uint32 Whirlwind_Timer;
-
void Reset()
{
Enrage = false;
@@ -68,7 +67,7 @@ struct TRINITY_DLL_DECL boss_herodAI : public ScriptedAI
void JustDied(Unit* killer)
{
- for(uint8 i = 0; i < 20; ++i)
+ for (uint8 i = 0; i < 20; ++i)
m_creature->SummonCreature(ENTRY_SCARLET_TRAINEE, 1939.18, -431.58, 17.09, 6.22, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000);
}
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp
index 9859f3b8bd7..0ed5de79fe1 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp
@@ -158,7 +158,6 @@ struct TRINITY_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI
}
}
-
void UpdateAI(const uint32 uiDiff)
{
if (!UpdateVictim())
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp
index 492493e2390..66653f008bf 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp
@@ -103,7 +103,7 @@ struct TRINITY_DLL_DECL instance_scarlet_monastery : public ScriptedInstance
case DATA_HORSEMAN_EVENT:
if (data == DONE)
{
- for(std::set<uint64>::iterator itr = HorsemanAdds.begin(); itr != HorsemanAdds.end(); ++itr)
+ for (std::set<uint64>::iterator itr = HorsemanAdds.begin(); itr != HorsemanAdds.end(); ++itr)
{
Creature* add = instance->GetCreature(*itr);
if (add && add->isAlive())
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp
index 7d304445fdc..07b28454280 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp
@@ -119,7 +119,7 @@ struct TRINITY_DLL_DECL boss_jandicebarovAI : public ScriptedAI
//Summon 10 Illusions attacking random gamers
Unit* target = NULL;
- for(uint8 i = 0; i < 10; ++i)
+ for (uint8 i = 0; i < 10; ++i)
{
target = SelectUnit(SELECT_TARGET_RANDOM,0);
if (target)
@@ -132,7 +132,6 @@ struct TRINITY_DLL_DECL boss_jandicebarovAI : public ScriptedAI
Illusion_Timer = 25000;
}else Illusion_Timer -= diff;
-
// //Illusion_Timer
// if (Illusion_Timer < diff)
// {
@@ -195,7 +194,6 @@ struct TRINITY_DLL_DECL mob_illusionofjandicebarovAI : public ScriptedAI
}
};
-
CreatureAI* GetAI_boss_jandicebarov(Creature* pCreature)
{
return new boss_jandicebarovAI (pCreature);
@@ -206,7 +204,6 @@ CreatureAI* GetAI_mob_illusionofjandicebarov(Creature* pCreature)
return new mob_illusionofjandicebarovAI (pCreature);
}
-
void AddSC_boss_jandicebarov()
{
Script *newscript;
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp
index 282d6e9705a..8c124652a29 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp
@@ -65,7 +65,7 @@ struct TRINITY_DLL_DECL instance_scholomance : public ScriptedInstance
GateBarovGUID = 0;
GateIlluciaGUID = 0;
- for(uint8 i = 0; i < 6; ++i)
+ for (uint8 i = 0; i < 6; ++i)
IsBossDied[i] = false;
}
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp
index 29a8d04a1cb..a4bc6c40f28 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp
@@ -182,7 +182,7 @@ struct TRINITY_DLL_DECL instance_shadowfang_keep : public ScriptedInstance
std::istringstream loadStream(in);
loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3];
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
{
if (m_auiEncounter[i] == IN_PROGRESS)
m_auiEncounter[i] = NOT_STARTED;
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp
index 69ff09067f5..702810caba0 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp
@@ -106,7 +106,6 @@ struct TRINITY_DLL_DECL boss_cannon_master_willeyAI : public ScriptedAI
{
}
-
void UpdateAI(const uint32 diff)
{
//Return since we have no target
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp
index bac18320293..48c78e72953 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp
@@ -53,7 +53,7 @@ struct TRINITY_DLL_DECL boss_ramstein_the_gorgerAI : public ScriptedAI
void JustDied(Unit* Killer)
{
- for(uint8 i = 0; i < 30; ++i)
+ for (uint8 i = 0; i < 30; ++i)
{
if (Creature* mob = m_creature->SummonCreature(C_MINDLESS_UNDEAD,3969.35+irand(-10,10),-3391.87+irand(-10,10),119.11,5.91,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,1800000))
mob->AI()->AttackStart(m_creature->SelectNearestTarget(500));
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp
index d475e116039..fe0845118ee 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp
@@ -76,10 +76,10 @@ struct TRINITY_DLL_DECL instance_stratholme : public ScriptedInstance
void Initialize()
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
Encounter[i] = NOT_STARTED;
- for(uint8 i = 0; i < 5; ++i)
+ for (uint8 i = 0; i < 5; ++i)
IsSilverHandDead[i] = false;
BaronRun_Timer = 0;
@@ -226,7 +226,7 @@ struct TRINITY_DLL_DECL instance_stratholme : public ScriptedInstance
UpdateGoState(portGauntletGUID,GO_STATE_READY,false);
uint32 count = abomnationGUID.size();
- for(std::set<uint64>::iterator i = abomnationGUID.begin(); i != abomnationGUID.end(); ++i)
+ for (std::set<uint64>::iterator i = abomnationGUID.begin(); i != abomnationGUID.end(); ++i)
{
if (Creature* pAbom = instance->GetCreature(*i))
{
@@ -264,7 +264,7 @@ struct TRINITY_DLL_DECL instance_stratholme : public ScriptedInstance
if (!players.isEmpty())
{
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
if (Player* pPlayer = itr->getSource())
{
@@ -332,7 +332,7 @@ struct TRINITY_DLL_DECL instance_stratholme : public ScriptedInstance
loadStream >> Encounter[0] >> Encounter[1] >> Encounter[2] >> Encounter[3]
>> Encounter[4] >> Encounter[5];
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (Encounter[i] == IN_PROGRESS)
Encounter[i] = NOT_STARTED;
@@ -394,7 +394,7 @@ struct TRINITY_DLL_DECL instance_stratholme : public ScriptedInstance
{
if (Creature* pBaron = instance->GetCreature(baronGUID))
{
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
pBaron->SummonCreature(C_BLACK_GUARD,4032.84,-3390.24,119.73,4.71,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,1800000);
UpdateGoState(ziggurat4GUID,GO_STATE_ACTIVE,false);
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/stratholme/stratholme.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/stratholme/stratholme.cpp
index 1d0473e1d9b..4f8d19a305e 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/stratholme/stratholme.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/stratholme/stratholme.cpp
@@ -47,7 +47,7 @@ bool GOHello_go_gauntlet_gate(Player* pPlayer, GameObject* pGo)
if (Group *pGroup = pPlayer->GetGroup())
{
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* pGroupie = itr->getSource();
if (!pGroupie)
@@ -197,7 +197,7 @@ struct TRINITY_DLL_DECL mobs_spectral_ghostly_citizenAI : public ScriptedAI
{
if (Tagged)
{
- for(uint32 i = 1; i <= 4; ++i)
+ for (uint32 i = 1; i <= 4; ++i)
{
//100%, 50%, 33%, 25% chance to spawn
if (urand(1,i) == 1)
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp
index 42ec8d5d784..502a1827728 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp
@@ -128,7 +128,6 @@ struct TRINITY_DLL_DECL instance_sunken_temple : public ScriptedInstance
}
};
-
virtual void Update(uint32 diff) // correct order goes form 1-6
{
switch(State)
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp
index 1d46bba348b..6c62c75e35d 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp
@@ -298,7 +298,7 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
{
Unit* target = NULL;
Creature* temp = NULL;
- for(uint8 i = 0;i<3; ++i)
+ for (uint8 i = 0; i<3; ++i)
{
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
temp = DoSpawnCreature(MOB_SHADOW_IMAGE,0,0,0,0,TEMPSUMMON_CORPSE_DESPAWN,10000);
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp
index b81cbca3516..68cc122bfd1 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp
@@ -432,7 +432,7 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
}
Event = EVENT_NULL;
- for(uint32 i = 1; i <= MaxTimer[Phase]; ++i)
+ for (uint32 i = 1; i <= MaxTimer[Phase]; ++i)
{
if (Timer[i])
if (Timer[i] <= diff)
@@ -533,7 +533,7 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
cell_lock->Visit(cell_lock, cSearcher, *(m_creature->GetMap()));
}
- for(std::list<Creature*>::iterator i = templist.begin(); i != templist.end(); ++i)
+ for (std::list<Creature*>::iterator i = templist.begin(); i != templist.end(); ++i)
{
if (entry == MOB_VAPOR_TRAIL && Phase == PHASE_FLIGHT)
{
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp
index 22328334919..01b74fc6aa8 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp
@@ -88,7 +88,6 @@ enum SWPActions
DO_BANISH = 2
};
-
#define GO_FAILED "You are unable to use this currently."
#define EMOTE_UNABLE_TO_FIND "is unable to find Kalecgos"
@@ -303,7 +302,7 @@ struct TRINITY_DLL_DECL boss_kalecgosAI : public ScriptedAI
{
std::list<HostilReference*> &m_threatlist = me->getThreatManager().getThreatList();
std::list<Unit*> targetList;
- for(std::list<HostilReference*>::iterator itr = m_threatlist.begin(); itr!= m_threatlist.end(); ++itr)
+ for (std::list<HostilReference*>::iterator itr = m_threatlist.begin(); itr!= m_threatlist.end(); ++itr)
if((*itr)->getTarget() && (*itr)->getTarget()->GetTypeId() == TYPEID_PLAYER && (*itr)->getTarget()->GetGUID() != me->getVictim()->GetGUID() && !(*itr)->getTarget()->HasAura(AURA_SPECTRAL_EXHAUSTION) && (*itr)->getTarget()->GetPositionZ() > me->GetPositionZ()-5)
targetList.push_back((*itr)->getTarget());
if(targetList.empty())
@@ -520,7 +519,7 @@ struct TRINITY_DLL_DECL boss_sathrovarrAI : public ScriptedAI
Map* pMap = me->GetMap();
if (!pMap->IsDungeon()) return;
Map::PlayerList const &PlayerList = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
+ for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
if(i->getSource()->GetPositionZ() <= DRAGON_REALM_Z-5)
{
@@ -600,7 +599,7 @@ struct TRINITY_DLL_DECL boss_sathrovarrAI : public ScriptedAI
if (ResetThreat < diff)
{
- for(std::list<HostilReference*>::iterator itr = me->getThreatManager().getThreatList().begin(); itr != me->getThreatManager().getThreatList().end(); ++itr)
+ for (std::list<HostilReference*>::iterator itr = me->getThreatManager().getThreatList().begin(); itr != me->getThreatManager().getThreatList().end(); ++itr)
{
if(Unit* pUnit = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()))
{
@@ -735,7 +734,7 @@ bool GOkalecgos_teleporter(Player* pPlayer, GameObject* pGo)
Map* pMap = pGo->GetMap();
if (!pMap->IsDungeon()) return true;
Map::PlayerList const &PlayerList = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
+ for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
if(i->getSource() && i->getSource()->GetPositionZ() < DEMON_REALM_Z + 5)
SpectralPlayers++;
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp
index 3bb91d52110..e9e18e4383c 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp
@@ -115,7 +115,6 @@ enum SpellIds
/* Shield Orb Spells*/
SPELL_SHADOW_BOLT = 45680, //45679 would be correct but triggers to often //TODO fix console error
-
/* Anveena's spells and cosmetics (Or, generally, everything that has "Anveena" in name) */
SPELL_ANVEENA_PRISON = 46367, // She hovers locked within a bubble
SPELL_ANVEENA_ENERGY_DRAIN = 46410, // Sunwell energy glow animation (Control mob uses this)
@@ -282,7 +281,7 @@ bool GOHello_go_orb_of_the_blue_flight(Player* pPlayer, GameObject* pGo)
pGo->GetPosition(x,y,z);
// this won't work. need rewritten
/*
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
if (DynamicObject* Dyn = Kalec->GetDynObject(SPELL_RING_OF_BLUE_FLAMES))
{
@@ -316,7 +315,7 @@ struct TRINITY_DLL_DECL boss_kalecgos_kjAI : public ScriptedAI
bool Searched;
void InitializeAI(){
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
Orb[i] = NULL;
FindOrbs();
OrbsEmpowered = 0;
@@ -347,7 +346,7 @@ struct TRINITY_DLL_DECL boss_kalecgos_kjAI : public ScriptedAI
if (orbList.empty())
return;
uint8 i = 0;
- for(std::list<GameObject*>::iterator itr = orbList.begin(); itr != orbList.end(); ++itr, ++i){
+ for (std::list<GameObject*>::iterator itr = orbList.begin(); itr != orbList.end(); ++itr, ++i){
Orb[i] = pInstance ? pInstance->instance->GetGameObject(pInstance->GetData64((*itr)->GetGUID())) : NULL;
}
}
@@ -355,7 +354,7 @@ struct TRINITY_DLL_DECL boss_kalecgos_kjAI : public ScriptedAI
void ResetOrbs()
{
m_creature->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
if (Orb[i]) Orb[i]->SetUInt32Value(GAMEOBJECT_FACTION, 0);
}
@@ -367,7 +366,7 @@ struct TRINITY_DLL_DECL boss_kalecgos_kjAI : public ScriptedAI
if (all)
{
m_creature->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
if (!Orb[i]) return;
Orb[i]->CastSpell(m_creature, SPELL_RING_OF_BLUE_FLAMES);
@@ -382,7 +381,7 @@ struct TRINITY_DLL_DECL boss_kalecgos_kjAI : public ScriptedAI
/*
float x,y,z, dx,dy,dz;
Orb[random]->GetPosition(x,y,z);
- for(uint8 i = 0; i < 4; ++i){
+ for (uint8 i = 0; i < 4; ++i){
DynamicObject* Dyn = m_creature->GetDynObject(SPELL_RING_OF_BLUE_FLAMES);
if (Dyn){
Dyn->GetPosition(dx,dy,dz);
@@ -493,7 +492,7 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
void ChangeTimers(bool status, uint32 WTimer)
{
- for(uint8 i = 0; i < 10; ++i)
+ for (uint8 i = 0; i < 10; ++i)
TimerIsDeactiveted[i] = status;
TimerIsDeactiveted[TIMER_KALEC_JOIN] = IsKalecJoined;
@@ -558,11 +557,11 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
{
DoScriptText(RAND(SAY_KJ_REFLECTION1,SAY_KJ_REFLECTION2), m_creature);
DoCast(m_creature, SPELL_SINISTER_REFLECTION, true);
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
float x,y,z;
Unit* target;
- for(uint8 z = 0; z < 6; ++z)
+ for (uint8 z = 0; z < 6; ++z)
{
target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
if (!target->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT,0))break;
@@ -588,7 +587,7 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
} else WaitTimer -= diff;
}
- for(uint8 t = 0; t < ActiveTimers; ++t)
+ for (uint8 t = 0; t < ActiveTimers; ++t)
{
if (Timer[t] < diff && !TimerIsDeactiveted[t])
{
@@ -614,7 +613,7 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
if (!m_creature->IsNonMeleeSpellCasted(false))
{
m_creature->RemoveAurasDueToSpell(SPELL_SOUL_FLAY);
- for(uint8 z = 0; z < 6; ++z)
+ for (uint8 z = 0; z < 6; ++z)
{
randomPlayer = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
if (!randomPlayer->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT,0)) break;
@@ -637,7 +636,7 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
}
break;
case TIMER_SUMMON_SHILEDORB:
- for(uint8 i = 1; i < Phase; ++i)
+ for (uint8 i = 1; i < Phase; ++i)
{
float sx, sy;
sx = ShieldOrbLocations[0][0] + sin(ShieldOrbLocations[i][0]);
@@ -704,7 +703,7 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
break;
case TIMER_ARMAGEDDON: //Phase 4
Unit* target;
- for(uint8 z = 0; z < 6; ++z)
+ for (uint8 z = 0; z < 6; ++z)
{
target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
if (!target->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT,0)) break;
@@ -722,7 +721,7 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
}
}
//Time runs over!
- for(uint8 i = 0; i < ActiveTimers; ++i)
+ for (uint8 i = 0; i < ActiveTimers; ++i)
if (!TimerIsDeactiveted[i])
{
Timer[i] -= diff;
@@ -945,7 +944,7 @@ struct TRINITY_DLL_DECL mob_hand_of_the_deceiverAI : public ScriptedAI
if (Portal)
{
std::list<HostilReference*>::iterator itr;
- for(itr = m_creature->getThreatManager().getThreatList().begin(); itr != m_creature->getThreatManager().getThreatList().end(); ++itr)
+ for (itr = m_creature->getThreatManager().getThreatList().begin(); itr != m_creature->getThreatManager().getThreatList().end(); ++itr)
{
Unit* pUnit = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
if (pUnit)
@@ -1343,7 +1342,7 @@ struct TRINITY_DLL_DECL mob_sinster_reflectionAI : public ScriptedAI
break;
}
debug_log("Sinister-Timer");
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
Timer[i] -= diff;
}
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp
index ba95eb51e0f..ea679322225 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp
@@ -325,13 +325,13 @@ struct TRINITY_DLL_DECL boss_muruAI : public Scripted_NoMovementAI
else
{
DarkFiend = false;
- for(uint8 i = 0; i < 8; ++i)
+ for (uint8 i = 0; i < 8; ++i)
m_creature->SummonCreature(CREATURE_DARK_FIENDS,DarkFiends[i][0],DarkFiends[i][1],DarkFiends[i][2], DarkFiends[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0);
Timer[TIMER_DARKNESS] = 42000;
}
break;
case TIMER_HUMANOIDES:
- for(uint8 i = 0; i < 6; ++i)
+ for (uint8 i = 0; i < 6; ++i)
m_creature->SummonCreature(Humanoides[i][0],Humanoides[i][1],Humanoides[i][2],Humanoides[i][3], Humanoides[i][4], TEMPSUMMON_CORPSE_DESPAWN, 0);
Timer[TIMER_HUMANOIDES] = 60000;
break;
@@ -351,7 +351,7 @@ struct TRINITY_DLL_DECL boss_muruAI : public Scripted_NoMovementAI
}
//Timer
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
if (i != TIMER_PHASE)Timer[i] -= diff;
else if (Phase == 2) Timer[i] -= diff;
@@ -459,7 +459,7 @@ struct TRINITY_DLL_DECL npc_dark_fiendAI : public ScriptedAI
void SpellHit(Unit* caster, const SpellEntry* Spell)
{
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
if (Spell->Effect[i] == 38)
m_creature->DisappearAndDie();
}
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp
index 4195ebd91a5..9e1fc10d684 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp
@@ -89,7 +89,7 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS)
return true;
@@ -102,7 +102,7 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance
if (!players.isEmpty())
{
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
Player* plr = itr->getSource();
if (plr && !plr->HasAura(45839,0))
@@ -272,7 +272,7 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance
std::istringstream stream(in);
stream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]
>> m_auiEncounter[4] >> m_auiEncounter[5];
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead.
m_auiEncounter[i] = NOT_STARTED;
OUT_LOAD_INST_DATA_COMPLETE;
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.cpp
index e68717857cb..9eac24fa45e 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.cpp
@@ -51,7 +51,6 @@ enum LiadrinnSpeeches
LIADRIN_SAY3 = -1580109
};
-
/*######
## npc_captain_selana
######*/
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp
index 203fc8268d5..e5de9848728 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp
@@ -26,7 +26,6 @@ EndScriptData */
#include "precompiled.h"
-
#define SAY_AGGRO "Who dares awaken Archaedas? Who dares the wrath of the makers!"
#define SOUND_AGGRO 5855
@@ -92,7 +91,6 @@ struct TRINITY_DLL_DECL boss_archaedasAI : public ScriptedAI
}
}
-
void EnterCombat(Unit *who)
{
m_creature->setFaction (14);
@@ -135,7 +133,6 @@ struct TRINITY_DLL_DECL boss_archaedasAI : public ScriptedAI
if (!UpdateVictim())
return;
-
// wake a wall minion
if (WallMinionTimer < diff) {
pInstance->SetData (NULL, 2);
@@ -167,7 +164,6 @@ struct TRINITY_DLL_DECL boss_archaedasAI : public ScriptedAI
vaultWalkersAwake = true;
}
-
if (Tremor_Timer < diff)
{
//Cast
@@ -202,7 +198,6 @@ SDComment: These mobs are initially frozen until Archaedas awakens them
one at a time.
EndScriptData */
-
#define SPELL_ARCHAEDAS_AWAKEN 10347
struct TRINITY_DLL_DECL mob_archaedas_minionsAI : public ScriptedAI
@@ -273,7 +268,6 @@ struct TRINITY_DLL_DECL mob_archaedas_minionsAI : public ScriptedAI
if (!UpdateVictim())
return;
-
DoMeleeAttackIfReady();
}
};
@@ -290,7 +284,6 @@ SDComment: Needs 1 person to activate the Archaedas script
SDCategory: Uldaman
EndScriptData */
-
#define OBJECT_ALTAR_OF_ARCHAEDAS 133234
#define NUMBER_NEEDED_TO_ACTIVATE 1 // as of patch 3.0.8 the altars can be opened by a single player (previously 3)
@@ -300,7 +293,6 @@ EndScriptData */
//uint64 altarOfArchaedasCount[5];
//int32 altarOfArchaedasCounter=0;
-
bool GOHello_go_altar_of_archaedas(Player* pPlayer, GameObject* pGo)
{
//bool alreadyUsed;
@@ -413,7 +405,6 @@ SDComment: Need 1 person to activate to open the altar. One by one the StoneKee
SDCategory: Uldaman
EndScriptData */
-
#define SPELL_BOSS_OBJECT_VISUAL 11206
#define NUMBER_NEEDED_TO_ACTIVATE 1 // as of patch 3.0.8 the altars can be opened by a single player (previously 3)
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp
index 21b639e2449..f4d13731de1 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp
@@ -14,10 +14,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
#include "precompiled.h"
-
#define SPELL_ARCHAEDAS_AWAKEN 10347
#define SPELL_AWAKEN_VAULT_WALKER 10258
@@ -98,7 +96,7 @@ struct TRINITY_DLL_DECL instance_uldaman : public ScriptedInstance
void ActivateStoneKeepers()
{
- for(std::vector<uint64>::iterator i = stoneKeeper.begin(); i != stoneKeeper.end(); ++i)
+ for (std::vector<uint64>::iterator i = stoneKeeper.begin(); i != stoneKeeper.end(); ++i)
{
Creature *target = instance->GetCreature(*i);
if (!target || !target->isAlive() || target->getFaction()==14)
@@ -118,7 +116,7 @@ struct TRINITY_DLL_DECL instance_uldaman : public ScriptedInstance
if (!archaedas)
return;
- for(std::vector<uint64>::iterator i = archaedasWallMinions.begin(); i != archaedasWallMinions.end(); ++i)
+ for (std::vector<uint64>::iterator i = archaedasWallMinions.begin(); i != archaedasWallMinions.end(); ++i)
{
Creature *target = instance->GetCreature(*i);
if (!target || !target->isAlive() || target->getFaction()==14)
@@ -133,7 +131,7 @@ struct TRINITY_DLL_DECL instance_uldaman : public ScriptedInstance
void DeActivateMinions()
{
// first despawn any aggroed wall minions
- for(std::vector<uint64>::iterator i = archaedasWallMinions.begin(); i != archaedasWallMinions.end(); ++i)
+ for (std::vector<uint64>::iterator i = archaedasWallMinions.begin(); i != archaedasWallMinions.end(); ++i)
{
Creature *target = instance->GetCreature(*i);
if (!target || target->isDead() || target->getFaction()!=14)
@@ -143,7 +141,7 @@ struct TRINITY_DLL_DECL instance_uldaman : public ScriptedInstance
}
// Vault Walkers
- for(std::vector<uint64>::iterator i = vaultWalker.begin(); i != vaultWalker.end(); ++i)
+ for (std::vector<uint64>::iterator i = vaultWalker.begin(); i != vaultWalker.end(); ++i)
{
Creature *target = instance->GetCreature(*i);
if (!target || target->isDead() || target->getFaction()!=14)
@@ -153,7 +151,7 @@ struct TRINITY_DLL_DECL instance_uldaman : public ScriptedInstance
}
// Earthen Guardians
- for(std::vector<uint64>::iterator i = earthenGuardian.begin(); i != earthenGuardian.end(); ++i)
+ for (std::vector<uint64>::iterator i = earthenGuardian.begin(); i != earthenGuardian.end(); ++i)
{
Creature *target = instance->GetCreature(*i);
if (!target || target->isDead() || target->getFaction()!=14)
@@ -179,7 +177,7 @@ struct TRINITY_DLL_DECL instance_uldaman : public ScriptedInstance
void RespawnMinions()
{
// first respawn any aggroed wall minions
- for(std::vector<uint64>::iterator i = archaedasWallMinions.begin(); i != archaedasWallMinions.end(); ++i)
+ for (std::vector<uint64>::iterator i = archaedasWallMinions.begin(); i != archaedasWallMinions.end(); ++i)
{
Creature *target = instance->GetCreature(*i);
if (target && target->isDead())
@@ -191,7 +189,7 @@ struct TRINITY_DLL_DECL instance_uldaman : public ScriptedInstance
}
// Vault Walkers
- for(std::vector<uint64>::iterator i = vaultWalker.begin(); i != vaultWalker.end(); ++i)
+ for (std::vector<uint64>::iterator i = vaultWalker.begin(); i != vaultWalker.end(); ++i)
{
Creature *target = instance->GetCreature(*i);
if (target && target->isDead())
@@ -203,7 +201,7 @@ struct TRINITY_DLL_DECL instance_uldaman : public ScriptedInstance
}
// Earthen Guardians
- for(std::vector<uint64>::iterator i = earthenGuardian.begin(); i != earthenGuardian.end(); ++i)
+ for (std::vector<uint64>::iterator i = earthenGuardian.begin(); i != earthenGuardian.end(); ++i)
{
Creature *target = instance->GetCreature(*i);
if (target && target->isDead())
@@ -227,7 +225,6 @@ struct TRINITY_DLL_DECL instance_uldaman : public ScriptedInstance
if (data==5) RespawnMinions();
}
-
void SetData64 (uint32 type, uint64 data)
{
// Archaedas
@@ -237,7 +234,6 @@ struct TRINITY_DLL_DECL instance_uldaman : public ScriptedInstance
}
}
-
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch (pCreature->GetEntry()) {
@@ -288,8 +284,6 @@ struct TRINITY_DLL_DECL instance_uldaman : public ScriptedInstance
} // end GetData64
};
-
-
InstanceData* GetInstanceData_instance_uldaman(Map* pMap)
{
return new instance_uldaman(pMap);
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/undercity.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/undercity.cpp
index ecfd0894ddf..6c761b9248e 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/undercity.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/undercity.cpp
@@ -125,7 +125,7 @@ bool ChooseReward_npc_lady_sylvanas_windrunner(Player* pPlayer, Creature* pCreat
CAST_AI(npc_lady_sylvanas_windrunnerAI, pCreature->AI())->DoPlaySoundToSet(pCreature,SOUND_CREDIT);
pCreature->CastSpell(pCreature,SPELL_SYLVANAS_CAST,false);
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
pCreature->SummonCreature(ENTRY_HIGHBORNE_LAMENTER, HighborneLoc[i][0], HighborneLoc[i][1], HIGHBORNE_LOC_Y, HighborneLoc[i][2], TEMPSUMMON_TIMED_DESPAWN, 160000);
}
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/wetlands.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/wetlands.cpp
index d50d0fa2d2d..3ba504c6d7a 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/wetlands.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/wetlands.cpp
@@ -75,7 +75,7 @@ struct TRINITY_DLL_DECL npc_tapoke_slim_jahnAI : public npc_escortAI
if (HasEscortState(STATE_ESCORT_ESCORTING) && !m_bFriendSummoned && pPlayer)
{
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
m_creature->CastSpell(m_creature, SPELL_CALL_FRIENDS, true);
m_bFriendSummoned = true;
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp
index 8ac1d4166e6..f093de53185 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp
@@ -101,7 +101,7 @@ struct TRINITY_DLL_DECL boss_akilzonAI : public ScriptedAI
CloudGUID = 0;
CycloneGUID = 0;
DespawnSummons();
- for(uint8 i = 0; i < 8; ++i)
+ for (uint8 i = 0; i < 8; ++i)
BirdGUIDs[i] = 0;
StormCount = 0;
@@ -175,7 +175,7 @@ struct TRINITY_DLL_DECL boss_akilzonAI : public ScriptedAI
{
// deal damage
int32 bp0 = 800;
- for(uint8 i = 2; i < StormCount; ++i)
+ for (uint8 i = 2; i < StormCount; ++i)
bp0 *= 2;
CellPair p(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
@@ -197,7 +197,7 @@ struct TRINITY_DLL_DECL boss_akilzonAI : public ScriptedAI
cell_lock->Visit(cell_lock, grid_unit_searcher, *(m_creature->GetMap()));
}
//dealdamege
- for(std::list<Unit*>::iterator i = tempUnitMap.begin(); i != tempUnitMap.end(); ++i)
+ for (std::list<Unit*>::iterator i = tempUnitMap.begin(); i != tempUnitMap.end(); ++i)
{
if (!Cloud->IsWithinDist(*i, 6, false))
{
@@ -207,7 +207,7 @@ struct TRINITY_DLL_DECL boss_akilzonAI : public ScriptedAI
// visual
float x,y,z;
z = m_creature->GetPositionZ();
- for(uint8 i = 0; i < 5+rand()%5; ++i)
+ for (uint8 i = 0; i < 5+rand()%5; ++i)
{
x = 343+rand()%60;
y = 1380+rand()%60;
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_hexlord.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_hexlord.cpp
index d2933de614f..ba3fbe750eb 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_hexlord.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_hexlord.cpp
@@ -204,7 +204,7 @@ struct TRINITY_DLL_DECL boss_hex_lord_malacrassAI : public ScriptedAI
{
pInstance = c->GetInstanceData();
SelectAddEntry();
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
AddGUID[i] = 0;
}
@@ -253,7 +253,7 @@ struct TRINITY_DLL_DECL boss_hex_lord_malacrassAI : public ScriptedAI
m_creature->MonsterYell(YELL_AGGRO, LANG_UNIVERSAL, NULL);
DoPlaySoundToSet(m_creature, SOUND_YELL_AGGRO);
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
Unit* Temp = Unit::GetUnit((*m_creature),AddGUID[i]);
if (Temp && Temp->isAlive())
@@ -289,7 +289,7 @@ struct TRINITY_DLL_DECL boss_hex_lord_malacrassAI : public ScriptedAI
m_creature->MonsterYell(YELL_DEATH, LANG_UNIVERSAL, NULL);
DoPlaySoundToSet(m_creature, SOUND_YELL_DEATH);
- for(uint8 i = 0; i < 4 ; ++i)
+ for (uint8 i = 0; i < 4 ; ++i)
{
Unit* Temp = Unit::GetUnit((*m_creature),AddGUID[i]);
if (Temp && Temp->isAlive())
@@ -301,20 +301,20 @@ struct TRINITY_DLL_DECL boss_hex_lord_malacrassAI : public ScriptedAI
{
std::vector<uint32> AddList;
- for(uint8 i = 0; i < 8; ++i)
+ for (uint8 i = 0; i < 8; ++i)
AddList.push_back(AddEntryList[i]);
while(AddList.size() > 4)
AddList.erase(AddList.begin()+rand()%AddList.size());
uint8 i = 0;
- for(std::vector<uint32>::iterator itr = AddList.begin(); itr != AddList.end(); ++itr, ++i)
+ for (std::vector<uint32>::iterator itr = AddList.begin(); itr != AddList.end(); ++itr, ++i)
AddEntry[i] = *itr;
}
void SpawnAdds()
{
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
Creature *pCreature = (Unit::GetCreature((*m_creature), AddGUID[i]));
if (!pCreature || !pCreature->isAlive())
@@ -349,7 +349,7 @@ struct TRINITY_DLL_DECL boss_hex_lord_malacrassAI : public ScriptedAI
if (CheckAddState_Timer < diff)
{
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
Unit* Temp = Unit::GetUnit((*m_creature),AddGUID[i]);
if (Temp && Temp->isAlive() && !Temp->getVictim())
@@ -706,7 +706,6 @@ struct TRINITY_DLL_DECL boss_slitherAI : public boss_hexlord_addAI
uint32 venomspit_timer;
-
void Reset()
{
venomspit_timer = 5000;
@@ -753,7 +752,6 @@ struct TRINITY_DLL_DECL boss_fenstalkerAI : public boss_hexlord_addAI
uint32 volatileinf_timer;
-
void Reset()
{
volatileinf_timer = 15000;
@@ -780,7 +778,6 @@ struct TRINITY_DLL_DECL boss_fenstalkerAI : public boss_hexlord_addAI
#define SPELL_COLD_STARE 43593
#define SPELL_MIGHTY_BLOW 43592
-
struct TRINITY_DLL_DECL boss_koraggAI : public boss_hexlord_addAI
{
boss_koraggAI(Creature *c) : boss_hexlord_addAI(c) {}
@@ -788,7 +785,6 @@ struct TRINITY_DLL_DECL boss_koraggAI : public boss_hexlord_addAI
uint32 coldstare_timer;
uint32 mightyblow_timer;
-
void Reset()
{
coldstare_timer = 15000;
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp
index d946b26ffdf..e8eaee46895 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp
@@ -149,7 +149,7 @@ struct TRINITY_DLL_DECL boss_janalaiAI : public ScriptedAI
isFlameBreathing = false;
- for(uint8 i = 0; i < 40; ++i)
+ for (uint8 i = 0; i < 40; ++i)
FireBombGUIDs[i] = 0;
HatchAllEggs(1);
@@ -190,14 +190,14 @@ struct TRINITY_DLL_DECL boss_janalaiAI : public ScriptedAI
{
uint8 WallNum;
Creature* wall = NULL;
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
if (i == 0 || i == 2)
WallNum = 3;
else
WallNum = 2;
- for(uint8 j = 0; j < WallNum; j++)
+ for (uint8 j = 0; j < WallNum; j++)
{
if (WallNum == 3)
wall = m_creature->SummonCreature(MOB_FIRE_BOMB, FireWallCoords[i][0],FireWallCoords[i][1]+5*(j-1),FireWallCoords[i][2],FireWallCoords[i][3],TEMPSUMMON_TIMED_DESPAWN,15000);
@@ -211,7 +211,7 @@ struct TRINITY_DLL_DECL boss_janalaiAI : public ScriptedAI
void SpawnBombs()
{
float dx, dy;
- for(int i(0); i < 40; ++i)
+ for (int i(0); i < 40; ++i)
{
dx =(rand()%(area_dx))-(area_dx/2);
dy =(rand()%(area_dy))-(area_dy/2);
@@ -247,7 +247,7 @@ struct TRINITY_DLL_DECL boss_janalaiAI : public ScriptedAI
if (!templist.size())
return false;
- for(std::list<Creature*>::iterator i = templist.begin(); i != templist.end(); ++i)
+ for (std::list<Creature*>::iterator i = templist.begin(); i != templist.end(); ++i)
{
if (uiAction == 1)
(*i)->SetDisplayId(10056);
@@ -277,7 +277,7 @@ struct TRINITY_DLL_DECL boss_janalaiAI : public ScriptedAI
CellLock<GridReadGuard> cell_lock(cell, pair);
cell_lock->Visit(cell_lock, cSearcher, *(m_creature->GetMap()));
}
- for(std::list<Creature*>::iterator i = templist.begin(); i != templist.end(); ++i)
+ for (std::list<Creature*>::iterator i = templist.begin(); i != templist.end(); ++i)
{
(*i)->CastSpell(*i, SPELL_FIRE_BOMB_DAMAGE, true);
(*i)->RemoveAllAuras();
@@ -376,7 +376,7 @@ struct TRINITY_DLL_DECL boss_janalaiAI : public ScriptedAI
Map* pMap = m_creature->GetMap();
if (!pMap->IsDungeon()) return;
Map::PlayerList const &PlayerList = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
+ for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
if (Player* i_pl = i->getSource())
if (i_pl->isAlive())
@@ -514,7 +514,7 @@ struct TRINITY_DLL_DECL mob_amanishi_hatcherAI : public ScriptedAI
//error_log("Eggs %d at %d", templist.size(), side);
- for(std::list<Creature*>::iterator i = templist.begin(); i != templist.end() && num > 0; ++i)
+ for (std::list<Creature*>::iterator i = templist.begin(); i != templist.end() && num > 0; ++i)
{
if ((*i)->GetDisplayId() != 11686)
{
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp
index c15df162430..fb1a996ea24 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp
@@ -88,7 +88,6 @@ float NalorakkWay[8][3] =
#define YELL_SHIFTEDTOBEAR "You call on da beast, you gonna get more dan you bargain for!"
#define SOUND_YELL_TOBEAR 12072
-
struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI
{
boss_nalorakkAI(Creature *c) : ScriptedAI(c)
@@ -169,7 +168,7 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI
if (!templist.size())
return;
- for(std::list<Creature*>::iterator i = templist.begin(); i != templist.end(); ++i)
+ for (std::list<Creature*>::iterator i = templist.begin(); i != templist.end(); ++i)
{
if ((*i) && m_creature->IsWithinDistInMap((*i),25))
{
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp
index a8df5202e64..47b55f4c4bb 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp
@@ -98,7 +98,6 @@ EndScriptData */
#define SPELL_BERSERK 45078
-
#define PHASE_BEAR 0
#define PHASE_EAGLE 1
#define PHASE_LYNX 2
@@ -287,7 +286,7 @@ struct TRINITY_DLL_DECL boss_zuljinAI : public ScriptedAI
void SpawnAdds()
{
Creature *pCreature = NULL;
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
pCreature = m_creature->SummonCreature(SpiritInfo[i].entry, SpiritInfo[i].x, SpiritInfo[i].y, SpiritInfo[i].z, SpiritInfo[i].orient, TEMPSUMMON_DEAD_DESPAWN, 0);
if (pCreature)
@@ -302,7 +301,7 @@ struct TRINITY_DLL_DECL boss_zuljinAI : public ScriptedAI
void DespawnAdds()
{
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
Unit* Temp = NULL;
if (SpiritGUID[i])
@@ -355,7 +354,7 @@ struct TRINITY_DLL_DECL boss_zuljinAI : public ScriptedAI
{
m_creature->GetMotionMaster()->Clear();
m_creature->CastSpell(m_creature, SPELL_ENERGY_STORM, true); // enemy aura
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
Creature* Vortex = DoSpawnCreature(CREATURE_FEATHER_VORTEX, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
if (Vortex)
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp
index 74186442d9e..c12d3117949 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp
@@ -92,13 +92,13 @@ struct TRINITY_DLL_DECL instance_zulaman : public ScriptedInstance
BossKilled = 0;
ChestLooted = 0;
- for(uint8 i = 0; i < RAND_VENDOR; ++i)
+ for (uint8 i = 0; i < RAND_VENDOR; ++i)
RandVendor[i] = NOT_STARTED;
}
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) return true;
return false;
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/zulaman.cpp
index e3142e50540..ff475597b88 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/zulaman.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/zulaman/zulaman.cpp
@@ -147,7 +147,7 @@ bool GossipSelect_npc_zulaman_hostage(Player* pPlayer, Creature* pCreature, uint
float x, y, z;
pCreature->GetPosition(x, y, z);
uint32 entry = pCreature->GetEntry();
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
if (HostageEntry[i] == entry)
{
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp
index 0b11bd59d6c..9875dc642da 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp
@@ -72,7 +72,7 @@ struct TRINITY_DLL_DECL boss_hazzarahAI : public ScriptedAI
//We will summon 3 illusions that will spawn on a random gamer and attack this gamer
//We will just use one model for the beginning
Unit* target = NULL;
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
{
target = SelectUnit(SELECT_TARGET_RANDOM,0);
if (!target)
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp
index 0408cdc1e95..c6792f82451 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp
@@ -219,7 +219,7 @@ struct TRINITY_DLL_DECL boss_mandokirAI : public ScriptedAI
TargetInRange = 0;
std::list<HostilReference*>::iterator i = m_creature->getThreatManager().getThreatList().begin();
- for(; i != m_creature->getThreatManager().getThreatList().end(); ++i)
+ for (; i != m_creature->getThreatManager().getThreatList().end(); ++i)
{
Unit* pUnit = Unit::GetUnit(*m_creature, (*i)->getUnitGuid());
if (pUnit && m_creature->IsWithinMeleeRange(pUnit))
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp
index 2ff7597f0fa..4eb7b649a88 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp
@@ -112,7 +112,7 @@ struct TRINITY_DLL_DECL boss_venoxisAI : public ScriptedAI
if (HolyNova_Timer < diff)
{
TargetInRange = 0;
- for(uint8 i=0; i<10; ++i)
+ for (uint8 i=0; i<10; ++i)
{
if (Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO,i))
if (m_creature->IsWithinMeleeRange(target))
diff --git a/src/bindings/scripts/scripts/kalimdor/azuremyst_isle.cpp b/src/bindings/scripts/scripts/kalimdor/azuremyst_isle.cpp
index 76d7ff0e4af..74d0c5528f8 100644
--- a/src/bindings/scripts/scripts/kalimdor/azuremyst_isle.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/azuremyst_isle.cpp
@@ -323,7 +323,6 @@ struct TRINITY_DLL_DECL npc_magwinAI : public npc_escortAI
{
npc_magwinAI(Creature *c) : npc_escortAI(c) {}
-
void WaypointReached(uint32 i)
{
Player* pPlayer = GetPlayerForEscort();
@@ -487,7 +486,7 @@ struct TRINITY_DLL_DECL npc_geezleAI : public ScriptedAI
Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(m_creature, players, checker);
m_creature->VisitNearbyWorldObject(radius, searcher);
- for(std::list<Player*>::iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (std::list<Player*>::iterator itr = players.begin(); itr != players.end(); ++itr)
{
if((*itr)->GetQuestStatus(QUEST_TREES_COMPANY)==QUEST_STATUS_INCOMPLETE
&&(*itr)->HasAuraEffect(SPELL_TREE_DISGUISE,3) )
@@ -504,7 +503,7 @@ struct TRINITY_DLL_DECL npc_geezleAI : public ScriptedAI
if (!FlagList.empty())
{
- for(std::list<GameObject*>::iterator itr = FlagList.begin(); itr != FlagList.end(); ++itr)
+ for (std::list<GameObject*>::iterator itr = FlagList.begin(); itr != FlagList.end(); ++itr)
{
if (despawn)
{
diff --git a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp
index 261ed4a5ca0..53052f0f9e0 100644
--- a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp
@@ -84,14 +84,14 @@ struct TRINITY_DLL_DECL boss_meathookAI : public ScriptedAI
std::list<HostilReference*>::iterator itr;
int st=0;
- for(itr = m_threatlist.begin(); itr != m_threatlist.end(); ++itr)
+ for (itr = m_threatlist.begin(); itr != m_threatlist.end(); ++itr)
{
//st++;
m_creature->getThreatManager().
}
Unit* targets[st];
int st2=0;
- for(int i=1; i<=st; ++i){
+ for (int i=1; i<=st; ++i){
if (!IsWithinLOSInMap(targets[i])
st2++;
}
diff --git a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp
index 6984f287950..afb2759a9f9 100644
--- a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp
@@ -311,7 +311,7 @@ struct TRINITY_DLL_DECL npc_time_riftAI : public ScriptedAI
if (entry == C_WHELP)
{
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
DoSummonAtRift(entry);
}else DoSummonAtRift(entry);
}
diff --git a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp
index b6d08ee82d8..ac4de810a14 100644
--- a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp
@@ -192,7 +192,7 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance
if (!players.isEmpty())
{
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
if (Player* pPlayer = itr->getSource())
{
@@ -288,7 +288,6 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance
pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
-
if (Creature* pBoss = SummonedPortalBoss(pTemp))
{
if (pBoss->GetEntry() == C_AEONUS)
diff --git a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/boss_anetheron.cpp b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/boss_anetheron.cpp
index 96e56462385..b00e017e816 100644
--- a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/boss_anetheron.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/boss_anetheron.cpp
@@ -167,7 +167,7 @@ struct TRINITY_DLL_DECL boss_anetheronAI : public hyjal_trashAI
if (SleepTimer < diff)
{
- for(uint8 i=0;i<3; ++i)
+ for (uint8 i=0; i<3; ++i)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM,0,100,true))
target->CastSpell(target,SPELL_SLEEP,true);
diff --git a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp
index fa4c779d9b8..bcbacacbf90 100644
--- a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp
@@ -308,7 +308,7 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public hyjal_trashAI
std::list<Unit*> targets;
std::list<HostilReference*>::iterator itr = m_threatlist.begin();
- for(; itr != m_threatlist.end(); ++itr)
+ for (; itr != m_threatlist.end(); ++itr)
{
Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid());
if (pUnit && pUnit->isAlive())
diff --git a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/boss_kazrogal.cpp b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/boss_kazrogal.cpp
index d3f87daec28..e1d65ff90a4 100644
--- a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/boss_kazrogal.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/boss_kazrogal.cpp
@@ -153,7 +153,7 @@ struct TRINITY_DLL_DECL boss_kazrogalAI : public hyjal_trashAI
m_creature->CastCustomSpell(m_creature, SPELL_MARK, NULL, NULL, NULL, false, NULL, NULL, m_creature->GetGUID());
std::list<HostilReference *> t_list = m_creature->getThreatManager().getThreatList();
- for(std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
+ for (std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
Unit *target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
if (target && target->GetTypeId() == TYPEID_PLAYER && target->getPowerType() == POWER_MANA)
diff --git a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp
index eb6e72452c0..5c0ade83bb9 100644
--- a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp
@@ -43,7 +43,6 @@ EndContentData */
#define GOSSIP_ITEM_GM1 "[GM] Toggle Debug Timers"
-
CreatureAI* GetAI_npc_jaina_proudmoore(Creature* pCreature)
{
hyjalAI* ai = new hyjalAI(pCreature);
diff --git a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp
index e8bf7d8ceeb..94bce54f506 100644
--- a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp
@@ -58,7 +58,6 @@ float JainaDummySpawn[2][4]=
{5484.98, -2721.69, 1483.39, 6.00656}
};
-
// Locations for summoning waves in Horde base
float HordeBase[4][3]=
{
@@ -314,7 +313,7 @@ hyjalAI::hyjalAI(Creature *c) : npc_escortAI(c), Summons(m_creature)
pInstance = c->GetInstanceData();
VeinsSpawned[0] = false;
VeinsSpawned[1] = false;
- for(uint8 i=0;i<14; ++i)
+ for (uint8 i=0; i<14; ++i)
VeinGUID[i] = 0;
InfernalCount = 0;
TeleportTimer = 1000;
@@ -384,15 +383,12 @@ void hyjalAI::Reset()
bRetreat = false;
Debug = false;
-
//Flags
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
//Initialize spells
memset(Spell, 0, sizeof(Spell));
-
-
//Reset Instance Data for trash count
if (pInstance)
{
@@ -427,7 +423,7 @@ void hyjalAI::EnterEvadeMode()
void hyjalAI::EnterCombat(Unit *who)
{
if (IsDummy)return;
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
if (Spell[i].Cooldown)
SpellTimer[i] = Spell[i].Cooldown;
@@ -447,7 +443,7 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
uint32 random = rand()%4;
float SpawnLoc[3];
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
{
SpawnLoc[i] = Base[random][i];
}
@@ -540,7 +536,7 @@ void hyjalAI::SummonNextWave(Wave wave[18], uint32 Count, float Base[4][3])
InfernalCount = 0;//reset infernal count every new wave
EnemyCount = pInstance->GetData(DATA_TRASH);
- for(uint8 i = 0; i < 18; ++i)
+ for (uint8 i = 0; i < 18; ++i)
{
if (wave[Count].Mob[i])
SummonCreature(wave[Count].Mob[i], Base);
@@ -616,7 +612,7 @@ uint32 hyjalAI::GetInstanceData(uint32 Event)
void hyjalAI::Talk(uint32 id)
{
std::list<uint8> index;
- for(uint8 i = 0; i < 9; ++i)
+ for (uint8 i = 0; i < 9; ++i)
{
if (Faction == 0) // Alliance
{
@@ -760,7 +756,7 @@ void hyjalAI::UpdateAI(const uint32 diff)
m_creature->SetVisibility(VISIBILITY_OFF);
HideNearPos(m_creature->GetPositionX(), m_creature->GetPositionY());
HideNearPos(5037.76, -1889.71);
- for(uint8 i = 0; i < 92; ++i)//summon fires
+ for (uint8 i = 0; i < 92; ++i)//summon fires
m_creature->SummonGameObject(FLAMEOBJECT,AllianceFirePos[i][0],AllianceFirePos[i][1],AllianceFirePos[i][2],AllianceFirePos[i][3],AllianceFirePos[i][4],AllianceFirePos[i][5],AllianceFirePos[i][6],AllianceFirePos[i][7],0);
}
@@ -773,7 +769,7 @@ void hyjalAI::UpdateAI(const uint32 diff)
HideNearPos(m_creature->GetPositionX(), m_creature->GetPositionY());
HideNearPos(5563, -2763.19);
HideNearPos(5542.2, -2629.36);
- for(uint8 i = 0; i < 65; ++i)//summon fires
+ for (uint8 i = 0; i < 65; ++i)//summon fires
m_creature->SummonGameObject(FLAMEOBJECT,HordeFirePos[i][0],HordeFirePos[i][1],HordeFirePos[i][2],HordeFirePos[i][3],HordeFirePos[i][4],HordeFirePos[i][5],HordeFirePos[i][6],HordeFirePos[i][7],0);
}
@@ -850,7 +846,7 @@ void hyjalAI::UpdateAI(const uint32 diff)
if (CheckTimer < diff)
{
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
{
if (BossGUID[i])
{
@@ -882,7 +878,7 @@ void hyjalAI::UpdateAI(const uint32 diff)
if (!UpdateVictim())
return;
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
{
if (Spell[i].SpellId)
{
@@ -954,7 +950,7 @@ void hyjalAI::HideNearPos(float x, float y)
if (!creatures.empty())
{
- for(std::list<Creature*>::iterator itr = creatures.begin(); itr != creatures.end(); ++itr)
+ for (std::list<Creature*>::iterator itr = creatures.begin(); itr != creatures.end(); ++itr)
{
(*itr)->SetVisibility(VISIBILITY_OFF);
(*itr)->setFaction(35);//make them friendly so mobs won't attack them
@@ -1013,7 +1009,7 @@ void hyjalAI::WaypointReached(uint32 i)
if (!creatures.empty())
{
- for(std::list<Creature*>::iterator itr = creatures.begin(); itr != creatures.end(); ++itr)
+ for (std::list<Creature*>::iterator itr = creatures.begin(); itr != creatures.end(); ++itr)
{
if ((*itr) && (*itr)->isAlive() && (*itr) != m_creature && (*itr)->GetEntry() != JAINA)
{
@@ -1055,7 +1051,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
if (!creatures.empty())
{
- for(std::list<Creature*>::iterator itr = creatures.begin(); itr != creatures.end(); ++itr)
+ for (std::list<Creature*>::iterator itr = creatures.begin(); itr != creatures.end(); ++itr)
{
if ((*itr) && (*itr)->isAlive())
{
@@ -1079,10 +1075,10 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
switch(faction)
{
case 0://alliance
- for(uint8 i = 0; i < 92; ++i)//summon fires
+ for (uint8 i = 0; i < 92; ++i)//summon fires
m_creature->SummonGameObject(FLAMEOBJECT,AllianceFirePos[i][0],AllianceFirePos[i][1],AllianceFirePos[i][2],AllianceFirePos[i][3],AllianceFirePos[i][4],AllianceFirePos[i][5],AllianceFirePos[i][6],AllianceFirePos[i][7],0);
- for(uint8 i = 0; i < 25; ++i)//summon 25 ghouls
+ for (uint8 i = 0; i < 25; ++i)//summon 25 ghouls
{
uint8 r = rand()%4;
Creature* pUnit = m_creature->SummonCreature(GHOUL, AllianceBase[r][0]+irand(-15,15), AllianceBase[r][1]+irand(-15,15), AllianceBase[r][2], 0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000);
@@ -1094,7 +1090,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
pUnit->setActive(true);
}
}
- for(uint8 i = 0; i < 3; ++i)//summon 3 abominations
+ for (uint8 i = 0; i < 3; ++i)//summon 3 abominations
{
uint8 r = rand()%4;
Creature* pUnit = m_creature->SummonCreature(ABOMINATION, AllianceBase[r][0]+irand(-15,15), AllianceBase[r][1]+irand(-15,15), AllianceBase[r][2], 0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000);
@@ -1106,7 +1102,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
pUnit->setActive(true);
}
}
- for(uint8 i = 0; i < 5; ++i)//summon 5 gargoyles
+ for (uint8 i = 0; i < 5; ++i)//summon 5 gargoyles
{
Creature* pUnit = m_creature->SummonCreature(GARGOYLE, AllianceOverrunGargPos[i][0], AllianceOverrunGargPos[i][1], AllianceOverrunGargPos[i][2], AllianceOverrunGargPos[i][3], TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000);
if (pUnit)
@@ -1120,10 +1116,10 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
}
break;
case 1://horde
- for(uint8 i = 0; i < 65; ++i)//summon fires
+ for (uint8 i = 0; i < 65; ++i)//summon fires
m_creature->SummonGameObject(FLAMEOBJECT,HordeFirePos[i][0],HordeFirePos[i][1],HordeFirePos[i][2],HordeFirePos[i][3],HordeFirePos[i][4],HordeFirePos[i][5],HordeFirePos[i][6],HordeFirePos[i][7],0);
- for(uint8 i = 0; i < 26; ++i)//summon infernals
+ for (uint8 i = 0; i < 26; ++i)//summon infernals
{
Creature* pUnit = m_creature->SummonCreature(GIANT_INFERNAL, InfernalSPWP[i][0], InfernalSPWP[i][1], InfernalSPWP[i][2], InfernalSPWP[i][3], TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000);
if (pUnit)
@@ -1135,7 +1131,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
pUnit->setActive(true);
}
}
- for(uint8 i = 0; i < 25; ++i)//summon 25 ghouls
+ for (uint8 i = 0; i < 25; ++i)//summon 25 ghouls
{
uint8 r = rand()%4;
Creature* pUnit = m_creature->SummonCreature(GHOUL, HordeBase[r][0]+irand(-15,15), HordeBase[r][1]+irand(-15,15), HordeBase[r][2], 0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000);
@@ -1147,7 +1143,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
pUnit->setActive(true);
}
}
- for(uint8 i = 0; i < 5; ++i)//summon 5 abominations
+ for (uint8 i = 0; i < 5; ++i)//summon 5 abominations
{
uint8 r = rand()%4;
Creature* pUnit = m_creature->SummonCreature(ABOMINATION, HordeBase[r][0]+irand(-15,15), HordeBase[r][1]+irand(-15,15), HordeBase[r][2], 0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000);
diff --git a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjal_trash.cpp b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjal_trash.cpp
index 705039a6d09..9fb4ba90b19 100644
--- a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjal_trash.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjal_trash.cpp
@@ -179,7 +179,7 @@ void hyjal_trashAI::UpdateAI(const uint32 diff)
}
if (m_creature->GetEntry() == ABOMINATION)
{
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
AddWaypoint(i, AllianceWPs[i][0]+irand(-3,3), AllianceWPs[i][1]+irand(-3,3), AllianceWPs[i][2]);
switch(OverrunType)
{
@@ -228,7 +228,7 @@ void hyjal_trashAI::UpdateAI(const uint32 diff)
Start(true, true);
break;
default:
- for(uint8 i = 22; i < 36; ++i)
+ for (uint8 i = 22; i < 36; ++i)
AddWaypoint(i-18, AllianceOverrunWP[i][0]+irand(-3,3), AllianceOverrunWP[i][1]+irand(-3,3), AllianceOverrunWP[i][2]);
SetDespawnAtEnd(true);
@@ -239,7 +239,7 @@ void hyjal_trashAI::UpdateAI(const uint32 diff)
}
if (m_creature->GetEntry() == GHOUL)
{
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
AddWaypoint(i, AllianceWPs[i][0]+irand(-3,3), AllianceWPs[i][1]+irand(-3,3), AllianceWPs[i][2]);
switch(OverrunType)
{
@@ -301,7 +301,7 @@ void hyjal_trashAI::UpdateAI(const uint32 diff)
Start(true, true);
break;
default:
- for(uint8 i = 22; i < 36; ++i)
+ for (uint8 i = 22; i < 36; ++i)
AddWaypoint(i-18, AllianceOverrunWP[i][0]+irand(-3,3), AllianceOverrunWP[i][1]+irand(-3,3), AllianceOverrunWP[i][2]);
SetDespawnAtEnd(true);
LastOverronPos = 17;
@@ -314,7 +314,7 @@ void hyjal_trashAI::UpdateAI(const uint32 diff)
{
if (m_creature->GetEntry() == GHOUL)
{
- for(uint8 i = 0; i < 6; ++i)
+ for (uint8 i = 0; i < 6; ++i)
AddWaypoint(i, HordeWPs[i][0]+irand(-3,3), HordeWPs[i][1]+irand(-3,3), HordeWPs[i][2]);
switch(OverrunType)
{
@@ -339,7 +339,7 @@ void hyjal_trashAI::UpdateAI(const uint32 diff)
Start(true, true);
break;
default:
- for(uint8 i = 0; i < 16; ++i)
+ for (uint8 i = 0; i < 16; ++i)
AddWaypoint(i+6, HordeOverrunWP[i][0]+irand(-10,10), HordeOverrunWP[i][1]+irand(-10,10), HordeOverrunWP[i][2]);
SetDespawnAtEnd(true);
LastOverronPos = 21;
@@ -349,9 +349,9 @@ void hyjal_trashAI::UpdateAI(const uint32 diff)
}
if (m_creature->GetEntry() == ABOMINATION)
{
- for(uint8 i = 0; i < 6; ++i)
+ for (uint8 i = 0; i < 6; ++i)
AddWaypoint(i, HordeWPs[i][0]+irand(-10,10), HordeWPs[i][1]+irand(-10,10), HordeWPs[i][2]);
- for(uint8 i = 0; i < 16; ++i)
+ for (uint8 i = 0; i < 16; ++i)
AddWaypoint(i+6, HordeOverrunWP[i][0]+irand(-10,10), HordeOverrunWP[i][1]+irand(-10,10), HordeOverrunWP[i][2]);
SetDespawnAtEnd(true);
LastOverronPos = 21;
@@ -497,7 +497,6 @@ struct mob_giant_infernalAI : public hyjal_trashAI
}
};
-
CreatureAI* GetAI_mob_giant_infernal(Creature* pCreature)
{
return new mob_giant_infernalAI(pCreature);
@@ -593,7 +592,6 @@ struct mob_abominationAI : public hyjal_trashAI
}
};
-
CreatureAI* GetAI_mob_abomination(Creature* pCreature)
{
return new mob_abominationAI(pCreature);
@@ -693,7 +691,6 @@ struct mob_ghoulAI : public hyjal_trashAI
}
};
-
CreatureAI* GetAI_mob_ghoul(Creature* pCreature)
{
return new mob_ghoulAI(pCreature);
@@ -812,7 +809,6 @@ struct mob_necromancerAI : public hyjal_trashAI
}
};
-
CreatureAI* GetAI_mob_necromancer(Creature* pCreature)
{
return new mob_necromancerAI(pCreature);
@@ -913,7 +909,6 @@ struct mob_bansheeAI : public hyjal_trashAI
}
};
-
CreatureAI* GetAI_mob_banshee(Creature* pCreature)
{
return new mob_bansheeAI(pCreature);
@@ -999,7 +994,6 @@ struct mob_crypt_fiendAI : public hyjal_trashAI
}
};
-
CreatureAI* GetAI_mob_crypt_fiend(Creature* pCreature)
{
return new mob_crypt_fiendAI(pCreature);
@@ -1085,7 +1079,6 @@ struct mob_fel_stalkerAI : public hyjal_trashAI
}
};
-
CreatureAI* GetAI_mob_fel_stalker(Creature* pCreature)
{
return new mob_fel_stalkerAI(pCreature);
@@ -1196,7 +1189,6 @@ struct mob_frost_wyrmAI : public hyjal_trashAI
}
};
-
CreatureAI* GetAI_mob_frost_wyrm(Creature* pCreature)
{
return new mob_frost_wyrmAI(pCreature);
@@ -1330,7 +1322,6 @@ struct mob_gargoyleAI : public hyjal_trashAI
}
};
-
CreatureAI* GetAI_mob_gargoyle(Creature* pCreature)
{
return new mob_gargoyleAI(pCreature);
diff --git a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjal_trash.h b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjal_trash.h
index 17fdbad5fda..d2272b72c16 100644
--- a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjal_trash.h
+++ b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/hyjal_trash.h
@@ -32,4 +32,4 @@ struct TRINITY_DLL_DECL hyjal_trashAI : public npc_escortAI
//private:
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp
index 81b51507463..fc4c7485357 100644
--- a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp
@@ -61,7 +61,6 @@ struct TRINITY_DLL_DECL instance_mount_hyjal : public ScriptedInstance
uint32 Trash;
-
uint32 hordeRetreat;
uint32 allianceRetreat;
bool ArchiYell;
@@ -98,7 +97,7 @@ struct TRINITY_DLL_DECL instance_mount_hyjal : public ScriptedInstance
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) return true;
return false;
@@ -221,7 +220,7 @@ struct TRINITY_DLL_DECL instance_mount_hyjal : public ScriptedInstance
{
if (!m_uiAncientGemGUID.empty())
{
- for(std::list<uint64>::iterator itr = m_uiAncientGemGUID.begin(); itr != m_uiAncientGemGUID.end(); ++itr)
+ for (std::list<uint64>::iterator itr = m_uiAncientGemGUID.begin(); itr != m_uiAncientGemGUID.end(); ++itr)
{
//don't know how long it expected
DoRespawnGameObject(*itr,DAY);
@@ -302,7 +301,7 @@ struct TRINITY_DLL_DECL instance_mount_hyjal : public ScriptedInstance
OUT_LOAD_INST_DATA(in);
std::istringstream loadStream(in);
loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4] >> allianceRetreat >> hordeRetreat >> RaidDamage;
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as IN_PROGRESS - reset it instead.
m_auiEncounter[i] = NOT_STARTED;
OUT_LOAD_INST_DATA_COMPLETE;
diff --git a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp
index b8ec8f2e111..c8484765504 100644
--- a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp
@@ -64,7 +64,7 @@ struct TRINITY_DLL_DECL instance_old_hillsbrad : public ScriptedInstance
if (!players.isEmpty())
{
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
if (Player* plr = itr->getSource())
return plr;
@@ -81,7 +81,7 @@ struct TRINITY_DLL_DECL instance_old_hillsbrad : public ScriptedInstance
if (!players.isEmpty())
{
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
if (Player* pPlayer = itr->getSource())
pPlayer->KilledMonsterCredit(LODGE_QUEST_TRIGGER,0);
diff --git a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp
index 9fdd713e639..a3bfa20aee3 100644
--- a/src/bindings/scripts/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp
@@ -346,7 +346,7 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
Map::PlayerList const& players = pMap->GetPlayers();
if (!players.isEmpty() && pMap->IsDungeon())
{
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
if (Player* pPlayer = itr->getSource())
pPlayer->KilledMonsterCredit(20156,m_creature->GetGUID());
@@ -364,7 +364,6 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
}
}
-
void Reset()
{
LowHp = false;
diff --git a/src/bindings/scripts/scripts/kalimdor/moonglade.cpp b/src/bindings/scripts/scripts/kalimdor/moonglade.cpp
index 7e52c16b74d..fcbf822e4a0 100644
--- a/src/bindings/scripts/scripts/kalimdor/moonglade.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/moonglade.cpp
@@ -325,7 +325,7 @@ public:
return;
if (pPlayer->GetQuestStatus(10965) == QUEST_STATUS_INCOMPLETE)
{
- for(uint8 i = 0; i < 41; ++i)
+ for (uint8 i = 0; i < 41; ++i)
{
AddWaypoint(i, Clintar_spirit_WP[i][0], Clintar_spirit_WP[i][1], Clintar_spirit_WP[i][2], (uint32)Clintar_spirit_WP[i][4]);
}
diff --git a/src/bindings/scripts/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/src/bindings/scripts/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp
index 3c635526d2e..559d013e1f3 100644
--- a/src/bindings/scripts/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp
@@ -205,7 +205,7 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
{
InitialSpawn = false;
- for(uint32 i = 0; i < 10; ++i)
+ for (uint32 i = 0; i < 10; ++i)
{
uint32 random = rand()%4;
Creature* Whelp = m_creature->SummonCreature(CREATURE_WHELP, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
@@ -265,7 +265,7 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
if (Phase == 2)
{
uint32 max = rand()%10;
- for(uint32 i = 0; i < max; ++i)
+ for (uint32 i = 0; i < max; ++i)
{
uint32 random = rand()%3;
Creature* Whelp = m_creature->SummonCreature(CREATURE_WHELP, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
@@ -279,7 +279,7 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
uint32 max = rand() % 10 +1;
if (max < 5)
{
- for(uint32 i = 0; i < max; ++i)
+ for (uint32 i = 0; i < max; ++i)
{
uint32 random = rand()%4;
Creature* Whelp = m_creature->SummonCreature(CREATURE_WHELP, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
diff --git a/src/bindings/scripts/scripts/kalimdor/razorfen_kraul/def_razorfen_kraul.h b/src/bindings/scripts/scripts/kalimdor/razorfen_kraul/def_razorfen_kraul.h
index d40abd7f2fd..e2219986f63 100644
--- a/src/bindings/scripts/scripts/kalimdor/razorfen_kraul/def_razorfen_kraul.h
+++ b/src/bindings/scripts/scripts/kalimdor/razorfen_kraul/def_razorfen_kraul.h
@@ -18,4 +18,4 @@
#define DEF_RAZORFEN_KRAUL_H
#define TYPE_WARD_KEEPERS 1
-#endif \ No newline at end of file
+#endif
diff --git a/src/bindings/scripts/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp b/src/bindings/scripts/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp
index ed139ea45e9..4937e16d711 100644
--- a/src/bindings/scripts/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp
@@ -24,7 +24,6 @@ EndScriptData */
#include "precompiled.h"
#include "def_razorfen_kraul.h"
-
#define WARD_KEEPERS_NR 2
struct TRINITY_DLL_DECL instance_razorfen_kraul : public ScriptedInstance
@@ -48,7 +47,7 @@ struct TRINITY_DLL_DECL instance_razorfen_kraul : public ScriptedInstance
if (!players.isEmpty())
{
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
if (Player* plr = itr->getSource())
return plr;
@@ -102,4 +101,4 @@ void AddSC_instance_razorfen_kraul()
newscript->Name = "instance_razorfen_kraul";
newscript->GetInstanceData = &GetInstanceData_instance_razorfen_kraul;
newscript->RegisterSelf();
-} \ No newline at end of file
+}
diff --git a/src/bindings/scripts/scripts/kalimdor/silithus.cpp b/src/bindings/scripts/scripts/kalimdor/silithus.cpp
index 45313fbbc73..2f62a8c5ca6 100644
--- a/src/bindings/scripts/scripts/kalimdor/silithus.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/silithus.cpp
@@ -919,7 +919,7 @@ struct TRINITY_DLL_DECL npc_anachronos_quest_triggerAI : public ScriptedAI
uint8 KaldoreiSoldierCount = 0;
uint8 AnubisathConquerorCount = 0;
uint8 QirajiWaspCount = 0;
- for(uint8 i = 0; i < 67; ++i)
+ for (uint8 i = 0; i < 67; ++i)
{
Creature* Spawn = NULL;
float X = SpawnLocation[locIndex + i].x;
@@ -967,7 +967,7 @@ struct TRINITY_DLL_DECL npc_anachronos_quest_triggerAI : public ScriptedAI
const Group::MemberSlotList members = EventGroup->GetMemberSlots();
- for(Group::member_citerator itr = members.begin(); itr!= members.end(); itr++)
+ for (Group::member_citerator itr = members.begin(); itr!= members.end(); itr++)
{
GroupMember = (Unit::GetPlayer(itr->guid));
if(!GroupMember)
diff --git a/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp b/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp
index d8ce45872e5..bd8888f4981 100644
--- a/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp
@@ -235,7 +235,7 @@ struct TRINITY_DLL_DECL boss_yaujAI : public ScriptedAI
pInstance->SetData(DATA_BUG_TRIO_DEATH, 1);
}
- for(uint8 i = 0; i < 10; ++i)
+ for (uint8 i = 0; i < 10; ++i)
{
Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0);
Creature* Summoned = m_creature->SummonCreature(15621,m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(),0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,90000);
diff --git a/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp
index 541d16b7f2b..f9de19ff92f 100644
--- a/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp
@@ -567,7 +567,7 @@ struct TRINITY_DLL_DECL cthunAI : public ScriptedAI
if (!PlayerList.isEmpty())
{
- for(Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
{
if (Player* pPlr = itr->getSource())
pPlr->PlayDirectSound(RANDOM_SOUND_WHISPER,pPlr);
diff --git a/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp b/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp
index 0494cc2fdd1..57c9b302d0d 100644
--- a/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp
@@ -35,7 +35,6 @@ EndScriptData */
#define SPELL_WHIRLWINDADD 26038
#define SPELL_KNOCKBACK 26027
-
struct TRINITY_DLL_DECL boss_sarturaAI : public ScriptedAI
{
boss_sarturaAI(Creature *c) : ScriptedAI(c) {}
diff --git a/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp
index 72dfcdb08f3..b049fe25fa1 100644
--- a/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp
@@ -320,7 +320,7 @@ struct TRINITY_DLL_DECL boss_twinemperorsAI : public ScriptedAI
Creature *nearb = NULL;
- for(std::list<Creature*>::iterator iter = lUnitList.begin(); iter != lUnitList.end(); ++iter)
+ for (std::list<Creature*>::iterator iter = lUnitList.begin(); iter != lUnitList.end(); ++iter)
{
Creature *c = *iter;
if (c)
diff --git a/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp
index 04e31d7eebd..922c4b1454a 100644
--- a/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp
@@ -157,7 +157,7 @@ struct TRINITY_DLL_DECL aqsentinelAI : public ScriptedAI
if (assistList.empty())
return;
- for(std::list<Creature*>::iterator iter = assistList.begin(); iter != assistList.end(); ++iter)
+ for (std::list<Creature*>::iterator iter = assistList.begin(); iter != assistList.end(); ++iter)
AddBuddyToList((*iter));
}
@@ -263,7 +263,7 @@ struct TRINITY_DLL_DECL aqsentinelAI : public ScriptedAI
Unit *GetHatedManaUser()
{
std::list<HostilReference*>::iterator i;
- for (i = m_creature->getThreatManager().getThreatList().begin();i != m_creature->getThreatManager().getThreatList().end(); ++i)
+ for (i = m_creature->getThreatManager().getThreatList().begin(); i != m_creature->getThreatManager().getThreatList().end(); ++i)
{
Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid());
if (pUnit->getPowerType()==POWER_MANA)
diff --git a/src/bindings/scripts/scripts/kalimdor/the_barrens.cpp b/src/bindings/scripts/scripts/kalimdor/the_barrens.cpp
index 70e0b3e5e28..bf658ca97b2 100644
--- a/src/bindings/scripts/scripts/kalimdor/the_barrens.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/the_barrens.cpp
@@ -327,7 +327,7 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
Wave = 0;
PlayerGUID = 0;
- for(uint8 i = 0; i < 6; ++i)
+ for (uint8 i = 0; i < 6; ++i)
{
AffrayChallenger[i] = 0;
Challenger_down[i] = false;
@@ -366,7 +366,7 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
DoScriptText(SAY_TWIGGY_FLATHEAD_DOWN, m_creature);
pWarrior->FailQuest(1719);
- for(uint8 i = 0; i < 6; ++i)
+ for (uint8 i = 0; i < 6; ++i)
{
if (AffrayChallenger[i])
{
@@ -407,7 +407,7 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
pWarrior->AreaExploredOrEventHappens(1719);
DoScriptText(SAY_TWIGGY_FLATHEAD_BEGIN, m_creature);
- for(uint8 i = 0; i < 6; ++i)
+ for (uint8 i = 0; i < 6; ++i)
{
Creature* pCreature = m_creature->SummonCreature(AFFRAY_CHALLENGER, AffrayChallengerLoc[i][0], AffrayChallengerLoc[i][1], AffrayChallengerLoc[i][2], AffrayChallengerLoc[i][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000);
if (!pCreature)
@@ -427,7 +427,7 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI
{
if (Challenger_checker < diff)
{
- for(uint8 i = 0; i < 6; ++i)
+ for (uint8 i = 0; i < 6; ++i)
{
if (AffrayChallenger[i])
{
diff --git a/src/bindings/scripts/scripts/kalimdor/thousand_needles.cpp b/src/bindings/scripts/scripts/kalimdor/thousand_needles.cpp
index 9616aa4acf6..d8a7f3a91db 100644
--- a/src/bindings/scripts/scripts/kalimdor/thousand_needles.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/thousand_needles.cpp
@@ -68,7 +68,7 @@ struct TRINITY_DLL_DECL npc_kanatiAI : public npc_escortAI
void DoSpawnGalak()
{
- for(int i = 0; i < 3; ++i)
+ for (int i = 0; i < 3; ++i)
m_creature->SummonCreature(NPC_GALAK_ASS,
m_afGalakLoc[0], m_afGalakLoc[1], m_afGalakLoc[2], 0.0f,
TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
@@ -157,7 +157,7 @@ struct TRINITY_DLL_DECL npc_lakota_windsongAI : public npc_escortAI
void DoSpawnBandits(int uiAmbushId)
{
- for(int i = 0; i < 2; ++i)
+ for (int i = 0; i < 2; ++i)
m_creature->SummonCreature(NPC_GRIM_BANDIT,
m_afBanditLoc[i+uiAmbushId][0], m_afBanditLoc[i+uiAmbushId][1], m_afBanditLoc[i+uiAmbushId][2], 0.0f,
TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
@@ -230,7 +230,7 @@ struct TRINITY_DLL_DECL npc_paoka_swiftmountainAI : public npc_escortAI
void DoSpawnWyvern()
{
- for(int i = 0; i < 3; ++i)
+ for (int i = 0; i < 3; ++i)
m_creature->SummonCreature(NPC_WYVERN,
m_afWyvernLoc[i][0], m_afWyvernLoc[i][1], m_afWyvernLoc[i][2], 0.0f,
TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
diff --git a/src/bindings/scripts/scripts/kalimdor/ungoro_crater.cpp b/src/bindings/scripts/scripts/kalimdor/ungoro_crater.cpp
index eac657fd727..ac717892794 100644
--- a/src/bindings/scripts/scripts/kalimdor/ungoro_crater.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/ungoro_crater.cpp
@@ -44,7 +44,6 @@ EndContentData */
#define ENTRY_TARLORD1 6519
#define ENTRY_STOMPER 6513
-
struct TRINITY_DLL_DECL npc_ameAI : public npc_escortAI
{
npc_ameAI(Creature *c) : npc_escortAI(c) {}
diff --git a/src/bindings/scripts/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp b/src/bindings/scripts/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp
index d955226e1c3..480272c6376 100644
--- a/src/bindings/scripts/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp
@@ -118,7 +118,7 @@ struct TRINITY_DLL_DECL instance_wailing_caverns : public ScriptedInstance
loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]
>> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8];
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] != DONE)
m_auiEncounter[i] = NOT_STARTED;
@@ -139,4 +139,4 @@ void AddSC_instance_wailing_caverns()
newscript->Name = "instance_wailing_caverns";
newscript->GetInstanceData = &GetInstanceData_instance_wailing_caverns;
newscript->RegisterSelf();
-} \ No newline at end of file
+}
diff --git a/src/bindings/scripts/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp b/src/bindings/scripts/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp
index d734e32d13b..4985746d8fc 100644
--- a/src/bindings/scripts/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp
@@ -261,7 +261,7 @@ struct TRINITY_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI
if (pMap && pMap->IsDungeon())
{
Map::PlayerList const &players = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievWC);
}
}
diff --git a/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_elder_nadox.cpp b/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_elder_nadox.cpp
index 35827c0aac1..0621aa34844 100644
--- a/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_elder_nadox.cpp
+++ b/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_elder_nadox.cpp
@@ -69,7 +69,6 @@ struct TRINITY_DLL_DECL boss_elder_nadoxAI : public ScriptedAI
uint32 guard_spawn_Timer;
uint32 enrage_Timer;
-
ScriptedInstance *pInstance;
void Reset()
@@ -116,7 +115,7 @@ struct TRINITY_DLL_DECL boss_elder_nadoxAI : public ScriptedAI
if (pMap && pMap->IsDungeon())
{
Map::PlayerList const &players = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievRespectYourElders);
}
}
diff --git a/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_herald_volazj.cpp b/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_herald_volazj.cpp
index 33c3ba42011..72023225dbe 100644
--- a/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_herald_volazj.cpp
+++ b/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_herald_volazj.cpp
@@ -131,7 +131,7 @@ struct TRINITY_DLL_DECL boss_volazjAI : public ScriptedAI
if (HeroicMode && uiEncounterTimer < 120000 && pMap && pMap->IsDungeon() && AchievQuickDemise)
{
Map::PlayerList const &players = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievQuickDemise);
}
}
diff --git a/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_prince_taldaram.cpp b/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_prince_taldaram.cpp
index b6b1ac586eb..7f124077f86 100644
--- a/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_prince_taldaram.cpp
+++ b/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/boss_prince_taldaram.cpp
@@ -212,7 +212,7 @@ struct TRINITY_DLL_DECL boss_taldaramAI : public ScriptedAI
Unit *target = NULL;
std::list<HostilReference *> t_list = m_creature->getThreatManager().getThreatList();
std::vector<Unit *> target_list;
- for(std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
+ for (std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
// exclude pets & totems
@@ -268,10 +268,10 @@ struct TRINITY_DLL_DECL boss_taldaramAI : public ScriptedAI
{
Map::PlayerList const &players = pMap->GetPlayers();
uint8 count = 0;
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
++count;
if (count < 5)
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievThePartyIsOver);
}
}
diff --git a/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/instance_ahnkahet.cpp b/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/instance_ahnkahet.cpp
index c8a0fc22c3c..f682368c4f8 100644
--- a/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/instance_ahnkahet.cpp
+++ b/src/bindings/scripts/scripts/northrend/azjol_nerub/ahnkahet/instance_ahnkahet.cpp
@@ -61,7 +61,7 @@ struct TRINITY_DLL_DECL instance_ahnkahet : public ScriptedInstance
Herald_Volazj =0;
Amanitar =0;
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
m_auiEncounter[i] = NOT_STARTED;
spheres[0] = NOT_STARTED;
spheres[1] = NOT_STARTED;
@@ -69,13 +69,12 @@ struct TRINITY_DLL_DECL instance_ahnkahet : public ScriptedInstance
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) return true;
return false;
}
-
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch(pCreature->GetEntry())
@@ -217,7 +216,7 @@ struct TRINITY_DLL_DECL instance_ahnkahet : public ScriptedInstance
m_auiEncounter[3] = data3;
m_auiEncounter[4] = data4;
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS)
m_auiEncounter[i] = NOT_STARTED;
diff --git a/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp b/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp
index 377a9d58c8f..abb4fc6c7cb 100644
--- a/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp
+++ b/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp
@@ -154,7 +154,6 @@ struct TRINITY_DLL_DECL boss_krik_thirAI : public ScriptedAI
if (!UpdateVictim())
return;
-
if(SummonTimer < diff)
{
Summon();
@@ -201,7 +200,7 @@ struct TRINITY_DLL_DECL boss_krik_thirAI : public ScriptedAI
HeroicMode && pMap && pMap->IsDungeon() && AchievWatchHimDie)
{
Map::PlayerList const &players = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievWatchHimDie);
}
}
@@ -357,7 +356,6 @@ struct TRINITY_DLL_DECL npc_watcher_gashraAI : public ScriptedAI
InfectedBiteTimer = 4000;
}
-
void EnterCombat(Unit* who)
{
m_creature->CastSpell(m_creature,SPELL_ENRAGE,true);
@@ -513,7 +511,6 @@ CreatureAI* GetAI_npc_watcher_silthik (Creature* pCreature)
return new npc_watcher_silthikAI (pCreature);
}
-
void AddSC_boss_krik_thir()
{
Script *newscript;
diff --git a/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/instance_azjol_nerub.cpp b/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/instance_azjol_nerub.cpp
index d06335bdbd3..87d0b854821 100644
--- a/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/instance_azjol_nerub.cpp
+++ b/src/bindings/scripts/scripts/northrend/azjol_nerub/azjol_nerub/instance_azjol_nerub.cpp
@@ -64,13 +64,12 @@ struct TRINITY_DLL_DECL instance_azjol_nerub : public ScriptedInstance
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) return true;
return false;
}
-
void OnCreatureCreate(Creature* pCreature, bool add)
{
switch(pCreature->GetEntry())
@@ -182,7 +181,7 @@ struct TRINITY_DLL_DECL instance_azjol_nerub : public ScriptedInstance
m_auiEncounter[1] = data1;
m_auiEncounter[2] = data2;
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS)
m_auiEncounter[i] = NOT_STARTED;
diff --git a/src/bindings/scripts/scripts/northrend/draktharon_keep/boss_novos.cpp b/src/bindings/scripts/scripts/northrend/draktharon_keep/boss_novos.cpp
index 2f07378c992..963e42f82aa 100644
--- a/src/bindings/scripts/scripts/northrend/draktharon_keep/boss_novos.cpp
+++ b/src/bindings/scripts/scripts/northrend/draktharon_keep/boss_novos.cpp
@@ -170,7 +170,7 @@ struct TRINITY_DLL_DECL boss_novosAI : public Scripted_NoMovementAI
if (pMap && pMap->IsDungeon())
{
Map::PlayerList const &players = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievOhNovos);
}
}
diff --git a/src/bindings/scripts/scripts/northrend/draktharon_keep/instance_drak_tharon_keep.cpp b/src/bindings/scripts/scripts/northrend/draktharon_keep/instance_drak_tharon_keep.cpp
index 4b498223838..75eee1caba2 100644
--- a/src/bindings/scripts/scripts/northrend/draktharon_keep/instance_drak_tharon_keep.cpp
+++ b/src/bindings/scripts/scripts/northrend/draktharon_keep/instance_drak_tharon_keep.cpp
@@ -41,7 +41,7 @@ struct TRINITY_DLL_DECL instance_drak_tharon : public ScriptedInstance
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) return true;
return false;
@@ -177,7 +177,7 @@ struct TRINITY_DLL_DECL instance_drak_tharon : public ScriptedInstance
m_auiEncounter[2] = data2;
m_auiEncounter[3] = data3;
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS)
m_auiEncounter[i] = NOT_STARTED;
}else OUT_LOAD_INST_DATA_FAIL;
diff --git a/src/bindings/scripts/scripts/northrend/gundrak/boss_moorabi.cpp b/src/bindings/scripts/scripts/northrend/gundrak/boss_moorabi.cpp
index a352310a78d..d16d86ab4b9 100644
--- a/src/bindings/scripts/scripts/northrend/gundrak/boss_moorabi.cpp
+++ b/src/bindings/scripts/scripts/northrend/gundrak/boss_moorabi.cpp
@@ -151,7 +151,7 @@ struct TRINITY_DLL_DECL boss_moorabiAI : public ScriptedAI
if (pMap && pMap->IsDungeon())
{
Map::PlayerList const &players = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievLessRabi);
}
}
diff --git a/src/bindings/scripts/scripts/northrend/gundrak/boss_slad_ran.cpp b/src/bindings/scripts/scripts/northrend/gundrak/boss_slad_ran.cpp
index 95f74af7e35..7a2da670478 100644
--- a/src/bindings/scripts/scripts/northrend/gundrak/boss_slad_ran.cpp
+++ b/src/bindings/scripts/scripts/northrend/gundrak/boss_slad_ran.cpp
@@ -130,10 +130,10 @@ struct TRINITY_DLL_DECL boss_slad_ranAI : public ScriptedAI
if(uiSpawnTimer < diff)
{
if (uiPhase == 1)
- for (uint8 i = 0;i < (HeroicMode ? 5 : 3); ++i)
+ for (uint8 i = 0; i < (HeroicMode ? 5 : 3); ++i)
m_creature->SummonCreature(CREATURE_SNAKE, SpawnLoc[i].x, SpawnLoc[i].y, SpawnLoc[i].z, SpawnLoc[i].orientation, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000);
if (uiPhase == 2)
- for (uint8 i = 0;i < (HeroicMode ? 5 : 3); ++i)
+ for (uint8 i = 0; i < (HeroicMode ? 5 : 3); ++i)
m_creature->SummonCreature(CREATURE_CONSTRICTORS, SpawnLoc[i].x, SpawnLoc[i].y, SpawnLoc[i].z, SpawnLoc[i].orientation, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000);
uiSpawnTimer = 5000;
} else uiSpawnTimer -= diff;
diff --git a/src/bindings/scripts/scripts/northrend/gundrak/instance_gundrak.cpp b/src/bindings/scripts/scripts/northrend/gundrak/instance_gundrak.cpp
index 3b8dd7edea2..9a7a6b7a97d 100644
--- a/src/bindings/scripts/scripts/northrend/gundrak/instance_gundrak.cpp
+++ b/src/bindings/scripts/scripts/northrend/gundrak/instance_gundrak.cpp
@@ -71,7 +71,7 @@ struct TRINITY_DLL_DECL instance_gundrak : public ScriptedInstance
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) return true;
return false;
@@ -260,7 +260,7 @@ struct TRINITY_DLL_DECL instance_gundrak : public ScriptedInstance
m_auiEncounter[3] = data3;
m_auiEncounter[4] = data4;
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS)
m_auiEncounter[i] = NOT_STARTED;
}else OUT_LOAD_INST_DATA_FAIL;
diff --git a/src/bindings/scripts/scripts/northrend/howling_fjord.cpp b/src/bindings/scripts/scripts/northrend/howling_fjord.cpp
index cabb00d748f..27ba213e798 100644
--- a/src/bindings/scripts/scripts/northrend/howling_fjord.cpp
+++ b/src/bindings/scripts/scripts/northrend/howling_fjord.cpp
@@ -158,7 +158,6 @@ struct TRINITY_DLL_DECL npc_plaguehound_trackerAI : public npc_escortAI
{
npc_plaguehound_trackerAI(Creature* pCreature) : npc_escortAI(pCreature) { }
-
void Reset()
{
InitScriptData();
diff --git a/src/bindings/scripts/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/src/bindings/scripts/scripts/northrend/naxxramas/boss_four_horsemen.cpp
index a39e76a24b6..b051b956e66 100644
--- a/src/bindings/scripts/scripts/northrend/naxxramas/boss_four_horsemen.cpp
+++ b/src/bindings/scripts/scripts/northrend/naxxramas/boss_four_horsemen.cpp
@@ -60,7 +60,7 @@ struct TRINITY_DLL_DECL boss_four_horsemenAI : public BossAI
boss_four_horsemenAI(Creature *c) : BossAI(c, BOSS_HORSEMEN)
{
id = Horsemen(0);
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
if (me->GetEntry() == MOB_HORSEMEN[i])
id = Horsemen(i);
caster = (id == HORSEMEN_LADY || id == HORSEMEN_SIR);
diff --git a/src/bindings/scripts/scripts/northrend/naxxramas/boss_gluth.cpp b/src/bindings/scripts/scripts/northrend/naxxramas/boss_gluth.cpp
index ed38cbe62c4..2e121e54b1a 100644
--- a/src/bindings/scripts/scripts/northrend/naxxramas/boss_gluth.cpp
+++ b/src/bindings/scripts/scripts/northrend/naxxramas/boss_gluth.cpp
@@ -72,7 +72,7 @@ struct TRINITY_DLL_DECL boss_gluthAI : public BossAI
void EnterCombat(Unit *who)
{
- for(uint32 i = 0; i < 3; ++i)
+ for (uint32 i = 0; i < 3; ++i)
if (Creature *trigger = DoSummon(WORLD_TRIGGER, PosSummon[i]))
triggers.push_back(trigger);
if (triggers.size() < 3)
@@ -126,7 +126,7 @@ struct TRINITY_DLL_DECL boss_gluthAI : public BossAI
DoCast(me, SPELL_BERSERK);
return;
case EVENT_SUMMON:
- for(uint32 i = 0; i < HEROIC(1,2); ++i)
+ for (uint32 i = 0; i < HEROIC(1,2); ++i)
DoSummon(MOB_ZOMBIE, triggers[rand()%3]);
events.ScheduleEvent(EVENT_SUMMON, 10000);
return;
diff --git a/src/bindings/scripts/scripts/northrend/naxxramas/boss_gothik.cpp b/src/bindings/scripts/scripts/northrend/naxxramas/boss_gothik.cpp
index 647c62a32eb..aa67e6edeb2 100644
--- a/src/bindings/scripts/scripts/northrend/naxxramas/boss_gothik.cpp
+++ b/src/bindings/scripts/scripts/northrend/naxxramas/boss_gothik.cpp
@@ -120,10 +120,10 @@ struct TRINITY_DLL_DECL boss_gothikAI : public BossAI
void EnterCombat(Unit *who)
{
- for(uint32 i = 0; i < POS_LIVE; ++i)
+ for (uint32 i = 0; i < POS_LIVE; ++i)
if (Creature *trigger = DoSummon(WORLD_TRIGGER, PosSummonLive[i]))
liveTrigger.push_back(trigger);
- for(uint32 i = 0; i < POS_DEAD; ++i)
+ for (uint32 i = 0; i < POS_DEAD; ++i)
if (Creature *trigger = DoSummon(WORLD_TRIGGER, PosSummonDead[i]))
deadTrigger.push_back(trigger);
@@ -160,7 +160,7 @@ struct TRINITY_DLL_DECL boss_gothikAI : public BossAI
{
if (summon->GetEntry() == WORLD_TRIGGER)
{
- //for(TriggerVct::iterator itr = liveTrigger.begin(); itr != liveTrigger.end(); ++itr)
+ //for (TriggerVct::iterator itr = liveTrigger.begin(); itr != liveTrigger.end(); ++itr)
// if(*itr == summon)
error_log("boss_gothikAI: trigger is despawned!");
EnterEvadeMode();
@@ -231,7 +231,7 @@ struct TRINITY_DLL_DECL boss_gothikAI : public BossAI
case EVENT_SUMMON:
if (waves[waveCount].entry)
{
- for(uint32 i = 0; i < waves[waveCount].number; ++i)
+ for (uint32 i = 0; i < waves[waveCount].number; ++i)
DoSummon(waves[waveCount].entry, liveTrigger[rand()%POS_LIVE], 1.0f);
events.ScheduleEvent(EVENT_SUMMON, waves[waveCount].time);
++waveCount;
@@ -312,7 +312,7 @@ struct TRINITY_DLL_DECL mob_gothik_minionAI : public CombatAI
if (pMap->IsDungeon())
{
Map::PlayerList const &PlayerList = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
+ for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
if (i->getSource()->isAlive() && SIDE_CHECK(i->getSource()))
{
diff --git a/src/bindings/scripts/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/src/bindings/scripts/scripts/northrend/naxxramas/boss_kelthuzad.cpp
index 2e395ecec03..e5b86e59193 100644
--- a/src/bindings/scripts/scripts/northrend/naxxramas/boss_kelthuzad.cpp
+++ b/src/bindings/scripts/scripts/northrend/naxxramas/boss_kelthuzad.cpp
@@ -236,7 +236,7 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public BossAI
{
std::vector<Unit*> unitList;
std::list<HostilReference*> *threatList = &me->getThreatManager().getThreatList();
- for(std::list<HostilReference*>::const_iterator itr = threatList->begin(); itr != threatList->end(); ++itr)
+ for (std::list<HostilReference*>::const_iterator itr = threatList->begin(); itr != threatList->end(); ++itr)
{
if ((*itr)->getTarget()->GetTypeId() == TYPEID_PLAYER
&& (*itr)->getTarget()->getPowerType() == POWER_MANA
diff --git a/src/bindings/scripts/scripts/northrend/naxxramas/boss_maexxna.cpp b/src/bindings/scripts/scripts/northrend/naxxramas/boss_maexxna.cpp
index ff84d1077e4..f1209f3f948 100644
--- a/src/bindings/scripts/scripts/northrend/naxxramas/boss_maexxna.cpp
+++ b/src/bindings/scripts/scripts/northrend/naxxramas/boss_maexxna.cpp
@@ -74,7 +74,7 @@ struct TRINITY_DLL_DECL boss_maexxnaAI : public BossAI
switch(eventId)
{
case EVENT_WRAP:
- for(uint32 i = 0; i < HEROIC(1,2); ++i)
+ for (uint32 i = 0; i < HEROIC(1,2); ++i)
{
if (Unit *target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0, true, -SPELL_WEB_WRAP))
{
@@ -105,7 +105,7 @@ struct TRINITY_DLL_DECL boss_maexxnaAI : public BossAI
case EVENT_SUMMON:
{
uint32 amount = 8+rand()%2;
- for(uint32 i = 0; i < amount; ++i)
+ for (uint32 i = 0; i < amount; ++i)
DoSummon(MOB_SPIDERLING, me);
events.ScheduleEvent(EVENT_SUMMON, 40000);
break;
diff --git a/src/bindings/scripts/scripts/northrend/naxxramas/boss_noth.cpp b/src/bindings/scripts/scripts/northrend/naxxramas/boss_noth.cpp
index c4ba86a91d6..911ca8a39f7 100644
--- a/src/bindings/scripts/scripts/northrend/naxxramas/boss_noth.cpp
+++ b/src/bindings/scripts/scripts/northrend/naxxramas/boss_noth.cpp
@@ -120,7 +120,7 @@ struct TRINITY_DLL_DECL boss_nothAI : public BossAI
void SummonUndead(uint32 entry, uint32 num)
{
- for(uint32 i = 0; i < num; ++i)
+ for (uint32 i = 0; i < num; ++i)
{
uint32 pos = rand()%MAX_SUMMON_POS;
me->SummonCreature(entry, SummonPos[pos][0], SummonPos[pos][1], SummonPos[pos][2],
diff --git a/src/bindings/scripts/scripts/northrend/naxxramas/boss_patchwerk.cpp b/src/bindings/scripts/scripts/northrend/naxxramas/boss_patchwerk.cpp
index 5077f0267ed..3686d859bc8 100644
--- a/src/bindings/scripts/scripts/northrend/naxxramas/boss_patchwerk.cpp
+++ b/src/bindings/scripts/scripts/northrend/naxxramas/boss_patchwerk.cpp
@@ -64,7 +64,7 @@ struct TRINITY_DLL_DECL boss_patchwerkAI : public BossAI
if(pMap && pMap->IsDungeon())
{
Map::PlayerList const &players = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievMakeQuickWerkOfHim);
}
}
@@ -101,7 +101,7 @@ struct TRINITY_DLL_DECL boss_patchwerkAI : public BossAI
uint32 MostHP = 0;
Unit* pMostHPTarget = NULL;
std::list<HostilReference*>::iterator i = me->getThreatManager().getThreatList().begin();
- for(; i != me->getThreatManager().getThreatList().end(); ++i)
+ for (; i != me->getThreatManager().getThreatList().end(); ++i)
{
Unit* target = (*i)->getTarget();
if (target->isAlive() && target->GetHealth() > MostHP && me->IsWithinMeleeRange(target))
diff --git a/src/bindings/scripts/scripts/northrend/naxxramas/boss_sapphiron.cpp b/src/bindings/scripts/scripts/northrend/naxxramas/boss_sapphiron.cpp
index e5fb1c6463a..e460627d648 100644
--- a/src/bindings/scripts/scripts/northrend/naxxramas/boss_sapphiron.cpp
+++ b/src/bindings/scripts/scripts/northrend/naxxramas/boss_sapphiron.cpp
@@ -149,7 +149,7 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public BossAI
if(pMap && pMap->IsDungeon())
{
Map::PlayerList const &players = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievTheHundredClub);
}
}
@@ -176,7 +176,7 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public BossAI
if(CanTheHundredClub && pMap && pMap->IsDungeon())
{
Map::PlayerList const &players = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
if(itr->getSource()->GetResistance(SPELL_SCHOOL_FROST) > MAX_FROST_RESISTANCE)
{
@@ -201,7 +201,7 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public BossAI
void ClearIceBlock()
{
- for(IceBlockMap::iterator itr = iceblocks.begin(); itr != iceblocks.end(); ++itr)
+ for (IceBlockMap::iterator itr = iceblocks.begin(); itr != iceblocks.end(); ++itr)
{
if (Player* pPlayer = Unit::GetPlayer(itr->first))
pPlayer->RemoveAura(SPELL_ICEBOLT);
@@ -291,7 +291,7 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public BossAI
{
std::vector<Unit*> targets;
std::list<HostilReference*>::iterator i = me->getThreatManager().getThreatList().begin();
- for(; i != me->getThreatManager().getThreatList().end(); ++i)
+ for (; i != me->getThreatManager().getThreatList().end(); ++i)
if ((*i)->getTarget()->GetTypeId() == TYPEID_PLAYER && !(*i)->getTarget()->HasAura(SPELL_ICEBOLT))
targets.push_back((*i)->getTarget());
@@ -348,7 +348,7 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public BossAI
DoZoneInCombat(); // make sure everyone is in threatlist
std::vector<Unit*> targets;
std::list<HostilReference*>::iterator i = me->getThreatManager().getThreatList().begin();
- for(; i != me->getThreatManager().getThreatList().end(); ++i)
+ for (; i != me->getThreatManager().getThreatList().end(); ++i)
{
Unit *target = (*i)->getTarget();
if (target->GetTypeId() != TYPEID_PLAYER)
@@ -361,7 +361,7 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public BossAI
continue;
}
- for(IceBlockMap::iterator itr = iceblocks.begin(); itr != iceblocks.end(); ++itr)
+ for (IceBlockMap::iterator itr = iceblocks.begin(); itr != iceblocks.end(); ++itr)
{
if (GameObject* pGo = GameObject::GetGameObject(*me, itr->second))
{
@@ -378,7 +378,7 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public BossAI
me->CastSpell(me, SPELL_FROST_EXPLOSION, true);
- for(std::vector<Unit*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
+ for (std::vector<Unit*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
(*itr)->ApplySpellImmune(0, IMMUNITY_ID, SPELL_FROST_EXPLOSION, false);
}
};
diff --git a/src/bindings/scripts/scripts/northrend/naxxramas/boss_thaddius.cpp b/src/bindings/scripts/scripts/northrend/naxxramas/boss_thaddius.cpp
index 173bb84dba7..7d023c253a3 100644
--- a/src/bindings/scripts/scripts/northrend/naxxramas/boss_thaddius.cpp
+++ b/src/bindings/scripts/scripts/northrend/naxxramas/boss_thaddius.cpp
@@ -36,11 +36,9 @@
//both
#define SPELL_WARSTOMP 28125
-
//generic
#define C_TESLA_COIL 16218 //the coils (emotes "Tesla Coil overloads!")
-
//Thaddus
#define SAY_GREET -1533029 //not used
#define SAY_AGGRO RAND(-1533030,-1533031,-1533032)
diff --git a/src/bindings/scripts/scripts/northrend/naxxramas/instance_naxxramas.cpp b/src/bindings/scripts/scripts/northrend/naxxramas/instance_naxxramas.cpp
index 189eac62ca8..eff98fe289f 100644
--- a/src/bindings/scripts/scripts/northrend/naxxramas/instance_naxxramas.cpp
+++ b/src/bindings/scripts/scripts/northrend/naxxramas/instance_naxxramas.cpp
@@ -89,7 +89,7 @@ inline uint32 GetEruptionSection(float x, float y)
return 3;
float slope = y/x;
- for(uint32 i = 0; i < 3; ++i)
+ for (uint32 i = 0; i < 3; ++i)
if (slope > HeiganEruptionSlope[i])
return i;
return 3;
@@ -170,12 +170,12 @@ struct TRINITY_DLL_DECL instance_naxxramas : public InstanceData
void HeiganErupt(uint32 section)
{
- for(uint32 i = 0; i < 4; ++i)
+ for (uint32 i = 0; i < 4; ++i)
{
if (i == section)
continue;
- for(std::set<GameObject*>::iterator itr = HeiganEruption[i].begin(); itr != HeiganEruption[i].end(); ++itr)
+ for (std::set<GameObject*>::iterator itr = HeiganEruption[i].begin(); itr != HeiganEruption[i].end(); ++itr)
{
(*itr)->SendCustomAnim();
(*itr)->CastSpell(NULL, SPELL_ERUPTION);
@@ -191,7 +191,7 @@ bool AreaTrigger_at_naxxramas_frostwyrm_wing(Player* pPlayer, AreaTriggerEntry *
InstanceData *data = pPlayer->GetInstanceData();
if (data)
- for(uint32 i = BOSS_ANUBREKHAN; i < BOSS_SAPPHIRON; ++i)
+ for (uint32 i = BOSS_ANUBREKHAN; i < BOSS_SAPPHIRON; ++i)
if (data->GetBossState(i) != DONE)
return true;
diff --git a/src/bindings/scripts/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/src/bindings/scripts/scripts/northrend/nexus/nexus/boss_anomalus.cpp
index f0759804235..3f37cca3893 100644
--- a/src/bindings/scripts/scripts/northrend/nexus/nexus/boss_anomalus.cpp
+++ b/src/bindings/scripts/scripts/northrend/nexus/nexus/boss_anomalus.cpp
@@ -111,7 +111,7 @@ struct TRINITY_DLL_DECL boss_anomalusAI : public ScriptedAI
if (pMap && pMap->IsDungeon())
{
Map::PlayerList const &players = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievChaosTheory);
}
}
diff --git a/src/bindings/scripts/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/src/bindings/scripts/scripts/northrend/nexus/nexus/boss_keristrasza.cpp
index 4845119a89e..38bd1a7822b 100644
--- a/src/bindings/scripts/scripts/northrend/nexus/nexus/boss_keristrasza.cpp
+++ b/src/bindings/scripts/scripts/northrend/nexus/nexus/boss_keristrasza.cpp
@@ -110,7 +110,7 @@ struct TRINITY_DLL_DECL boss_keristraszaAI : public ScriptedAI
if (pMap && pMap->IsDungeon())
{
Map::PlayerList const &players = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievIntenseCold);
}
}
@@ -136,7 +136,7 @@ struct TRINITY_DLL_DECL boss_keristraszaAI : public ScriptedAI
GameObject *ContainmentSpheres[CONTAINMENT_SPHERES];
- for(uint8 i = 0; i < CONTAINMENT_SPHERES; ++i)
+ for (uint8 i = 0; i < CONTAINMENT_SPHERES; ++i)
{
ContainmentSpheres[i] = pInstance->instance->GetGameObject(ContainmentSphereGUIDs[i]);
if (!ContainmentSpheres[i])
@@ -174,7 +174,7 @@ struct TRINITY_DLL_DECL boss_keristraszaAI : public ScriptedAI
if (CheckIntenseColdTimer < diff && !MoreThanTwoIntenseCold)
{
std::list<HostilReference*> ThreatList = m_creature->getThreatManager().getThreatList();
- for(std::list<HostilReference*>::const_iterator itr = ThreatList.begin(); itr != ThreatList.end(); itr++)
+ for (std::list<HostilReference*>::const_iterator itr = ThreatList.begin(); itr != ThreatList.end(); itr++)
{
Unit *target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
if (!target || target->GetTypeId() != TYPEID_PLAYER)
diff --git a/src/bindings/scripts/scripts/northrend/nexus/nexus/boss_magus_telestra.cpp b/src/bindings/scripts/scripts/northrend/nexus/nexus/boss_magus_telestra.cpp
index d043705ab54..7b8fe60bacf 100644
--- a/src/bindings/scripts/scripts/northrend/nexus/nexus/boss_magus_telestra.cpp
+++ b/src/bindings/scripts/scripts/northrend/nexus/nexus/boss_magus_telestra.cpp
@@ -140,7 +140,7 @@ struct TRINITY_DLL_DECL boss_magus_telestraAI : public ScriptedAI
if (pMap && pMap->IsDungeon())
{
Map::PlayerList const &players = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievSplitPersonality);
}
}
@@ -205,7 +205,6 @@ struct TRINITY_DLL_DECL boss_magus_telestraAI : public ScriptedAI
return;
}
-
if ((Phase == 1)||(Phase == 3))
{
Unit* FireMagus;
diff --git a/src/bindings/scripts/scripts/northrend/nexus/nexus/instance_nexus.cpp b/src/bindings/scripts/scripts/northrend/nexus/nexus/instance_nexus.cpp
index c420cb1920d..b696012b776 100644
--- a/src/bindings/scripts/scripts/northrend/nexus/nexus/instance_nexus.cpp
+++ b/src/bindings/scripts/scripts/northrend/nexus/nexus/instance_nexus.cpp
@@ -233,7 +233,7 @@ struct TRINITY_DLL_DECL instance_nexus : public ScriptedInstance
std::istringstream loadStream(chrIn);
loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3];
- for(uint8 i = 0; i < NUMBER_OF_ENCOUNTERS; ++i)
+ for (uint8 i = 0; i < NUMBER_OF_ENCOUNTERS; ++i)
{
if (m_auiEncounter[i] == IN_PROGRESS)
m_auiEncounter[i] = NOT_STARTED;
diff --git a/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_varos.cpp b/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_varos.cpp
index 0ccd453e4d2..cfd419a01f8 100644
--- a/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_varos.cpp
+++ b/src/bindings/scripts/scripts/northrend/nexus/oculus/boss_varos.cpp
@@ -34,7 +34,6 @@ update creature_template set scriptname = '' where entry = '';
#define SAY_STRIKE_3 -1578028
#define SAY_SPAWN -1578029
-
struct TRINITY_DLL_DECL boss_varosAI : public ScriptedAI
{
boss_varosAI(Creature *c) : ScriptedAI(c) {}
diff --git a/src/bindings/scripts/scripts/northrend/sholazar_basin.cpp b/src/bindings/scripts/scripts/northrend/sholazar_basin.cpp
index 0a4421683a3..5e5e10530f2 100644
--- a/src/bindings/scripts/scripts/northrend/sholazar_basin.cpp
+++ b/src/bindings/scripts/scripts/northrend/sholazar_basin.cpp
@@ -115,7 +115,6 @@ struct TRINITY_DLL_DECL npc_injured_rainspeaker_oracleAI : public npc_escortAI
}
};
-
bool GossipHello_npc_injured_rainspeaker_oracle(Player* pPlayer, Creature* pCreature)
{
if (pCreature->isQuestGiver())
@@ -215,7 +214,6 @@ bool GossipSelect_npc_vekjik(Player* pPlayer, Creature* pCreature, uint32 uiSend
return true;
}
-
/*######
## avatar_of_freya
######*/
@@ -235,7 +233,6 @@ enum eFreya
GOSSIP_TEXTID_AVATAR3 = 13305
};
-
bool GossipHello_npc_avatar_of_freya(Player* pPlayer, Creature* pCreature)
{
if (pCreature->isQuestGiver())
diff --git a/src/bindings/scripts/scripts/northrend/storm_peaks.cpp b/src/bindings/scripts/scripts/northrend/storm_peaks.cpp
index 473fca5aa71..ab55c2e1341 100644
--- a/src/bindings/scripts/scripts/northrend/storm_peaks.cpp
+++ b/src/bindings/scripts/scripts/northrend/storm_peaks.cpp
@@ -30,7 +30,6 @@ enum eAgnetta
FACTION_HOSTILE_AT1 = 45
};
-
struct TRINITY_DLL_DECL npc_agnetta_tyrsdottarAI : public ScriptedAI
{
npc_agnetta_tyrsdottarAI(Creature* pCreature) : ScriptedAI(pCreature) { }
@@ -81,7 +80,6 @@ enum eFrostbornScout
QUEST_MISSING_SCOUTS = 12864
};
-
bool GossipHello_npc_frostborn_scout(Player* pPlayer, Creature* pCreature)
{
diff --git a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp
index d2630dc2175..aabb23349ff 100644
--- a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp
+++ b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp
@@ -135,7 +135,7 @@ struct TRINITY_DLL_DECL boss_bjarngrimAI : public ScriptedAI
m_uiMortalStrike_Timer = 8000;
m_uiSlam_Timer = 10000;
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
{
if (Creature* pStormforgedLieutenant = (Unit::GetCreature((*m_creature), m_auiStormforgedLieutenantGUID[i])))
{
diff --git a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp
index 96e49343b39..74df79e6211 100644
--- a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp
+++ b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp
@@ -154,7 +154,7 @@ struct TRINITY_DLL_DECL boss_ionarAI : public ScriptedAI
if (m_lSparkGUIDList.empty())
return;
- for(std::list<uint64>::iterator itr = m_lSparkGUIDList.begin(); itr != m_lSparkGUIDList.end(); ++itr)
+ for (std::list<uint64>::iterator itr = m_lSparkGUIDList.begin(); itr != m_lSparkGUIDList.end(); ++itr)
{
if (Creature* pTemp = Unit::GetCreature(*m_creature, *itr))
{
@@ -173,7 +173,7 @@ struct TRINITY_DLL_DECL boss_ionarAI : public ScriptedAI
if (m_lSparkGUIDList.empty())
return;
- for(std::list<uint64>::iterator itr = m_lSparkGUIDList.begin(); itr != m_lSparkGUIDList.end(); ++itr)
+ for (std::list<uint64>::iterator itr = m_lSparkGUIDList.begin(); itr != m_lSparkGUIDList.end(); ++itr)
{
if (Creature* pSpark = Unit::GetCreature(*m_creature, *itr))
{
diff --git a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp
index 19d34eb383c..7f858f09cfe 100644
--- a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp
+++ b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp
@@ -118,7 +118,7 @@ struct TRINITY_DLL_DECL boss_lokenAI : public ScriptedAI
if (pMap && pMap->IsDungeon())
{
Map::PlayerList const &players = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievTimelyDeath);
}
}
diff --git a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp
index 1804d316f92..a2aa5f293fc 100644
--- a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp
+++ b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp
@@ -154,7 +154,7 @@ struct TRINITY_DLL_DECL boss_volkhanAI : public ScriptedAI
if (pMap && pMap->IsDungeon())
{
Map::PlayerList const &players = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievShatterResistant);
}
}
@@ -171,7 +171,7 @@ struct TRINITY_DLL_DECL boss_volkhanAI : public ScriptedAI
if (m_lGolemGUIDList.empty())
return;
- for(std::list<uint64>::iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr)
+ for (std::list<uint64>::iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr)
{
if (Creature* pTemp = Unit::GetCreature(*m_creature, *itr))
{
@@ -188,7 +188,7 @@ struct TRINITY_DLL_DECL boss_volkhanAI : public ScriptedAI
if (m_lGolemGUIDList.empty())
return;
- for(std::list<uint64>::iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr)
+ for (std::list<uint64>::iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr)
{
if (Creature* pTemp = Unit::GetCreature(*m_creature, *itr))
{
@@ -313,7 +313,7 @@ bool EffectDummyCreature_boss_volkhan(Unit* pCaster, uint32 uiSpellId, uint32 ui
if (pCaster->GetEntry() != NPC_VOLKHAN_ANVIL || pCreatureTarget->GetEntry() != NPC_VOLKHAN)
return true;
- for(uint8 i = 0; i < MAX_GOLEM; ++i)
+ for (uint8 i = 0; i < MAX_GOLEM; ++i)
{
pCreatureTarget->CastSpell(pCaster, SPELL_SUMMON_MOLTEN_GOLEM, true);
}
diff --git a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp
index f8fcd720dfa..d74a4a228eb 100644
--- a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp
+++ b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp
@@ -141,7 +141,7 @@ struct TRINITY_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI
if (HeroicMode && AchievTimer < 60000 && pMap && pMap->IsDungeon() && AchievGoodGrief)
{
Map::PlayerList const &players = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievGoodGrief);
}
}
diff --git a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp
index 69061ad1d1f..4f0aceaa866 100644
--- a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp
+++ b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp
@@ -190,7 +190,7 @@ struct TRINITY_DLL_DECL boss_sjonnirAI : public ScriptedAI
if (pMap && pMap->IsDungeon())
{
Map::PlayerList const &players = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievAbuseTheOoze);
}
}
diff --git a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp
index 0681b376f4e..6e6b0aef0c6 100644
--- a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp
+++ b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp
@@ -155,7 +155,7 @@ struct TRINITY_DLL_DECL mob_tribuna_controllerAI : public ScriptedAI
if (!lKaddrakGUIDList.empty())
{
uint32 uiPositionCounter = 0;
- for(std::list<Creature*>::iterator itr = lKaddrakGUIDList.begin(); itr != lKaddrakGUIDList.end(); ++itr)
+ for (std::list<Creature*>::iterator itr = lKaddrakGUIDList.begin(); itr != lKaddrakGUIDList.end(); ++itr)
{
if ((*itr)->isAlive())
{
diff --git a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp
index 85d9367ae1d..5960614eeff 100644
--- a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp
+++ b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp
@@ -58,7 +58,7 @@ struct TRINITY_DLL_DECL instance_halls_of_stone : public ScriptedInstance
uiTribunalChest = 0;
uiTribunalSkyFloor = 0;
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
m_auiEncounter[i] = NOT_STARTED;
}
@@ -219,7 +219,7 @@ struct TRINITY_DLL_DECL instance_halls_of_stone : public ScriptedInstance
m_auiEncounter[2] = data2;
m_auiEncounter[3] = data3;
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS)
m_auiEncounter[i] = NOT_STARTED;
diff --git a/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_assembly_of_iron.cpp b/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_assembly_of_iron.cpp
index df03ff9eff7..0b8d1e87b5c 100644
--- a/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_assembly_of_iron.cpp
+++ b/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_assembly_of_iron.cpp
@@ -62,8 +62,6 @@ EndScriptData */
#define SPELL_LIGHTNING_TENDRILS_H 63486
#define SPELL_STORMSHIELD 64187
-
-
enum eEnums
{
EVENT_ENRAGE,
@@ -87,14 +85,12 @@ enum eEnums
};
-
-
bool IsEncounterComplete(ScriptedInstance* pInstance, Creature* m_creature)
{
if (!pInstance || !m_creature)
return false;
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
{
uint64 guid = pInstance->GetData64(DATA_STEELBREAKER+i);
if(!guid)
diff --git a/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp b/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp
index 1aa70290b69..6179b19f0e2 100644
--- a/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp
+++ b/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_flame_leviathan.cpp
@@ -20,7 +20,6 @@
#include "def_ulduar.h"
#include "Vehicle.h"
-
#define SPELL_PURSUED 62374
#define SPELL_GATHERING_SPEED 62375
#define SPELL_BATTERING_RAM 62376
diff --git a/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_ignis.cpp b/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_ignis.cpp
index 8dfda95a987..38c662f5fe9 100644
--- a/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_ignis.cpp
+++ b/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_ignis.cpp
@@ -91,7 +91,6 @@ struct TRINITY_DLL_DECL boss_ignis_AI : public BossAI
SLAG_POT_Timer = 30000;
} else SLAG_POT_Timer -= diff;
-
DoMeleeAttackIfReady();
}
};
diff --git a/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp b/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp
index 92dd6ecacab..839fb14f95f 100644
--- a/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp
+++ b/src/bindings/scripts/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp
@@ -218,7 +218,7 @@ struct TRINITY_DLL_DECL boss_razorscaleAI : public BossAI
{
InitialSpawn = false;
- for(uint32 i = 0; i < 4; ++i)
+ for (uint32 i = 0; i < 4; ++i)
{
uint32 random = rand()%4;
Creature* Add = m_creature->SummonCreature(CREATURE_ADDS, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
@@ -227,7 +227,6 @@ struct TRINITY_DLL_DECL boss_razorscaleAI : public BossAI
}
}
-
if (FireballTimer < diff)
{
DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_FIREBALL);
@@ -269,7 +268,7 @@ struct TRINITY_DLL_DECL boss_razorscaleAI : public BossAI
if (Phase == 2)
{
uint32 max = rand()%10;
- for(uint32 i = 0; i < 4; ++i)
+ for (uint32 i = 0; i < 4; ++i)
{
uint32 random = rand()%3;
Creature* Add = m_creature->SummonCreature(CREATURE_ADDS, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
@@ -283,7 +282,7 @@ struct TRINITY_DLL_DECL boss_razorscaleAI : public BossAI
uint32 max = rand() % 10 +1;
if (max < 1)
{
- for(uint32 i = 0; i < max; ++i)
+ for (uint32 i = 0; i < max; ++i)
{
uint32 random = rand()%4;
Creature* Add = m_creature->SummonCreature(CREATURE_ADDS, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
diff --git a/src/bindings/scripts/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/src/bindings/scripts/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp
index 4a4c441fffc..b825bbcad23 100644
--- a/src/bindings/scripts/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp
+++ b/src/bindings/scripts/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp
@@ -81,7 +81,7 @@ struct TRINITY_DLL_DECL instance_ulduar : public ScriptedInstance
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
{
if (m_auiEncounter[i] == IN_PROGRESS)
return true;
@@ -204,7 +204,7 @@ struct TRINITY_DLL_DECL instance_ulduar : public ScriptedInstance
std::ostringstream saveStream;
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
saveStream << m_auiEncounter[i] << " ";
m_strInstData = saveStream.str();
@@ -298,7 +298,7 @@ struct TRINITY_DLL_DECL instance_ulduar : public ScriptedInstance
std::istringstream loadStream(strIn);
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
{
loadStream >> m_auiEncounter[i];
diff --git a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp
index 86523ef0bf6..87f5eeec1d9 100644
--- a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp
+++ b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp
@@ -253,7 +253,6 @@ struct TRINITY_DLL_DECL boss_ingvar_the_plundererAI : public ScriptedAI
}else Enrage_Timer -= diff;
}
-
if (Roar_Timer < diff)
{
if (!wait_Timer)
diff --git a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp
index bff13c8b4cc..d5a5b3dcabd 100644
--- a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp
+++ b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp
@@ -154,7 +154,7 @@ struct TRINITY_DLL_DECL boss_kelesethAI : public ScriptedAI
if (pMap && pMap->IsDungeon())
{
Map::PlayerList const &players = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievOnTheRocks);
}
}
@@ -197,7 +197,7 @@ struct TRINITY_DLL_DECL boss_kelesethAI : public ScriptedAI
{
Creature* Skeleton;
DoScriptText(SAY_SKELETONS, m_creature);
- for(uint8 i = 0; i < 5; ++i)
+ for (uint8 i = 0; i < 5; ++i)
{
Skeleton = m_creature->SummonCreature(CREATURE_SKELETON, SkeletonSpawnPoint[i][0], SkeletonSpawnPoint[i][1] , SKELETONSPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000);
if (Skeleton)
@@ -267,7 +267,6 @@ struct TRINITY_DLL_DECL mob_vrykul_skeletonAI : public ScriptedAI
}
}
-
void PretendToDie()
{
isDead = true;
diff --git a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_dalronn.cpp b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_dalronn.cpp
index 0770f9209e9..dcb222e163c 100644
--- a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_dalronn.cpp
+++ b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_dalronn.cpp
@@ -224,7 +224,6 @@ struct TRINITY_DLL_DECL boss_dalronn_the_controllerAI : public ScriptedAI
uint32 AggroYell_Timer;
bool Skarvald_isDead;
-
void Reset()
{
ShadowBolt_Timer = 1000;
diff --git a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp
index 744891371a9..be4446dd6d4 100644
--- a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp
+++ b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp
@@ -76,7 +76,7 @@ struct TRINITY_DLL_DECL instance_utgarde_keep : public ScriptedInstance
Dalronn = 0;
Ingvar = 0;
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
{
forge_bellow[i] = 0;
forge_fire[i] = 0;
@@ -90,7 +90,7 @@ struct TRINITY_DLL_DECL instance_utgarde_keep : public ScriptedInstance
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) return true;
return false;
@@ -102,7 +102,7 @@ struct TRINITY_DLL_DECL instance_utgarde_keep : public ScriptedInstance
if (!players.isEmpty())
{
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
if (Player* plr = itr->getSource())
return plr;
@@ -229,7 +229,6 @@ struct TRINITY_DLL_DECL instance_utgarde_keep : public ScriptedInstance
break;
}
-
if (data == DONE)
{
SaveToDB();
@@ -284,7 +283,7 @@ struct TRINITY_DLL_DECL instance_utgarde_keep : public ScriptedInstance
m_auiEncounter[1] = data1;
m_auiEncounter[2] = data2;
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS)
m_auiEncounter[i] = NOT_STARTED;
diff --git a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp
index 6dd5b242517..2a0fb5642bb 100644
--- a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp
+++ b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp
@@ -108,7 +108,7 @@ struct TRINITY_DLL_DECL npc_dragonflayer_forge_masterAI : public ScriptedAI
float diff = 30.0f;
int near_f = 0;
- for(uint8 i = 0; i < 3 ; ++i)
+ for (uint8 i = 0; i < 3 ; ++i)
{
GameObject* temp;
temp = m_creature->FindNearestGameObject(entry_search[i],30);
diff --git a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp
index 4710d8dec82..f389b2e99ab 100644
--- a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp
+++ b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp
@@ -217,7 +217,7 @@ struct TRINITY_DLL_DECL boss_skadiAI : public ScriptedAI
void SpawnMobs(uint32 spot)
{
uint8 uiMaxSpawn = (HeroicMode ? 6 : 5);
- for(uint8 i = 0; i < uiMaxSpawn; ++i)
+ for (uint8 i = 0; i < uiMaxSpawn; ++i)
{
Creature* pTemp;
switch (rand()%3)
diff --git a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp
index df72278c684..fce4ad3f5e7 100644
--- a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp
+++ b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp
@@ -275,7 +275,7 @@ struct TRINITY_DLL_DECL boss_ymironAI : public ScriptedAI
x = m_creature->GetPositionX()-5;
y = m_creature->GetPositionY()-5;
z = m_creature->GetPositionZ();
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
//DoCast(m_creature, SPELL_SUMMON_AVENGING_SPIRIT); // works fine, but using summon has better control
if (Creature* pTemp = m_creature->SummonCreature(CREATURE_AVENGING_SPIRIT, x+rand()%10, y+rand()%10, z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
diff --git a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_pinnacle.cpp b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_pinnacle.cpp
index 7eb661668df..23c530f2432 100644
--- a/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_pinnacle.cpp
+++ b/src/bindings/scripts/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_pinnacle.cpp
@@ -40,13 +40,13 @@ struct TRINITY_DLL_DECL instance_pinnacle : public ScriptedInstance
void Initialize()
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
m_auiEncounter[i] = NOT_STARTED;
}
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) return true;
return false;
@@ -185,7 +185,7 @@ struct TRINITY_DLL_DECL instance_pinnacle : public ScriptedInstance
m_auiEncounter[2] = data2;
m_auiEncounter[3] = data3;
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS)
m_auiEncounter[i] = NOT_STARTED;
diff --git a/src/bindings/scripts/scripts/northrend/vault_of_archavon/boss_emalon.cpp b/src/bindings/scripts/scripts/northrend/vault_of_archavon/boss_emalon.cpp
index 0f240bd8692..6b9586560a0 100644
--- a/src/bindings/scripts/scripts/northrend/vault_of_archavon/boss_emalon.cpp
+++ b/src/bindings/scripts/scripts/northrend/vault_of_archavon/boss_emalon.cpp
@@ -70,7 +70,7 @@ struct TRINITY_DLL_DECL boss_emalonAI : public ScriptedAI
{
if(!MinionList.empty())
{
- for(std::list<uint64>::const_iterator itr = MinionList.begin(); itr != MinionList.end(); itr++)
+ for (std::list<uint64>::const_iterator itr = MinionList.begin(); itr != MinionList.end(); itr++)
{
Creature *Minion = Unit::GetCreature(*m_creature, *itr);
if(Minion && Minion->isAlive())
@@ -100,7 +100,7 @@ struct TRINITY_DLL_DECL boss_emalonAI : public ScriptedAI
{
if(!MinionList.empty())
{
- for(std::list<uint64>::const_iterator itr = MinionList.begin(); itr != MinionList.end(); ++itr)
+ for (std::list<uint64>::const_iterator itr = MinionList.begin(); itr != MinionList.end(); ++itr)
{
Creature *Minion = Unit::GetCreature(*m_creature, *itr);
if(Minion && Minion->isAlive() && !Minion->getVictim())
diff --git a/src/bindings/scripts/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp b/src/bindings/scripts/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp
index 45d0a4be7ae..dc9b78e825f 100644
--- a/src/bindings/scripts/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp
+++ b/src/bindings/scripts/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp
@@ -22,13 +22,13 @@ struct TRINITY_DLL_DECL instance_archavon : public ScriptedInstance
Archavon = 0;
Emalon = 0;
- for(uint8 i = 0; i < ENCOUNTERS; i++)
+ for (uint8 i = 0; i < ENCOUNTERS; i++)
Encounters[i] = NOT_STARTED;
}
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < ENCOUNTERS; i++)
+ for (uint8 i = 0; i < ENCOUNTERS; i++)
if(Encounters[i] == IN_PROGRESS) return true;
return false;
@@ -102,7 +102,7 @@ struct TRINITY_DLL_DECL instance_archavon : public ScriptedInstance
OUT_LOAD_INST_DATA(in);
std::istringstream stream(in);
stream >> Encounters[0] >> Encounters[1];
- for(uint8 i = 0; i < ENCOUNTERS; ++i)
+ for (uint8 i = 0; i < ENCOUNTERS; ++i)
if(Encounters[i] == IN_PROGRESS)
Encounters[i] = NOT_STARTED;
OUT_LOAD_INST_DATA_COMPLETE;
diff --git a/src/bindings/scripts/scripts/northrend/violet_hold/boss_erekem.cpp b/src/bindings/scripts/scripts/northrend/violet_hold/boss_erekem.cpp
index cf6686421d1..cf6a9c63ce8 100644
--- a/src/bindings/scripts/scripts/northrend/violet_hold/boss_erekem.cpp
+++ b/src/bindings/scripts/scripts/northrend/violet_hold/boss_erekem.cpp
@@ -125,7 +125,6 @@ struct TRINITY_DLL_DECL boss_erekemAI : public ScriptedAI
uiBloodlustTimer = urand(35000,45000);
} else uiBloodlustTimer -= diff;
-
if (uiEarthShockTimer < diff)
{
DoCast(m_creature->getVictim(), SPELL_EARTH_SHOCK);
@@ -238,7 +237,6 @@ CreatureAI* GetAI_mob_erekem_guard(Creature* pCreature)
return new mob_erekem_guardAI (pCreature);
}
-
void AddSC_boss_erekem()
{
Script *newscript;
diff --git a/src/bindings/scripts/scripts/northrend/violet_hold/boss_moragg.cpp b/src/bindings/scripts/scripts/northrend/violet_hold/boss_moragg.cpp
index 53501a6425a..fa700d6253a 100644
--- a/src/bindings/scripts/scripts/northrend/violet_hold/boss_moragg.cpp
+++ b/src/bindings/scripts/scripts/northrend/violet_hold/boss_moragg.cpp
@@ -12,7 +12,6 @@ update creature_template set scriptname = '' where entry = '';
#include "precompiled.h"
#include "def_violet_hold.h"
-
//Spells
enum Spells
{
diff --git a/src/bindings/scripts/scripts/northrend/violet_hold/instance_violet_hold.cpp b/src/bindings/scripts/scripts/northrend/violet_hold/instance_violet_hold.cpp
index 60128f1b931..771b8e187da 100644
--- a/src/bindings/scripts/scripts/northrend/violet_hold/instance_violet_hold.cpp
+++ b/src/bindings/scripts/scripts/northrend/violet_hold/instance_violet_hold.cpp
@@ -103,7 +103,7 @@ struct TRINITY_DLL_DECL instance_violet_hold : public ScriptedInstance
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) return true;
return false;
@@ -385,7 +385,7 @@ struct TRINITY_DLL_DECL instance_violet_hold : public ScriptedInstance
m_auiEncounter[1] = data1;
m_auiEncounter[2] = data2;
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS)
m_auiEncounter[i] = NOT_STARTED;
diff --git a/src/bindings/scripts/scripts/northrend/zuldrak.cpp b/src/bindings/scripts/scripts/northrend/zuldrak.cpp
index 90a047b4c44..a740a8ea15c 100644
--- a/src/bindings/scripts/scripts/northrend/zuldrak.cpp
+++ b/src/bindings/scripts/scripts/northrend/zuldrak.cpp
@@ -92,7 +92,6 @@ CreatureAI* GetAI_npc_drakuru_shackles(Creature* pCreature)
return new npc_drakuru_shacklesAI (pCreature);
}
-
/*####
## npc_captured_rageclaw
####*/
diff --git a/src/bindings/scripts/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/src/bindings/scripts/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp
index 8b1c610e065..5baa380fa7e 100644
--- a/src/bindings/scripts/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp
+++ b/src/bindings/scripts/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp
@@ -183,7 +183,6 @@ struct TRINITY_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI
ScriptedAI::MoveInLineOfSight(who);
}
-
void EnterCombat(Unit *who)
{
DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), m_creature);
diff --git a/src/bindings/scripts/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp b/src/bindings/scripts/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp
index c8dabff9650..878741387c8 100644
--- a/src/bindings/scripts/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp
+++ b/src/bindings/scripts/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp
@@ -86,7 +86,7 @@ struct TRINITY_DLL_DECL boss_shirrak_the_dead_watcherAI : public ScriptedAI
float dist;
Map* pMap = m_creature->GetMap();
Map::PlayerList const &PlayerList = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
+ for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (Player* i_pl = i->getSource())
if (i_pl->isAlive() && (dist = i_pl->IsWithinDist(m_creature, 45)))
{
diff --git a/src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp
index 1eca5a36734..83d7586da1c 100644
--- a/src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp
+++ b/src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp
@@ -122,7 +122,7 @@ struct TRINITY_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI
DoCast(m_creature, SPELL_INCITE_CHAOS);
std::list<HostilReference *> t_list = m_creature->getThreatManager().getThreatList();
- for(std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
+ for (std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
if (target && target->GetTypeId() == TYPEID_PLAYER)
diff --git a/src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp
index 34bcdd86175..8508ad788bb 100644
--- a/src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp
+++ b/src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp
@@ -265,7 +265,7 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
{
Map* pMap = m_creature->GetMap();
Map::PlayerList const &PlayerList = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
+ for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (Player* i_pl = i->getSource())
if (i_pl->isAlive() && !i_pl->HasAura(SPELL_BANISH))
i_pl->TeleportTo(m_creature->GetMapId(), VorpilPosition[0],VorpilPosition[1],VorpilPosition[2], 0, TELE_TO_NOT_LEAVE_COMBAT);
diff --git a/src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp b/src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp
index 7782b5fed62..ac1991d0be2 100644
--- a/src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp
+++ b/src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp
@@ -70,7 +70,7 @@ struct TRINITY_DLL_DECL boss_murmurAI : public ScriptedAI
void SonicBoomEffect()
{
std::list<HostilReference *> t_list = m_creature->getThreatManager().getThreatList();
- for(std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
+ for (std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
if (target && target->GetTypeId() == TYPEID_PLAYER)
@@ -155,7 +155,7 @@ struct TRINITY_DLL_DECL boss_murmurAI : public ScriptedAI
if (ThunderingStorm_Timer < diff)
{
std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
- for(std::list<HostilReference*>::iterator i = m_threatlist.begin(); i != m_threatlist.end(); ++i)
+ for (std::list<HostilReference*>::iterator i = m_threatlist.begin(); i != m_threatlist.end(); ++i)
if (Unit* target = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()))
if (target->isAlive() && !m_creature->IsWithinDist(target, 35, false))
DoCast(target, SPELL_THUNDERING_STORM, true);
@@ -178,7 +178,7 @@ struct TRINITY_DLL_DECL boss_murmurAI : public ScriptedAI
if (!m_creature->IsWithinMeleeRange(m_creature->getVictim()))
{
std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
- for(std::list<HostilReference*>::iterator i = m_threatlist.begin(); i != m_threatlist.end(); ++i)
+ for (std::list<HostilReference*>::iterator i = m_threatlist.begin(); i != m_threatlist.end(); ++i)
if (Unit* target = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()))
if (target->isAlive() && m_creature->IsWithinMeleeRange(target))
{
diff --git a/src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp b/src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp
index f8f3b73bffa..df4244991ee 100644
--- a/src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp
+++ b/src/bindings/scripts/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp
@@ -62,7 +62,7 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) return true;
return false;
@@ -203,7 +203,7 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance
std::istringstream loadStream(in);
loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4];
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS)
m_auiEncounter[i] = NOT_STARTED;
diff --git a/src/bindings/scripts/scripts/outland/black_temple/boss_bloodboil.cpp b/src/bindings/scripts/scripts/outland/black_temple/boss_bloodboil.cpp
index be303f85980..2aaf2cbf6ae 100644
--- a/src/bindings/scripts/scripts/outland/black_temple/boss_bloodboil.cpp
+++ b/src/bindings/scripts/scripts/outland/black_temple/boss_bloodboil.cpp
@@ -137,7 +137,7 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
std::list<Unit *> targets;
std::list<HostilReference *>::iterator itr = m_threatlist.begin();
- for(; itr!= m_threatlist.end(); ++itr) //store the threat list in a different container
+ for (; itr!= m_threatlist.end(); ++itr) //store the threat list in a different container
{
Unit *target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
//only on alive players
@@ -154,11 +154,11 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
/*SpellEntry const *spellInfo = GetSpellStore()->LookupEntry(SPELL_BLOODBOIL);
if (spellInfo)
{
- for(std::list<Unit *>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
+ for (std::list<Unit *>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
{
Unit* target = *itr;
if (!target) return;
- for(uint32 i = 0;i<3; ++i)
+ for (uint32 i = 0; i<3; ++i)
{
uint8 eff = spellInfo->Effect[i];
if (eff>=TOTAL_SPELL_EFFECTS)
diff --git a/src/bindings/scripts/scripts/outland/black_temple/boss_illidan.cpp b/src/bindings/scripts/scripts/outland/black_temple/boss_illidan.cpp
index e081e33eb06..65364d06bc3 100644
--- a/src/bindings/scripts/scripts/outland/black_temple/boss_illidan.cpp
+++ b/src/bindings/scripts/scripts/outland/black_temple/boss_illidan.cpp
@@ -362,8 +362,6 @@ static Animation DemonTransformation[]=
#define EMOTE_SETS_GAZE_ON "sets its gaze on $N!"
#define EMOTE_UNABLE_TO_SUMMON "is unable to summon Maiev Shadowsong and enter Phase 4. Resetting Encounter."
-
-
/************************************** Illidan's AI ***************************************/
struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
{
@@ -404,7 +402,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
{
if (summon->GetCreatureInfo()->Entry == FLAME_OF_AZZINOTH)
{
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
if (summon->GetGUID() == FlameGUID[i])
FlameGUID[i] = 0;
@@ -460,7 +458,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
pInstance->SetData(DATA_ILLIDANSTORMRAGEEVENT, DONE); // Completed
- for(uint8 i = DATA_GAMEOBJECT_ILLIDAN_DOOR_R; i < DATA_GAMEOBJECT_ILLIDAN_DOOR_L + 1; ++i)
+ for (uint8 i = DATA_GAMEOBJECT_ILLIDAN_DOOR_R; i < DATA_GAMEOBJECT_ILLIDAN_DOOR_L + 1; ++i)
pInstance->HandleGameObject(pInstance->GetData64(i), true);
}
@@ -503,7 +501,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
void DeleteFromThreatList(uint64 TargetGUID)
{
- for(std::list<HostilReference*>::iterator itr = m_creature->getThreatManager().getThreatList().begin(); itr != m_creature->getThreatManager().getThreatList().end(); ++itr)
+ for (std::list<HostilReference*>::iterator itr = m_creature->getThreatManager().getThreatList().begin(); itr != m_creature->getThreatManager().getThreatList().end(); ++itr)
{
if ((*itr)->getUnitGuid() == TargetGUID)
{
@@ -601,7 +599,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
Timer[EVENT_FLIGHT_SEQUENCE] = 0;
break;
case 8://glaive return
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
{
if (GlaiveGUID[i])
{
@@ -619,7 +617,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
m_creature->StopMoving();
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
{
if (GlaiveGUID[i])
{
@@ -699,7 +697,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
return;
Event = EVENT_NULL;
- for(uint32 i = 1; i <= MaxTimer[Phase]; ++i)
+ for (uint32 i = 1; i <= MaxTimer[Phase]; ++i)
{
if (Timer[i]) // Event is enabled
if (Timer[i] <= diff)
@@ -966,8 +964,6 @@ struct TRINITY_DLL_DECL flame_of_azzinothAI : public ScriptedAI
}
};
-
-
/******* Functions and vars for Akama's AI ******/
struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
{
@@ -1010,14 +1006,14 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
{
pInstance->HandleGameObject(GateGUID, false);
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
pInstance->HandleGameObject(DoorGUID[i], false);
//JustCreated = false;
}else
{//open all doors, raid wiped
pInstance->HandleGameObject(GateGUID, true);
WalkCount = 1;//skip first wp
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
pInstance->HandleGameObject(DoorGUID[i], true);
}
}
@@ -1075,13 +1071,13 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
{
std::list<HostilReference*>& threatList = m_creature->getThreatManager().getThreatList();
std::vector<Unit*> eliteList;
- for(std::list<HostilReference*>::iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
+ for (std::list<HostilReference*>::iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
{
Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid());
if (pUnit && pUnit->GetEntry() == ILLIDARI_ELITE)
eliteList.push_back(pUnit);
}
- for(std::vector<Unit*>::iterator itr = eliteList.begin(); itr != eliteList.end(); ++itr)
+ for (std::vector<Unit*>::iterator itr = eliteList.begin(); itr != eliteList.end(); ++itr)
(*itr)->setDeathState(JUST_DIED);
EnterEvadeMode();
}
@@ -1092,7 +1088,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
return;
pInstance->SetData(DATA_ILLIDANSTORMRAGEEVENT, IN_PROGRESS);
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
pInstance->HandleGameObject(DoorGUID[i], false);
if (GETCRE(Illidan, IllidanGUID))
{
@@ -1125,7 +1121,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
DoCast(Channel, SPELL_AKAMA_DOOR_FAIL);
}
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
if (Creature* Spirit = m_creature->SummonCreature(i ? SPIRIT_OF_OLUM : SPIRIT_OF_UDALO, SpiritSpawns[i].x, SpiritSpawns[i].y, SpiritSpawns[i].z, 0, TEMPSUMMON_TIMED_DESPAWN, 20000))
{
Spirit->SetVisibility(VISIBILITY_OFF);
@@ -1292,7 +1288,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
switch(WalkCount)
{
case 6:
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
if(pInstance)
pInstance->HandleGameObject(DoorGUID[i], true);
break;
@@ -1398,7 +1394,6 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
}
};
-
struct TRINITY_DLL_DECL boss_maievAI : public ScriptedAI
{
boss_maievAI(Creature *c) : ScriptedAI(c) {};
@@ -1538,7 +1533,7 @@ struct TRINITY_DLL_DECL boss_maievAI : public ScriptedAI
return;
Event = EVENT_MAIEV_NULL;
- for(uint8 i = 1; i <= MaxTimer; ++i)
+ for (uint8 i = 1; i <= MaxTimer; ++i)
if (Timer[i])
{
if (Timer[i] <= diff)
@@ -1605,7 +1600,6 @@ struct TRINITY_DLL_DECL boss_maievAI : public ScriptedAI
}
};
-
bool GossipSelect_npc_akama_at_illidan(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (uiAction == GOSSIP_ACTION_INFO_DEF) // Time to begin the Event
@@ -1842,7 +1836,7 @@ void boss_illidan_stormrageAI::Reset()
}
MaievGUID = 0;
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
{
FlameGUID[i] = 0;
GlaiveGUID[i] = 0;
@@ -1993,7 +1987,6 @@ void boss_illidan_stormrageAI::HandleTalkSequence()
TalkCount++;
}
-
void boss_illidan_stormrageAI::CastEyeBlast()
{
m_creature->InterruptNonMeleeSpells(false);
@@ -2002,14 +1995,14 @@ void boss_illidan_stormrageAI::CastEyeBlast()
DoPlaySoundToSet(m_creature, SOUND_EYE_BLAST);
float distx, disty, dist[2];
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
{
distx = EyeBlast[i].x - HoverPosition[HoverPoint].x;
disty = EyeBlast[i].y - HoverPosition[HoverPoint].y;
dist[i] = distx * distx + disty * disty;
}
Locations initial = EyeBlast[dist[0] < dist[1] ? 0 : 1];
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
{
distx = GlaivePosition[i].x - HoverPosition[HoverPoint].x;
disty = GlaivePosition[i].y - HoverPosition[HoverPoint].y;
@@ -2037,7 +2030,7 @@ void boss_illidan_stormrageAI::SummonFlamesOfAzzinoth()
m_creature->MonsterYell(SAY_SUMMONFLAMES, LANG_UNIVERSAL, 0);
DoPlaySoundToSet(m_creature, SOUND_SUMMONFLAMES);
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
{
if (GETUNIT(Glaive, GlaiveGUID[i]))
{
@@ -2066,7 +2059,6 @@ void boss_illidan_stormrageAI::SummonMaiev()
}
}
-
void boss_illidan_stormrageAI::EnterPhase(PhaseIllidan NextPhase)
{
DoZoneInCombat();
diff --git a/src/bindings/scripts/scripts/outland/black_temple/boss_mother_shahraz.cpp b/src/bindings/scripts/scripts/outland/black_temple/boss_mother_shahraz.cpp
index 524ab213d73..37cb75ca380 100644
--- a/src/bindings/scripts/scripts/outland/black_temple/boss_mother_shahraz.cpp
+++ b/src/bindings/scripts/scripts/outland/black_temple/boss_mother_shahraz.cpp
@@ -105,7 +105,7 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
if (pInstance)
pInstance->SetData(DATA_MOTHERSHAHRAZEVENT, NOT_STARTED);
- for(uint8 i = 0; i<3; ++i)
+ for (uint8 i = 0; i<3; ++i)
TargetGUID[i] = 0;
BeamTimer = 20000; // Timers may be incorrect
@@ -151,7 +151,7 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
float X = TeleportPoint[random].x;
float Y = TeleportPoint[random].y;
float Z = TeleportPoint[random].z;
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
{
Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 1);
if (pUnit && pUnit->isAlive() && (pUnit->GetTypeId() == TYPEID_PLAYER))
@@ -233,7 +233,7 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
// Just make them explode three times... they're supposed to keep exploding while they are in range, but it'll take too much code. I'll try to think of an efficient way for it later.
if (ExplosionCount < 3)
{
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
{
Unit* pUnit = NULL;
if (TargetGUID[i])
diff --git a/src/bindings/scripts/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/src/bindings/scripts/scripts/outland/black_temple/boss_reliquary_of_souls.cpp
index f1e0873dd95..ef42da568a3 100644
--- a/src/bindings/scripts/scripts/outland/black_temple/boss_reliquary_of_souls.cpp
+++ b/src/bindings/scripts/scripts/outland/black_temple/boss_reliquary_of_souls.cpp
@@ -190,7 +190,7 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
std::list<HostilReference*>& m_threatlist = target->getThreatManager().getThreatList();
std::list<HostilReference*>::iterator itr = m_threatlist.begin();
- for(; itr != m_threatlist.end(); itr++)
+ for (; itr != m_threatlist.end(); itr++)
{
Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid());
if (pUnit)
@@ -390,7 +390,7 @@ struct TRINITY_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI
return; // No point continuing if empty threatlist.
std::list<Unit*> targets;
std::list<HostilReference*>::iterator itr = m_threatlist.begin();
- for(; itr != m_threatlist.end(); ++itr)
+ for (; itr != m_threatlist.end(); ++itr)
{
Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid());
if (pUnit && pUnit->isAlive() && (pUnit->GetTypeId() == TYPEID_PLAYER)) // Only alive players
@@ -481,7 +481,7 @@ struct TRINITY_DLL_DECL boss_essence_of_desireAI : public ScriptedAI
void SpellHit(Unit *caster, const SpellEntry *spell)
{
if (m_creature->GetCurrentSpell(CURRENT_GENERIC_SPELL))
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
if (spell->Effect[i] == SPELL_EFFECT_INTERRUPT_CAST)
if (m_creature->GetCurrentSpell(CURRENT_GENERIC_SPELL)->m_spellInfo->Id == SPELL_SOUL_SHOCK
|| m_creature->GetCurrentSpell(CURRENT_GENERIC_SPELL)->m_spellInfo->Id == SPELL_DEADEN)
diff --git a/src/bindings/scripts/scripts/outland/black_temple/boss_shade_of_akama.cpp b/src/bindings/scripts/scripts/outland/black_temple/boss_shade_of_akama.cpp
index ada3230a6f6..63e9c4f0b59 100644
--- a/src/bindings/scripts/scripts/outland/black_temple/boss_shade_of_akama.cpp
+++ b/src/bindings/scripts/scripts/outland/black_temple/boss_shade_of_akama.cpp
@@ -259,7 +259,7 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
if (!Channelers.empty())
{
- for(std::list<uint64>::iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr)
+ for (std::list<uint64>::iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr)
{
Creature* Channeler = (Unit::GetCreature(*m_creature, *itr));
if (Channeler)
@@ -326,7 +326,7 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
}
else
{
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
{
Creature* Spawn = m_creature->SummonCreature(spawnEntries[i], X, Y, Z_SPAWN, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000);
if (Spawn)
@@ -347,7 +347,7 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
if (!ChannelerList.empty())
{
- for(std::list<Creature*>::iterator itr = ChannelerList.begin(); itr != ChannelerList.end(); ++itr)
+ for (std::list<Creature*>::iterator itr = ChannelerList.begin(); itr != ChannelerList.end(); ++itr)
{
CAST_AI(mob_ashtongue_channelerAI, (*itr)->AI())->ShadeGUID = m_creature->GetGUID();
Channelers.push_back((*itr)->GetGUID());
@@ -365,7 +365,7 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
return;
}
- for(std::list<uint64>::iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr)
+ for (std::list<uint64>::iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr)
if (Creature* Channeler = (Unit::GetCreature(*m_creature, *itr)))
Channeler->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
@@ -701,7 +701,7 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
{
if (SummonBrokenTimer <= diff)
{
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
float x = BrokenCoords[BrokenSummonIndex].x + (i*5);
float y = BrokenCoords[BrokenSummonIndex].y + (1*5);
@@ -743,7 +743,7 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
if (!BrokenList.empty())
{
bool Yelled = false;
- for(std::list<uint64>::iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr)
+ for (std::list<uint64>::iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr)
if (Creature* pUnit = Unit::GetCreature(*m_creature, *itr))
{
if (!Yelled)
@@ -760,7 +760,7 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
case 3:
if (!BrokenList.empty())
{
- for(std::list<uint64>::iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr)
+ for (std::list<uint64>::iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr)
if (Creature* pUnit = Unit::GetCreature(*m_creature, *itr))
// This is the incorrect spell, but can't seem to find the right one.
pUnit->CastSpell(pUnit, 39656, true);
@@ -771,7 +771,7 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
case 4:
if (!BrokenList.empty())
{
- for(std::list<uint64>::iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr)
+ for (std::list<uint64>::iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr)
if (Creature* pUnit = Unit::GetCreature((*m_creature), *itr))
pUnit->MonsterYell(SAY_BROKEN_FREE_02, LANG_UNIVERSAL, 0);
}
diff --git a/src/bindings/scripts/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/src/bindings/scripts/scripts/outland/black_temple/boss_teron_gorefiend.cpp
index d4f06f13274..968fc3d6b98 100644
--- a/src/bindings/scripts/scripts/outland/black_temple/boss_teron_gorefiend.cpp
+++ b/src/bindings/scripts/scripts/outland/black_temple/boss_teron_gorefiend.cpp
@@ -147,7 +147,7 @@ struct TRINITY_DLL_DECL mob_shadowy_constructAI : public ScriptedAI
return; // No threat list. Don't continue.
std::list<HostilReference*>::iterator itr = m_threatlist.begin();
std::list<Unit*> targets;
- for(; itr != m_threatlist.end(); ++itr)
+ for (; itr != m_threatlist.end(); ++itr)
{
Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid());
if (pUnit && pUnit->isAlive())
@@ -284,7 +284,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
std::list<HostilReference*>::iterator i = m_threatlist.begin();
- for(i = m_threatlist.begin(); i != m_threatlist.end(); ++i)
+ for (i = m_threatlist.begin(); i != m_threatlist.end(); ++i)
{
Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid());
if (pUnit && pUnit->isAlive())
@@ -318,7 +318,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
Ghost->DealDamage(Ghost, Ghost->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL,
false);
}*/
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
Creature* Construct = NULL;
float X = CalculateRandomLocation(Ghost->GetPositionX(), 10);
@@ -374,7 +374,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
{
//MindControlGhost();
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
{
Creature* Shadow = NULL;
float X = CalculateRandomLocation(m_creature->GetPositionX(), 10);
diff --git a/src/bindings/scripts/scripts/outland/black_temple/boss_warlord_najentus.cpp b/src/bindings/scripts/scripts/outland/black_temple/boss_warlord_najentus.cpp
index 0d7e2a7e61d..1150b9e3ae5 100644
--- a/src/bindings/scripts/scripts/outland/black_temple/boss_warlord_najentus.cpp
+++ b/src/bindings/scripts/scripts/outland/black_temple/boss_warlord_najentus.cpp
@@ -175,7 +175,7 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
//m_creature->CastSpell(m_creature, SPELL_NEEDLE_SPINE, true);
std::list<Unit*> target;
SelectTargetList(target, 3, SELECT_TARGET_RANDOM, 80, true);
- for(std::list<Unit*>::iterator i = target.begin(); i != target.end(); ++i)
+ for (std::list<Unit*>::iterator i = target.begin(); i != target.end(); ++i)
m_creature->CastSpell(*i, 39835, true);
events.ScheduleEvent(EVENT_NEEDLE, 15000+rand()%10000, GCD_CAST);
events.DelayEvents(1500, GCD_CAST);
diff --git a/src/bindings/scripts/scripts/outland/black_temple/illidari_council.cpp b/src/bindings/scripts/scripts/outland/black_temple/illidari_council.cpp
index 7530909cb11..7c32bb704dc 100644
--- a/src/bindings/scripts/scripts/outland/black_temple/illidari_council.cpp
+++ b/src/bindings/scripts/scripts/outland/black_temple/illidari_council.cpp
@@ -111,7 +111,7 @@ struct TRINITY_DLL_DECL mob_blood_elf_council_voice_triggerAI : public ScriptedA
{
mob_blood_elf_council_voice_triggerAI(Creature* c) : ScriptedAI(c)
{
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
Council[i] = 0;
}
@@ -195,7 +195,7 @@ struct TRINITY_DLL_DECL mob_illidari_councilAI : public ScriptedAI
mob_illidari_councilAI(Creature *c) : ScriptedAI(c)
{
pInstance = c->GetInstanceData();
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
Council[i] = 0;
}
@@ -218,7 +218,7 @@ struct TRINITY_DLL_DECL mob_illidari_councilAI : public ScriptedAI
DeathCount = 0;
Creature* pMember = NULL;
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
if (pMember = (Unit::GetCreature((*m_creature), Council[i])))
{
@@ -268,7 +268,7 @@ struct TRINITY_DLL_DECL mob_illidari_councilAI : public ScriptedAI
CAST_AI(mob_blood_elf_council_voice_triggerAI, VoiceTrigger->AI())->EventStarted = true;
}
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
Unit* Member = NULL;
if (Council[i])
@@ -319,7 +319,7 @@ struct TRINITY_DLL_DECL mob_illidari_councilAI : public ScriptedAI
if (CheckTimer <= diff)
{
uint8 EvadeCheck = 0;
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
if (Council[i])
{
@@ -353,7 +353,7 @@ struct TRINITY_DLL_DECL boss_illidari_councilAI : public ScriptedAI
boss_illidari_councilAI(Creature* c) : ScriptedAI(c)
{
pInstance = c->GetInstanceData();
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
Council[i] = 0;
LoadedGUIDs = false;
}
@@ -389,7 +389,7 @@ struct TRINITY_DLL_DECL boss_illidari_councilAI : public ScriptedAI
void EnterEvadeMode()
{
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
if (Unit* pUnit = Unit::GetUnit(*m_creature, Council[i]))
if (pUnit != m_creature && pUnit->getVictim())
@@ -407,7 +407,7 @@ struct TRINITY_DLL_DECL boss_illidari_councilAI : public ScriptedAI
return;
damage /= 4;
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
if (Creature* pUnit = Unit::GetCreature(*m_creature, Council[i]))
if (pUnit != m_creature && damage < pUnit->GetHealth())
@@ -485,7 +485,7 @@ struct TRINITY_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_coun
case 0: spellid = SPELL_DEVOTION_AURA; break;
case 1: spellid = SPELL_CHROMATIC_AURA; break;
}
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
Unit* pUnit = Unit::GetUnit((*m_creature), Council[i]);
if (pUnit)
diff --git a/src/bindings/scripts/scripts/outland/black_temple/instance_black_temple.cpp b/src/bindings/scripts/scripts/outland/black_temple/instance_black_temple.cpp
index cd67af9a8f3..1d41f2c63f4 100644
--- a/src/bindings/scripts/scripts/outland/black_temple/instance_black_temple.cpp
+++ b/src/bindings/scripts/scripts/outland/black_temple/instance_black_temple.cpp
@@ -105,7 +105,7 @@ struct TRINITY_DLL_DECL instance_black_temple : public ScriptedInstance
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) return true;
return false;
@@ -117,7 +117,7 @@ struct TRINITY_DLL_DECL instance_black_temple : public ScriptedInstance
if (!players.isEmpty())
{
- for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
if (Player* plr = itr->getSource())
return plr;
@@ -322,7 +322,7 @@ struct TRINITY_DLL_DECL instance_black_temple : public ScriptedInstance
>> m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6]
>> m_auiEncounter[7] >> m_auiEncounter[8];
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS)
m_auiEncounter[i] = NOT_STARTED;
diff --git a/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp b/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp
index 7b25584cf64..75f0c14d884 100644
--- a/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp
+++ b/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp
@@ -120,8 +120,6 @@ struct TRINITY_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI
BlessingOfTides = false;
-
-
if (pInstance)
{
uint64 RAdvisors[3];
@@ -130,7 +128,7 @@ struct TRINITY_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI
RAdvisors[2] = pInstance->GetData64(DATA_CARIBDIS);
//Respawn of the 3 Advisors
Creature* pAdvisor = NULL;
- for(int i=0; i<3; ++i)
+ for (int i=0; i<3; ++i)
if (RAdvisors[i])
{
@@ -145,7 +143,6 @@ struct TRINITY_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI
pInstance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
}
-
}
void EventSharkkisDeath()
@@ -271,7 +268,7 @@ struct TRINITY_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI
BlessingOfTides = true;
bool continueTriggering;
Creature* Advisor;
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
if (Advisors[i])
{
Advisor = (Unit::GetCreature(*m_creature, Advisors[i]));
@@ -315,7 +312,6 @@ struct TRINITY_DLL_DECL boss_fathomguard_sharkkisAI : public ScriptedAI
uint64 SummonedPet;
-
void Reset()
{
LeechingThrow_Timer = 20000;
diff --git a/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp b/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp
index 288b8cf917e..b7324a9850f 100644
--- a/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp
+++ b/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp
@@ -144,7 +144,7 @@ struct TRINITY_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI
}
void DeSummonBeams()
{
- for(uint8 i=0;i<2; ++i)
+ for (uint8 i=0; i<2; ++i)
{
Creature* mob = Unit::GetCreature(*m_creature,beams[i]);
if (mob)
diff --git a/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp b/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp
index 0ee1a68ee0e..bf85c02863d 100644
--- a/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp
+++ b/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp
@@ -190,7 +190,7 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
}else CanAttack = true;
Unit *remo;
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
remo = Unit::GetUnit(*m_creature, ShieldGeneratorChannel[i]);
if (remo)
@@ -244,7 +244,7 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
//remove old tainted cores to prevent cheating in phase 2
Map* pMap = m_creature->GetMap();
Map::PlayerList const &PlayerList = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator i = PlayerList.begin();i != PlayerList.end(); ++i)
+ for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
if (Player* i_pl = i->getSource())
{
@@ -393,7 +393,7 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
DoTeleportTo(MIDDLE_X, MIDDLE_Y, MIDDLE_Z);
Creature *pCreature;
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
pCreature = m_creature->SummonCreature(SHIED_GENERATOR_CHANNEL, ShieldGeneratorChannelPos[i][0], ShieldGeneratorChannelPos[i][1], ShieldGeneratorChannelPos[i][2], ShieldGeneratorChannelPos[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0);
if (pCreature)
@@ -440,7 +440,7 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
bool InMeleeRange = false;
Unit *target;
std::list<HostilReference *> t_list = m_creature->getThreatManager().getThreatList();
- for(std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
+ for (std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
//if in melee range
@@ -584,7 +584,7 @@ struct TRINITY_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI
phase = 1;
Vashj = NULL;
- for (int i = 0;i<8; ++i)//search for nearest waypoint (up on stairs)
+ for (int i = 0; i<8; ++i)//search for nearest waypoint (up on stairs)
{
if (!x || !y || !z)
{
diff --git a/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp b/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp
index f57f0542bdf..7e5922235b1 100644
--- a/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp
+++ b/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp
@@ -130,7 +130,6 @@ struct TRINITY_DLL_DECL mob_inner_demonAI : public ScriptedAI
Link_Timer = 1000;
}else Link_Timer -= diff;
-
if (!m_creature->HasAura(AURA_DEMONIC_ALIGNMENT))
DoCast(m_creature, AURA_DEMONIC_ALIGNMENT,true);
@@ -152,7 +151,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
pInstance = c->GetInstanceData();
Demon = 0;
- for(uint8 i = 0; i < 3; ++i)//clear guids
+ for (uint8 i = 0; i < 3; ++i)//clear guids
SpellBinderGUID[i] = 0;
}
@@ -207,7 +206,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
void CheckChannelers(bool DoEvade = true)
{
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
{
if (Creature *add = Unit::GetCreature(*m_creature,SpellBinderGUID[i]))
add->DisappearAndDie();
@@ -256,7 +255,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
void CheckBanish()
{
uint8 AliveChannelers = 0;
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
{
Unit *add = Unit::GetUnit(*m_creature,SpellBinderGUID[i]);
if (add && add->isAlive())
@@ -306,7 +305,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
//Despawn all Inner Demon summoned
void DespawnDemon()
{
- for(uint8 i=0; i<5; ++i)
+ for (uint8 i=0; i<5; ++i)
{
if (InnderDemon[i])
{
@@ -325,7 +324,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
void CastConsumingMadness() //remove this once SPELL_INSIDIOUS_WHISPER is supported by core
{
- for(uint8 i=0; i<5; ++i)
+ for (uint8 i=0; i<5; ++i)
{
if (InnderDemon[i] > 0)
{
@@ -481,14 +480,14 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
{
std::list<HostilReference *>& ThreatList = m_creature->getThreatManager().getThreatList();
std::vector<Unit *> TargetList;
- for(std::list<HostilReference *>::iterator itr = ThreatList.begin(); itr != ThreatList.end(); ++itr)
+ for (std::list<HostilReference *>::iterator itr = ThreatList.begin(); itr != ThreatList.end(); ++itr)
{
Unit *tempTarget = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
if (tempTarget && tempTarget->GetTypeId() == TYPEID_PLAYER && tempTarget->GetGUID() != m_creature->getVictim()->GetGUID() && TargetList.size()<5)
TargetList.push_back(tempTarget);
}
SpellEntry *spell = GET_SPELL(SPELL_INSIDIOUS_WHISPER);
- for(std::vector<Unit *>::iterator itr = TargetList.begin(); itr != TargetList.end(); ++itr)
+ for (std::vector<Unit *>::iterator itr = TargetList.begin(); itr != TargetList.end(); ++itr)
{
if ((*itr) && (*itr)->isAlive())
{
@@ -724,12 +723,12 @@ struct TRINITY_DLL_DECL mob_greyheart_spellbinderAI : public ScriptedAI
{
Map* pMap = m_creature->GetMap();
Map::PlayerList const &PlayerList = pMap->GetPlayers();
- for(Map::PlayerList::const_iterator itr = PlayerList.begin();itr != PlayerList.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
{
if (Player* i_pl = itr->getSource())
{
bool isCasting = false;
- for(uint8 i = 0; i < CURRENT_MAX_SPELL; ++i)
+ for (uint8 i = 0; i < CURRENT_MAX_SPELL; ++i)
if (i_pl->GetCurrentSpell(i))
isCasting = true;
diff --git a/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp b/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp
index 1146cf96b24..7aca819af4b 100644
--- a/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp
+++ b/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp
@@ -201,8 +201,6 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
return;
}
-
-
if(m_creature->getThreatManager().getThreatList().empty())//check if should evade
{
if(m_creature->isInCombat())
diff --git a/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp
index b624f5ba827..506365c468e 100644
--- a/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp
+++ b/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp
@@ -194,7 +194,7 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
{
DoScriptText(RAND(SAY_SUMMON1,SAY_SUMMON2), m_creature);
- for(uint8 i = 0; i < 10; ++i)
+ for (uint8 i = 0; i < 10; ++i)
{
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0);
Creature* Murloc = m_creature->SummonCreature(MurlocCords[i][0],MurlocCords[i][1],MurlocCords[i][2],MurlocCords[i][3],MurlocCords[i][4], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
@@ -224,7 +224,7 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
using std::set;
set<int>list;
set<int>::iterator itr;
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
counter = 0;
do{target = SelectTarget(SELECT_TARGET_RANDOM, 1, 50, true); //target players only
diff --git a/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp b/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp
index bd917a6e5c7..4229c9a8a06 100644
--- a/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp
+++ b/src/bindings/scripts/scripts/outland/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp
@@ -122,7 +122,7 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) return true;
return false;
@@ -369,7 +369,7 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance
std::istringstream stream(in);
stream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]
>> m_auiEncounter[4] >> m_auiEncounter[5] >> TrashCount;
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead.
m_auiEncounter[i] = NOT_STARTED;
OUT_LOAD_INST_DATA_COMPLETE;
diff --git a/src/bindings/scripts/scripts/outland/coilfang_resevoir/steam_vault/instance_steam_vault.cpp b/src/bindings/scripts/scripts/outland/coilfang_resevoir/steam_vault/instance_steam_vault.cpp
index 1ee00f2ef81..e13aafce51d 100644
--- a/src/bindings/scripts/scripts/outland/coilfang_resevoir/steam_vault/instance_steam_vault.cpp
+++ b/src/bindings/scripts/scripts/outland/coilfang_resevoir/steam_vault/instance_steam_vault.cpp
@@ -80,7 +80,7 @@ struct TRINITY_DLL_DECL instance_steam_vault : public ScriptedInstance
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS)
return true;
@@ -202,7 +202,7 @@ struct TRINITY_DLL_DECL instance_steam_vault : public ScriptedInstance
OUT_LOAD_INST_DATA(in);
std::istringstream stream(in);
stream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3];
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS)
m_auiEncounter[i] = NOT_STARTED;
OUT_LOAD_INST_DATA_COMPLETE;
diff --git a/src/bindings/scripts/scripts/outland/coilfang_resevoir/underbog/boss_the_black_stalker.cpp b/src/bindings/scripts/scripts/outland/coilfang_resevoir/underbog/boss_the_black_stalker.cpp
index 1b76860cf60..6695ce6eb9c 100644
--- a/src/bindings/scripts/scripts/outland/coilfang_resevoir/underbog/boss_the_black_stalker.cpp
+++ b/src/bindings/scripts/scripts/outland/coilfang_resevoir/underbog/boss_the_black_stalker.cpp
@@ -80,7 +80,7 @@ struct TRINITY_DLL_DECL boss_the_black_stalkerAI : public ScriptedAI
void JustDied(Unit *who)
{
- for(std::list<uint64>::iterator i = Striders.begin(); i != Striders.end(); ++i)
+ for (std::list<uint64>::iterator i = Striders.begin(); i != Striders.end(); ++i)
if (Creature *strider = Unit::GetCreature(*m_creature, *i))
strider->DisappearAndDie();
}
diff --git a/src/bindings/scripts/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/src/bindings/scripts/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp
index 849712ab336..30a09538ab2 100644
--- a/src/bindings/scripts/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp
+++ b/src/bindings/scripts/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp
@@ -109,7 +109,7 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
boss_high_king_maulgarAI(Creature *c) : ScriptedAI(c)
{
pInstance = c->GetInstanceData();
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
Council[i] = 0;
}
@@ -138,7 +138,7 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
Phase2 = false;
Creature *pCreature = NULL;
- for(uint8 i = 0; i < 4; ++i)
+ for (uint8 i = 0; i < 4; ++i)
{
if (Council[i])
{
@@ -174,7 +174,6 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
DoScriptText(RAND(SAY_OGRE_DEATH1,SAY_OGRE_DEATH2,SAY_OGRE_DEATH3,SAY_OGRE_DEATH4), m_creature);
}
-
void EnterCombat(Unit *who)
{
StartEvent(who);
@@ -403,7 +402,6 @@ struct TRINITY_DLL_DECL boss_olm_the_summonerAI : public ScriptedAI
DeathCoil_Timer = 20000;
}else DeathCoil_Timer -= diff;
-
DoMeleeAttackIfReady();
}
};
@@ -710,7 +708,7 @@ struct TRINITY_DLL_DECL boss_krosh_firehandAI : public ScriptedAI
Unit *target;
std::list<HostilReference *> t_list = m_creature->getThreatManager().getThreatList();
std::vector<Unit *> target_list;
- for(std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
+ for (std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
//15 yard radius minimum
diff --git a/src/bindings/scripts/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp b/src/bindings/scripts/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp
index 0ac5cbcaf7a..8de6f2ed18a 100644
--- a/src/bindings/scripts/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp
+++ b/src/bindings/scripts/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp
@@ -64,7 +64,7 @@ struct TRINITY_DLL_DECL instance_gruuls_lair : public ScriptedInstance
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) return true;
return false;
@@ -170,7 +170,7 @@ struct TRINITY_DLL_DECL instance_gruuls_lair : public ScriptedInstance
OUT_LOAD_INST_DATA(in);
std::istringstream stream(in);
stream >> m_auiEncounter[0] >> m_auiEncounter[1];
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead.
m_auiEncounter[i] = NOT_STARTED;
OUT_LOAD_INST_DATA_COMPLETE;
diff --git a/src/bindings/scripts/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/src/bindings/scripts/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp
index d47c3eecceb..236b35f0031 100644
--- a/src/bindings/scripts/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp
+++ b/src/bindings/scripts/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp
@@ -71,7 +71,7 @@ struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI
{
pInstance = c->GetInstanceData();
HeroicMode = c->GetMap()->IsHeroic();
- for(uint8 i=0; i<5; ++i)
+ for (uint8 i=0; i<5; ++i)
Channelers[i] = 0;
}
@@ -125,7 +125,7 @@ struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI
addYell = true;
DoScriptText(RAND(SAY_ADD_AGGRO_1,SAY_ADD_AGGRO_2,SAY_ADD_AGGRO_3), m_creature);
}
- for(uint8 i=0; i<5; ++i)
+ for (uint8 i=0; i<5; ++i)
{
Creature *channeler = Unit::GetCreature(*m_creature, Channelers[i]);
if (who && channeler && !channeler->isInCombat())
@@ -135,7 +135,7 @@ struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI
void ChannelerDied(Unit* killer)
{
- for(uint8 i=0; i<5; ++i)
+ for (uint8 i=0; i<5; ++i)
{
Creature *channeler = Unit::GetCreature(*m_creature, Channelers[i]);
if (channeler && channeler->isAlive())
@@ -151,7 +151,7 @@ struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI
SummonChannelers();
if (!channeler1) return NULL;
uint8 i;
- for(i=0; i<5; ++i)
+ for (i=0; i<5; ++i)
{
Creature *channeler = Unit::GetCreature(*m_creature, Channelers[i]);
if (channeler && channeler->GetGUID() == channeler1->GetGUID())
@@ -162,7 +162,7 @@ struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI
void SummonChannelers()
{
- for(uint8 i=0; i<5; ++i)
+ for (uint8 i=0; i<5; ++i)
{
Creature *channeler = Unit::GetCreature(*m_creature, Channelers[i]);
if (!channeler || channeler->isDead())
diff --git a/src/bindings/scripts/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/src/bindings/scripts/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp
index 9c19888c92c..35fd93d0514 100644
--- a/src/bindings/scripts/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp
+++ b/src/bindings/scripts/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp
@@ -94,7 +94,6 @@ struct TRINITY_DLL_DECL boss_the_makerAI : public ScriptedAI
pInstance->HandleGameObject(pInstance->GetData64(DATA_DOOR2), true);
pInstance->HandleGameObject(pInstance->GetData64(DATA_DOOR3), true);
-
}
void UpdateAI(const uint32 diff)
diff --git a/src/bindings/scripts/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/src/bindings/scripts/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp
index 5a18ded0c08..7473f84c5eb 100644
--- a/src/bindings/scripts/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp
+++ b/src/bindings/scripts/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp
@@ -80,7 +80,6 @@ struct TRINITY_DLL_DECL instance_blood_furnace : public ScriptedInstance
PrisonCell8GUID = 0;
}
-
void OnCreatureCreate(Creature* pCreature, bool add)
{
if (!add)
@@ -209,7 +208,7 @@ struct TRINITY_DLL_DECL instance_blood_furnace : public ScriptedInstance
std::istringstream loadStream(in);
loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2];
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS || m_auiEncounter[i] == FAIL)
m_auiEncounter[i] = NOT_STARTED;
@@ -217,7 +216,6 @@ struct TRINITY_DLL_DECL instance_blood_furnace : public ScriptedInstance
}
};
-
InstanceData* GetInstanceData_instance_blood_furnace(Map* pMap)
{
return new instance_blood_furnace(pMap);
diff --git a/src/bindings/scripts/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_vazruden_the_herald.cpp b/src/bindings/scripts/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_vazruden_the_herald.cpp
index 667c672c97d..71043ecaa1f 100644
--- a/src/bindings/scripts/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_vazruden_the_herald.cpp
+++ b/src/bindings/scripts/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_vazruden_the_herald.cpp
@@ -431,7 +431,6 @@ CreatureAI* GetAI_boss_vazruden(Creature* pCreature)
return new boss_vazrudenAI (pCreature);
}
-
CreatureAI* GetAI_boss_nazan(Creature* pCreature)
{
return new boss_nazanAI (pCreature);
diff --git a/src/bindings/scripts/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/src/bindings/scripts/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp
index 3f2dba74aa8..c599f71f04f 100644
--- a/src/bindings/scripts/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp
+++ b/src/bindings/scripts/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp
@@ -257,7 +257,7 @@ struct TRINITY_DLL_DECL boss_magtheridonAI : public ScriptedAI
uint32 ClickerNum = 0;
// now checking if every clicker has debuff from manticron(it is dispelable atm rev 6110 : S)
// if not - apply mind exhaustion and delete from clicker's list
- for(CubeMap::iterator i = Cube.begin(); i != Cube.end(); ++i)
+ for (CubeMap::iterator i = Cube.begin(); i != Cube.end(); ++i)
{
Unit *clicker = Unit::GetUnit(*m_creature, (*i).second);
if (!clicker || !clicker->HasAura(SPELL_SHADOW_GRASP))
diff --git a/src/bindings/scripts/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp b/src/bindings/scripts/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp
index 33946926976..e1778315376 100644
--- a/src/bindings/scripts/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp
+++ b/src/bindings/scripts/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp
@@ -67,7 +67,7 @@ struct TRINITY_DLL_DECL instance_magtheridons_lair : public ScriptedInstance
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) return true;
return false;
}
@@ -135,7 +135,7 @@ struct TRINITY_DLL_DECL instance_magtheridons_lair : public ScriptedInstance
if (m_auiEncounter[1] != NOT_STARTED)
{
m_auiEncounter[1] = NOT_STARTED;
- for(std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i)
+ for (std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i)
{
if (Creature *Channeler = instance->GetCreature(*i))
{
@@ -153,7 +153,7 @@ struct TRINITY_DLL_DECL instance_magtheridons_lair : public ScriptedInstance
{
m_auiEncounter[1] = IN_PROGRESS;
// Let all five channelers aggro.
- for(std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i)
+ for (std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i)
{
Creature *Channeler = instance->GetCreature(*i);
if (Channeler && Channeler->isAlive())
@@ -169,7 +169,7 @@ struct TRINITY_DLL_DECL instance_magtheridons_lair : public ScriptedInstance
HandleGameObject(DoorGUID, false);
}break;
case DONE: // Add buff and check if all channelers are dead.
- for(std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i)
+ for (std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i)
{
Creature *Channeler = instance->GetCreature(*i);
if (Channeler && Channeler->isAlive())
@@ -184,7 +184,7 @@ struct TRINITY_DLL_DECL instance_magtheridons_lair : public ScriptedInstance
break;
case DATA_COLLAPSE:
// true - collapse / false - reset
- for(std::set<uint64>::iterator i = ColumnGUID.begin(); i != ColumnGUID.end(); ++i)
+ for (std::set<uint64>::iterator i = ColumnGUID.begin(); i != ColumnGUID.end(); ++i)
DoUseDoorOrButton(*i);
break;
default:
@@ -219,7 +219,7 @@ struct TRINITY_DLL_DECL instance_magtheridons_lair : public ScriptedInstance
{
if (RespawnTimer <= diff)
{
- for(std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i)
+ for (std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i)
{
if (Creature *Channeler = instance->GetCreature(*i))
{
diff --git a/src/bindings/scripts/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/src/bindings/scripts/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp
index 2fe6fec2684..9a214be170a 100644
--- a/src/bindings/scripts/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp
+++ b/src/bindings/scripts/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp
@@ -177,7 +177,6 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI
RightHeadGUID = 0;
}
-
AggroYell = false;
ThreatYell = false;
ThreatYell2 = false;
@@ -250,7 +249,6 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI
Unit* pLeftHead = Unit::GetUnit(*m_creature,LeftHeadGUID);
Unit* pRightHead = Unit::GetUnit(*m_creature,RightHeadGUID);
-
if (!pLeftHead || !pRightHead)
return;
diff --git a/src/bindings/scripts/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/src/bindings/scripts/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp
index 98a5cea12c3..1ac44b4317d 100644
--- a/src/bindings/scripts/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp
+++ b/src/bindings/scripts/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp
@@ -147,7 +147,7 @@ struct TRINITY_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI
void removeAdds()
{
- for(std::vector<uint64>::iterator itr = adds.begin(); itr!= adds.end(); ++itr)
+ for (std::vector<uint64>::iterator itr = adds.begin(); itr!= adds.end(); ++itr)
{
Unit* temp = Unit::GetUnit((*m_creature),*itr);
if (temp && temp->isAlive())
@@ -159,7 +159,7 @@ struct TRINITY_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI
}
adds.clear();
- for(std::vector<uint64>::iterator itr = assassins.begin(); itr!= assassins.end(); ++itr)
+ for (std::vector<uint64>::iterator itr = assassins.begin(); itr!= assassins.end(); ++itr)
{
Unit* temp = Unit::GetUnit((*m_creature),*itr);
if (temp && temp->isAlive())
@@ -245,7 +245,7 @@ struct TRINITY_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI
{
Unit* target = NULL;
- for(uint8 i = 0; i < summoned; ++i)
+ for (uint8 i = 0; i < summoned; ++i)
{
switch(rand()%3)
{
diff --git a/src/bindings/scripts/scripts/outland/netherstorm.cpp b/src/bindings/scripts/scripts/outland/netherstorm.cpp
index d648c26b571..6364aa74300 100644
--- a/src/bindings/scripts/scripts/outland/netherstorm.cpp
+++ b/src/bindings/scripts/scripts/outland/netherstorm.cpp
@@ -364,12 +364,10 @@ struct TRINITY_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI
{
npc_commander_dawnforgeAI(Creature *c) : ScriptedAI(c) { Reset (); }
-
uint64 PlayerGUID;
uint64 ardonisGUID;
uint64 pathaleonGUID;
-
uint32 Phase;
uint32 PhaseSubphase;
uint32 Phase_Timer;
diff --git a/src/bindings/scripts/scripts/outland/shadowmoon_valley.cpp b/src/bindings/scripts/scripts/outland/shadowmoon_valley.cpp
index 3a6a121ff4d..a1e8d5d8291 100644
--- a/src/bindings/scripts/scripts/outland/shadowmoon_valley.cpp
+++ b/src/bindings/scripts/scripts/outland/shadowmoon_valley.cpp
@@ -61,7 +61,6 @@ enum eMatureNetherwing
NPC_EVENT_PINGER = 22131
};
-
struct TRINITY_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI
{
mob_mature_netherwing_drakeAI(Creature* c) : ScriptedAI(c) { }
@@ -1414,7 +1413,7 @@ struct TRINITY_DLL_DECL npc_lord_illidan_stormrageAI : public ScriptedAI
uint8 FelguardCount = 0;
uint8 DreadlordCount = 0;
- for(uint8 i = 0; i < count; ++i)
+ for (uint8 i = 0; i < count; ++i)
{
Creature* Spawn = NULL;
float X = SpawnLocation[locIndex + i].x;
@@ -1491,7 +1490,7 @@ struct TRINITY_DLL_DECL npc_lord_illidan_stormrageAI : public ScriptedAI
const Group::MemberSlotList members = EventGroup->GetMemberSlots();
- for(Group::member_citerator itr = members.begin(); itr!= members.end(); itr++)
+ for (Group::member_citerator itr = members.begin(); itr!= members.end(); itr++)
{
GroupMember = (Unit::GetPlayer(itr->guid));
if (!GroupMember)
@@ -1517,7 +1516,7 @@ struct TRINITY_DLL_DECL npc_lord_illidan_stormrageAI : public ScriptedAI
if (GroupMemberCount == DeadMemberCount)
{
- for(Group::member_citerator itr = members.begin(); itr!= members.end(); itr++)
+ for (Group::member_citerator itr = members.begin(); itr!= members.end(); itr++)
{
GroupMember = Unit::GetPlayer(itr->guid);
diff --git a/src/bindings/scripts/scripts/outland/shattrath_city.cpp b/src/bindings/scripts/scripts/outland/shattrath_city.cpp
index cd25653fc61..f929aa636c8 100644
--- a/src/bindings/scripts/scripts/outland/shattrath_city.cpp
+++ b/src/bindings/scripts/scripts/outland/shattrath_city.cpp
@@ -280,7 +280,6 @@ struct TRINITY_DLL_DECL npc_kservantAI : public npc_escortAI
public:
npc_kservantAI(Creature *c) : npc_escortAI(c) {}
-
void WaypointReached(uint32 i)
{
Player* pPlayer = GetPlayerForEscort();
diff --git a/src/bindings/scripts/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/src/bindings/scripts/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp
index ebf5484671c..c4eaece8d9f 100644
--- a/src/bindings/scripts/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp
+++ b/src/bindings/scripts/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp
@@ -38,7 +38,6 @@ EndScriptData */
#define MELLICHAR 20904 //skyriss will kill this unit
-
/* Arcatraz encounters:
1 - Zereketh the Unbound event
2 - Dalliah the Doomsayer event
@@ -83,7 +82,7 @@ struct TRINITY_DLL_DECL instance_arcatraz : public ScriptedInstance
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) return true;
return false;
diff --git a/src/bindings/scripts/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp b/src/bindings/scripts/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp
index 2e48e5147a3..9b23a107792 100644
--- a/src/bindings/scripts/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp
+++ b/src/bindings/scripts/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp
@@ -126,7 +126,7 @@ struct TRINITY_DLL_DECL boss_high_botanist_freywinnAI : public ScriptedAI
{
if (!Adds_List.empty())
{
- for(std::list<uint64>::iterator itr = Adds_List.begin(); itr != Adds_List.end(); ++itr)
+ for (std::list<uint64>::iterator itr = Adds_List.begin(); itr != Adds_List.end(); ++itr)
{
if (Unit *temp = Unit::GetUnit(*m_creature,*itr))
{
diff --git a/src/bindings/scripts/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp b/src/bindings/scripts/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp
index e06b1b03a41..486b60b41a5 100644
--- a/src/bindings/scripts/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp
+++ b/src/bindings/scripts/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp
@@ -147,7 +147,7 @@ struct TRINITY_DLL_DECL boss_warp_splinterAI : public ScriptedAI
void SummonTreants()
{
- for(uint8 i = 0; i < 6; ++i)
+ for (uint8 i = 0; i < 6; ++i)
{
float angle = (M_PI / 3) * i;
diff --git a/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_alar.cpp b/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_alar.cpp
index b96ca667835..d62e5557e6e 100644
--- a/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_alar.cpp
+++ b/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_alar.cpp
@@ -288,7 +288,7 @@ struct TRINITY_DLL_DECL boss_alarAI : public ScriptedAI
WaitTimer = 2000;
return;
case WE_SUMMON:
- for(uint8 i = 0; i < 2; ++i)
+ for (uint8 i = 0; i < 2; ++i)
DoSpawnCreature(CREATURE_EMBER_OF_ALAR, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
m_creature->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
diff --git a/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp
index 7cf9f3b1c62..2b0ed6aa225 100644
--- a/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp
+++ b/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp
@@ -263,7 +263,7 @@ struct TRINITY_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI
//After these 50 seconds she portals to the middle of the room and disappears, leaving 3 light portals behind.
m_creature->GetMotionMaster()->Clear();
m_creature->GetMap()->CreatureRelocation(m_creature, CENTER_X, CENTER_Y, CENTER_Z, CENTER_O);
- for(uint8 i=0; i<=2; ++i)
+ for (uint8 i=0; i<=2; ++i)
{
if (!i)
{
diff --git a/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp
index 2341f78ebe3..ab6f38d846c 100644
--- a/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp
+++ b/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp
@@ -332,7 +332,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
void PrepareAdvisors()
{
- for(uint8 i = 0; i < MAX_ADVISORS; ++i)
+ for (uint8 i = 0; i < MAX_ADVISORS; ++i)
{
if (Creature *pCreature = Unit::GetCreature((*m_creature), m_auiAdvisorGuid[i]))
{
@@ -451,7 +451,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
if (m_pInstance)
m_pInstance->SetData(DATA_KAELTHASEVENT, 0);
- for(uint8 i = 0; i < MAX_ADVISORS; ++i)
+ for (uint8 i = 0; i < MAX_ADVISORS; ++i)
{
if (Unit* pAdvisor = Unit::GetUnit((*m_creature), m_auiAdvisorGuid[i]))
pAdvisor->Kill(pAdvisor);
diff --git a/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp b/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp
index c1de7772120..5db46a68bb2 100644
--- a/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp
+++ b/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp
@@ -111,7 +111,7 @@ struct TRINITY_DLL_DECL boss_void_reaverAI : public ScriptedAI
Unit *target = NULL;
std::list<HostilReference *> t_list = m_creature->getThreatManager().getThreatList();
std::vector<Unit *> target_list;
- for(std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
+ for (std::list<HostilReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
{
target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());
if (!target)
diff --git a/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp b/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp
index f973f96c1ff..16ae07fe034 100644
--- a/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp
+++ b/src/bindings/scripts/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp
@@ -68,7 +68,7 @@ struct TRINITY_DLL_DECL instance_the_eye : public ScriptedInstance
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) return true;
return false;
@@ -153,7 +153,7 @@ struct TRINITY_DLL_DECL instance_the_eye : public ScriptedInstance
OUT_LOAD_INST_DATA(in);
std::istringstream stream(in);
stream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3];
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead.
m_auiEncounter[i] = NOT_STARTED;
OUT_LOAD_INST_DATA_COMPLETE;
diff --git a/src/bindings/scripts/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/src/bindings/scripts/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp
index 02e44616b52..f26efdf25f9 100644
--- a/src/bindings/scripts/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp
+++ b/src/bindings/scripts/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp
@@ -107,7 +107,7 @@ struct TRINITY_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI
if (Summon_Timer < diff)
{
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
{
Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0);
Creature* Wraith = m_creature->SummonCreature(21062,m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
diff --git a/src/bindings/scripts/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp b/src/bindings/scripts/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp
index e43190620d9..9a30eec6f71 100644
--- a/src/bindings/scripts/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp
+++ b/src/bindings/scripts/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp
@@ -30,7 +30,6 @@ struct TRINITY_DLL_DECL instance_mechanar : public ScriptedInstance
{
instance_mechanar(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
-
uint32 m_auiEncounter[MAX_ENCOUNTER];
void Initialize()
@@ -40,7 +39,7 @@ struct TRINITY_DLL_DECL instance_mechanar : public ScriptedInstance
bool IsEncounterInProgress() const
{
- for(uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
if (m_auiEncounter[i] == IN_PROGRESS)
return true;
diff --git a/src/bindings/scripts/scripts/outland/terokkar_forest.cpp b/src/bindings/scripts/scripts/outland/terokkar_forest.cpp
index 76776234d98..1d0d0bdc144 100644
--- a/src/bindings/scripts/scripts/outland/terokkar_forest.cpp
+++ b/src/bindings/scripts/scripts/outland/terokkar_forest.cpp
@@ -84,7 +84,7 @@ struct TRINITY_DLL_DECL mob_unkor_the_ruthlessAI : public ScriptedAI
{
if (Group* pGroup = CAST_PLR(done_by)->GetGroup())
{
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *pGroupie = itr->getSource();
if (pGroupie &&
@@ -168,7 +168,6 @@ CreatureAI* GetAI_mob_infested_root_walker(Creature* pCreature)
return new mob_infested_root_walkerAI (pCreature);
}
-
/*######
## mob_skywing
######*/
@@ -580,7 +579,6 @@ struct TRINITY_DLL_DECL npc_akunoAI : public npc_escortAI
if(IsWalking && !m_creature->HasUnitMovementFlag(MOVEMENTFLAG_WALK_MODE))
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
-
switch(i)
{
case 0: m_creature->setFaction(5); break;
diff --git a/src/bindings/scripts/scripts/world/boss_emeriss.cpp b/src/bindings/scripts/scripts/world/boss_emeriss.cpp
index fa53ed89d21..89c3840de80 100644
--- a/src/bindings/scripts/scripts/world/boss_emeriss.cpp
+++ b/src/bindings/scripts/scripts/world/boss_emeriss.cpp
@@ -47,7 +47,6 @@ struct TRINITY_DLL_DECL boss_emerissAI : public ScriptedAI
uint32 m_uiVolatileInfection_Timer;
uint32 m_uiCorruptionsCasted;
-
void Reset()
{
m_uiSleep_Timer = 15000 + rand()%5000;
@@ -107,7 +106,6 @@ struct TRINITY_DLL_DECL boss_emerissAI : public ScriptedAI
//else
// m_uiMarkOfNature_Timer -= uiDiff;
-
//VolatileInfection_Timer
if (m_uiVolatileInfection_Timer < uiDiff)
{
diff --git a/src/bindings/scripts/scripts/world/boss_taerar.cpp b/src/bindings/scripts/scripts/world/boss_taerar.cpp
index 6659924c41b..a3a6e87f2d5 100644
--- a/src/bindings/scripts/scripts/world/boss_taerar.cpp
+++ b/src/bindings/scripts/scripts/world/boss_taerar.cpp
@@ -182,7 +182,7 @@ struct TRINITY_DLL_DECL boss_taerarAI : public ScriptedAI
int iSize = sizeof(m_auiSpellSummonShade) / sizeof(uint32);
- for(int i = 0; i < iSize; ++i)
+ for (int i = 0; i < iSize; ++i)
m_creature->CastSpell(pTarget, m_auiSpellSummonShade[i], true);
++m_uiShadesSummoned; // prevent casting twice at same health
diff --git a/src/bindings/scripts/scripts/world/boss_ysondre.cpp b/src/bindings/scripts/scripts/world/boss_ysondre.cpp
index 2f3948d38d9..5f612b43f0a 100644
--- a/src/bindings/scripts/scripts/world/boss_ysondre.cpp
+++ b/src/bindings/scripts/scripts/world/boss_ysondre.cpp
@@ -136,7 +136,7 @@ struct TRINITY_DLL_DECL boss_ysondreAI : public ScriptedAI
{
DoScriptText(SAY_SUMMONDRUIDS, m_creature);
- for(int i = 0; i < 10; ++i)
+ for (int i = 0; i < 10; ++i)
DoCast(m_creature, SPELL_SUMMONDRUIDS, true);
++m_uiSummonDruidModifier;
diff --git a/src/bindings/scripts/scripts/world/mob_generic_creature.cpp b/src/bindings/scripts/scripts/world/mob_generic_creature.cpp
index 45807337f5e..4d53ba575de 100644
--- a/src/bindings/scripts/scripts/world/mob_generic_creature.cpp
+++ b/src/bindings/scripts/scripts/world/mob_generic_creature.cpp
@@ -144,7 +144,6 @@ struct TRINITY_DLL_DECL generic_creatureAI : public ScriptedAI
//Set our global cooldown
GlobalCooldown = GENERIC_CREATURE_COOLDOWN;
-
}//If no spells available and we arn't moving run to target
else if (IsSelfRooted)
{
diff --git a/src/bindings/scripts/scripts/world/npc_professions.cpp b/src/bindings/scripts/scripts/world/npc_professions.cpp
index 484339c59bb..08822f58ecd 100644
--- a/src/bindings/scripts/scripts/world/npc_professions.cpp
+++ b/src/bindings/scripts/scripts/world/npc_professions.cpp
@@ -224,14 +224,14 @@ bool EquippedOk(Player* pPlayer, uint32 spellId)
if (!spell)
return false;
- for(uint8 i=0; i<3; ++i)
+ for (uint8 i=0; i<3; ++i)
{
uint32 reqSpell = spell->EffectTriggerSpell[i];
if (!reqSpell)
continue;
Item* pItem;
- for(uint8 j = EQUIPMENT_SLOT_START; j < EQUIPMENT_SLOT_END; j++)
+ for (uint8 j = EQUIPMENT_SLOT_START; j < EQUIPMENT_SLOT_END; j++)
{
pItem = pPlayer->GetItemByPos(INVENTORY_SLOT_BAG_0, j);
if (pItem)
diff --git a/src/bindings/scripts/scripts/world/npcs_special.cpp b/src/bindings/scripts/scripts/world/npcs_special.cpp
index ce1d73caf5e..176522e3bbd 100644
--- a/src/bindings/scripts/scripts/world/npcs_special.cpp
+++ b/src/bindings/scripts/scripts/world/npcs_special.cpp
@@ -650,11 +650,11 @@ void npc_doctorAI::BeginEvent(Player* pPlayer)
switch(m_creature->GetEntry())
{
case DOCTOR_ALLIANCE:
- for(uint8 i = 0; i < ALLIANCE_COORDS; ++i)
+ for (uint8 i = 0; i < ALLIANCE_COORDS; ++i)
Coordinates.push_back(&AllianceCoords[i]);
break;
case DOCTOR_HORDE:
- for(uint8 i = 0; i < HORDE_COORDS; ++i)
+ for (uint8 i = 0; i < HORDE_COORDS; ++i)
Coordinates.push_back(&HordeCoords[i]);
break;
}
@@ -701,7 +701,7 @@ void npc_doctorAI::PatientSaved(Creature* soldier, Player* pPlayer, Location* Po
if (!Patients.empty())
{
std::list<uint64>::iterator itr;
- for(itr = Patients.begin(); itr != Patients.end(); ++itr)
+ for (itr = Patients.begin(); itr != Patients.end(); ++itr)
{
if (Creature* Patient = Unit::GetCreature((*m_creature), *itr))
Patient->setDeathState(JUST_DIED);
@@ -1725,7 +1725,7 @@ struct TRINITY_DLL_DECL npc_ebon_gargoyleAI : CasterAI
Trinity::AnyUnfriendlyUnitInObjectRangeCheck u_check(m_creature, m_creature, 30);
Trinity::UnitListSearcher<Trinity::AnyUnfriendlyUnitInObjectRangeCheck> searcher(m_creature, targets, u_check);
m_creature->VisitNearbyObject(30, searcher);
- for(std::list<Unit*>::iterator iter = targets.begin(); iter != targets.end(); ++iter)
+ for (std::list<Unit*>::iterator iter = targets.begin(); iter != targets.end(); ++iter)
if((*iter)->GetAura(49206,owner->GetGUID()))
{
me->Attack((*iter),false);
diff --git a/src/framework/Dynamic/ObjectRegistry.h b/src/framework/Dynamic/ObjectRegistry.h
index 8c2659e8f53..d2e0ffc35cc 100644
--- a/src/framework/Dynamic/ObjectRegistry.h
+++ b/src/framework/Dynamic/ObjectRegistry.h
@@ -83,7 +83,7 @@ class TRINITY_DLL_DECL ObjectRegistry
{
unsigned int sz = l.size();
l.resize(sz + i_registeredObjects.size());
- for(typename RegistryMapType::const_iterator iter = i_registeredObjects.begin(); iter != i_registeredObjects.end(); ++iter)
+ for (typename RegistryMapType::const_iterator iter = i_registeredObjects.begin(); iter != i_registeredObjects.end(); ++iter)
l[sz++] = iter->first;
return i_registeredObjects.size();
}
@@ -102,7 +102,7 @@ class TRINITY_DLL_DECL ObjectRegistry
ObjectRegistry() {}
~ObjectRegistry()
{
- for(typename RegistryMapType::iterator iter=i_registeredObjects.begin(); iter != i_registeredObjects.end(); ++iter)
+ for (typename RegistryMapType::iterator iter=i_registeredObjects.begin(); iter != i_registeredObjects.end(); ++iter)
delete iter->second;
i_registeredObjects.clear();
}
diff --git a/src/framework/GameSystem/NGrid.h b/src/framework/GameSystem/NGrid.h
index 6ba5d10ffc1..ecb00e6d6f4 100644
--- a/src/framework/GameSystem/NGrid.h
+++ b/src/framework/GameSystem/NGrid.h
@@ -87,7 +87,7 @@ class TRINITY_DLL_DECL NGrid
ASSERT(y < N);
return i_cells[x][y];
}
-
+
GridType& operator()(unsigned short x, unsigned short y)
{
ASSERT(x < N);
@@ -131,8 +131,8 @@ class TRINITY_DLL_DECL NGrid
template<class T, class TT> void Visit(TypeContainerVisitor<T, TypeMapContainer<TT> > &visitor)
{
- for(unsigned int x=0; x < N; ++x)
- for(unsigned int y=0; y < N; ++y)
+ for (unsigned int x=0; x < N; ++x)
+ for (unsigned int y=0; y < N; ++y)
getGridType(x, y).Visit(visitor);
}
@@ -144,8 +144,8 @@ class TRINITY_DLL_DECL NGrid
unsigned int ActiveObjectsInGrid(void) const
{
unsigned int count=0;
- for(unsigned int x=0; x < N; ++x)
- for(unsigned int y=0; y < N; ++y)
+ for (unsigned int x=0; x < N; ++x)
+ for (unsigned int y=0; y < N; ++y)
count += i_cells[x][y].ActiveObjectsInGrid();
return count;
}
diff --git a/src/framework/Platform/Define.h b/src/framework/Platform/Define.h
index d29a53dbf31..9e6a34e3869 100644
--- a/src/framework/Platform/Define.h
+++ b/src/framework/Platform/Define.h
@@ -163,6 +163,5 @@ typedef uint64 OBJECT_HANDLE;
#define CLIENT_VER 313
#endif
-
#endif //TRINITY_DEFINE_H
diff --git a/src/framework/Utilities/EventProcessor.cpp b/src/framework/Utilities/EventProcessor.cpp
index 852f84bc4e2..d3b8bd20d67 100644
--- a/src/framework/Utilities/EventProcessor.cpp
+++ b/src/framework/Utilities/EventProcessor.cpp
@@ -66,7 +66,7 @@ void EventProcessor::KillAllEvents(bool force)
m_aborting = true;
// first, abort all existing events
- for (EventList::iterator i = m_events.begin(); i != m_events.end();)
+ for (EventList::iterator i = m_events.begin(); i != m_events.end(); )
{
EventList::iterator i_old = i;
++i;
diff --git a/src/framework/Utilities/LinkedList.h b/src/framework/Utilities/LinkedList.h
index 171ff3601e3..12fa878d07f 100644
--- a/src/framework/Utilities/LinkedList.h
+++ b/src/framework/Utilities/LinkedList.h
@@ -145,7 +145,6 @@ class LinkedListHead
typedef _Ty& reference;
typedef _Ty const & const_reference;
-
Iterator() : _Ptr(0)
{ // construct with null node pointer
}
@@ -231,7 +230,6 @@ class LinkedListHead
return (_Ptr != &_Right);
}
-
pointer _Mynode()
{ // return node pointer
return (_Ptr);
diff --git a/src/game/AchievementMgr.cpp b/src/game/AchievementMgr.cpp
index c9b98c3ddef..a2c76ffb4c6 100644
--- a/src/game/AchievementMgr.cpp
+++ b/src/game/AchievementMgr.cpp
@@ -39,7 +39,6 @@
#include "BattleGround.h"
#include "BattleGroundAB.h"
-
INSTANTIATE_SINGLETON_1(AchievementGlobalMgr);
namespace MaNGOS
@@ -72,7 +71,6 @@ namespace MaNGOS
};
} // namespace MaNGOS
-
bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
{
if(dataType >= MAX_ACHIEVEMENT_CRITERIA_DATA_TYPE)
@@ -320,7 +318,7 @@ bool AchievementCriteriaData::Meets(Player const* source, Unit const* target, ui
bool AchievementCriteriaDataSet::Meets(Player const* source, Unit const* target, uint32 miscvalue /*= 0*/) const
{
- for(Storage::const_iterator itr = storage.begin(); itr != storage.end(); ++itr)
+ for (Storage::const_iterator itr = storage.begin(); itr != storage.end(); ++itr)
if(!itr->Meets(source,target,miscvalue))
return false;
@@ -338,14 +336,14 @@ AchievementMgr::~AchievementMgr()
void AchievementMgr::Reset()
{
- for(CompletedAchievementMap::const_iterator iter = m_completedAchievements.begin(); iter!=m_completedAchievements.end(); ++iter)
+ for (CompletedAchievementMap::const_iterator iter = m_completedAchievements.begin(); iter!=m_completedAchievements.end(); ++iter)
{
WorldPacket data(SMSG_ACHIEVEMENT_DELETED,4);
data << uint32(iter->first);
m_player->SendDirectMessage(&data);
}
- for(CriteriaProgressMap::const_iterator iter = m_criteriaProgress.begin(); iter!=m_criteriaProgress.end(); ++iter)
+ for (CriteriaProgressMap::const_iterator iter = m_criteriaProgress.begin(); iter!=m_criteriaProgress.end(); ++iter)
{
WorldPacket data(SMSG_CRITERIA_DELETED,4);
data << uint32(iter->first);
@@ -369,7 +367,7 @@ void AchievementMgr::ResetAchievementCriteria(AchievementCriteriaTypes type, uin
return;
AchievementCriteriaEntryList const& achievementCriteriaList = achievementmgr.GetAchievementCriteriaByType(type);
- for(AchievementCriteriaEntryList::const_iterator i = achievementCriteriaList.begin(); i!=achievementCriteriaList.end(); ++i)
+ for (AchievementCriteriaEntryList::const_iterator i = achievementCriteriaList.begin(); i!=achievementCriteriaList.end(); ++i)
{
AchievementCriteriaEntry const *achievementCriteria = (*i);
@@ -415,7 +413,7 @@ void AchievementMgr::SaveToDB()
bool need_execute = false;
std::ostringstream ssdel;
std::ostringstream ssins;
- for(CompletedAchievementMap::iterator iter = m_completedAchievements.begin(); iter!=m_completedAchievements.end(); ++iter)
+ for (CompletedAchievementMap::iterator iter = m_completedAchievements.begin(); iter!=m_completedAchievements.end(); ++iter)
{
if(!iter->second.changed)
continue;
@@ -459,7 +457,7 @@ void AchievementMgr::SaveToDB()
bool need_execute_ins = false;
std::ostringstream ssdel;
std::ostringstream ssins;
- for(CriteriaProgressMap::iterator iter = m_criteriaProgress.begin(); iter!=m_criteriaProgress.end(); ++iter)
+ for (CriteriaProgressMap::iterator iter = m_criteriaProgress.begin(); iter!=m_criteriaProgress.end(); ++iter)
{
if(!iter->second.changed)
continue;
@@ -640,7 +638,7 @@ void AchievementMgr::SendCriteriaUpdate(uint32 id, CriteriaProgress const* progr
void AchievementMgr::CheckAllAchievementCriteria()
{
// suppress sending packets
- for(uint32 i=0; i<ACHIEVEMENT_CRITERIA_TYPE_TOTAL; ++i)
+ for (uint32 i=0; i<ACHIEVEMENT_CRITERIA_TYPE_TOTAL; ++i)
UpdateAchievementCriteria(AchievementCriteriaTypes(i));
}
@@ -668,7 +666,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
return;
AchievementCriteriaEntryList const& achievementCriteriaList = achievementmgr.GetAchievementCriteriaByType(type);
- for(AchievementCriteriaEntryList::const_iterator i = achievementCriteriaList.begin(); i!=achievementCriteriaList.end(); ++i)
+ for (AchievementCriteriaEntryList::const_iterator i = achievementCriteriaList.begin(); i!=achievementCriteriaList.end(); ++i)
{
AchievementCriteriaEntry const *achievementCriteria = (*i);
@@ -820,7 +818,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST_COUNT:
{
uint32 counter =0;
- for(QuestStatusMap::const_iterator itr = GetPlayer()->getQuestStatusMap().begin(); itr!=GetPlayer()->getQuestStatusMap().end(); itr++)
+ for (QuestStatusMap::const_iterator itr = GetPlayer()->getQuestStatusMap().begin(); itr!=GetPlayer()->getQuestStatusMap().end(); itr++)
if(itr->second.m_rewarded)
counter++;
SetCriteriaProgress(achievementCriteria, counter);
@@ -833,7 +831,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
continue;
uint32 counter =0;
- for(QuestStatusMap::const_iterator itr = GetPlayer()->getQuestStatusMap().begin(); itr!=GetPlayer()->getQuestStatusMap().end(); itr++)
+ for (QuestStatusMap::const_iterator itr = GetPlayer()->getQuestStatusMap().begin(); itr!=GetPlayer()->getQuestStatusMap().end(); itr++)
{
Quest const* quest = objmgr.GetQuestTemplate(itr->first);
if(itr->second.m_rewarded && quest->GetZoneOrSort() >= 0 && uint32(quest->GetZoneOrSort()) == achievementCriteria->complete_quests_in_zone.zoneID)
@@ -865,7 +863,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
continue;
// skip wrong arena achievements, if not achievIdByArenaSlot then normal total death counter
bool notfit = false;
- for(int j = 0; j < MAX_ARENA_SLOT; ++j)
+ for (int j = 0; j < MAX_ARENA_SLOT; ++j)
{
if(achievIdByArenaSlot[j] == achievement->ID)
{
@@ -894,7 +892,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
// search case
bool found = false;
- for(int j = 0; achievIdForDangeon[j][0]; ++j)
+ for (int j = 0; achievIdForDangeon[j][0]; ++j)
{
if(achievIdForDangeon[j][0] == achievement->ID)
{
@@ -1008,7 +1006,6 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
break;
}
-
SetCriteriaProgress(achievementCriteria, 1);
break;
}
@@ -1257,7 +1254,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
++spellIter)
{
SkillLineAbilityMapBounds bounds = spellmgr.GetSkillLineAbilityMapBounds(spellIter->first);
- for(SkillLineAbilityMap::const_iterator skillIter = bounds.first; skillIter != bounds.second; ++skillIter)
+ for (SkillLineAbilityMap::const_iterator skillIter = bounds.first; skillIter != bounds.second; ++skillIter)
{
if(skillIter->second->skillId == achievementCriteria->learn_skillline_spell.skillLine)
spellCount++;
@@ -1304,7 +1301,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
++spellIter)
{
SkillLineAbilityMapBounds bounds = spellmgr.GetSkillLineAbilityMapBounds(spellIter->first);
- for(SkillLineAbilityMap::const_iterator skillIter = bounds.first; skillIter != bounds.second; ++skillIter)
+ for (SkillLineAbilityMap::const_iterator skillIter = bounds.first; skillIter != bounds.second; ++skillIter)
if (skillIter->second->skillId == achievementCriteria->learn_skill_line.skillLine)
spellCount++;
}
@@ -1375,7 +1372,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
if(AchievementEntryList const* achRefList = achievementmgr.GetAchievementByReferencedId(achievement->ID))
{
- for(AchievementEntryList::const_iterator itr = achRefList->begin(); itr != achRefList->end(); ++itr)
+ for (AchievementEntryList::const_iterator itr = achRefList->begin(); itr != achRefList->end(); ++itr)
if(IsCompletedAchievement(*itr))
CompletedAchievement(*itr);
}
@@ -1413,12 +1410,12 @@ bool AchievementMgr::IsCompletedCriteria(AchievementCriteriaEntry const* achieve
case ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL:
{
// skip wrong class achievements
- for(int i = 1; i < MAX_CLASSES; ++i)
+ for (int i = 1; i < MAX_CLASSES; ++i)
if(achievIdByClass[i] == achievement->ID && i != GetPlayer()->getClass())
return false;
// skip wrong race achievements
- for(int i = 1; i < MAX_RACES; ++i)
+ for (int i = 1; i < MAX_RACES; ++i)
if(achievIdByRace[i] == achievement->ID && i != GetPlayer()->getRace())
return false;
@@ -1564,7 +1561,7 @@ bool AchievementMgr::IsCompletedAchievement(AchievementEntry const* entry)
// Oddly, the target count is NOT countained in the achievement, but in each individual criteria
if (entry->flags & ACHIEVEMENT_FLAG_SUMM)
{
- for(AchievementCriteriaEntryList::const_iterator itr = cList->begin(); itr != cList->end(); ++itr)
+ for (AchievementCriteriaEntryList::const_iterator itr = cList->begin(); itr != cList->end(); ++itr)
{
AchievementCriteriaEntry const* criteria = *itr;
@@ -1584,7 +1581,7 @@ bool AchievementMgr::IsCompletedAchievement(AchievementEntry const* entry)
// Default case - need complete all or
bool completed_all = true;
- for(AchievementCriteriaEntryList::const_iterator itr = cList->begin(); itr != cList->end(); ++itr)
+ for (AchievementCriteriaEntryList::const_iterator itr = cList->begin(); itr != cList->end(); ++itr)
{
AchievementCriteriaEntry const* criteria = *itr;
@@ -1676,7 +1673,7 @@ void AchievementMgr::CompletedAchievement(AchievementEntry const* achievement)
if(!sWorld.getConfig(CONFIG_GM_ALLOW_ACHIEVEMENT_GAINS) && m_player->GetSession()->GetSecurity() > SEC_PLAYER)
return;
-
+
if(achievement->flags & ACHIEVEMENT_FLAG_COUNTER || m_completedAchievements.find(achievement->ID)!=m_completedAchievements.end())
return;
@@ -1755,7 +1752,7 @@ void AchievementMgr::SendAllAchievementData()
else
data.resize( 0x7fff );
// More than this causes client trouble
-
+
CompletedAchievementMap::const_iterator iter = m_completedAchievements.begin();
CriteriaProgressMap::const_iterator iter2 = m_criteriaProgress.begin();
@@ -1765,10 +1762,10 @@ void AchievementMgr::SendAllAchievementData()
{
data.clear();
send = false;
-
+
if( !cAchievements )
{
- for(; iter != m_completedAchievements.end() && !send; ++iter)
+ for (; iter != m_completedAchievements.end() && !send; ++iter)
{
data << uint32(iter->first);
data << uint32(secsToTimeBitFields(iter->second.date));
@@ -1780,7 +1777,7 @@ void AchievementMgr::SendAllAchievementData()
}
data << int32(-1);
- for(; iter2 != m_criteriaProgress.end() && !send; ++iter2)
+ for (; iter2 != m_criteriaProgress.end() && !send; ++iter2)
{
data << uint32(iter2->first);
data.appendPackGUID(iter2->second.counter);
@@ -1791,7 +1788,7 @@ void AchievementMgr::SendAllAchievementData()
data << uint32(0);
send = data.size() > 0x7f00;
}
-
+
if( iter2 == m_criteriaProgress.end() )
cProgress = true;
@@ -1814,14 +1811,14 @@ void AchievementMgr::SendRespondInspectAchievements(Player* player)
*/
void AchievementMgr::BuildAllDataPacket(WorldPacket *data)
{
- for(CompletedAchievementMap::const_iterator iter = m_completedAchievements.begin(); iter!=m_completedAchievements.end(); ++iter)
+ for (CompletedAchievementMap::const_iterator iter = m_completedAchievements.begin(); iter!=m_completedAchievements.end(); ++iter)
{
*data << uint32(iter->first);
*data << uint32(secsToTimeBitFields(iter->second.date));
}
*data << int32(-1);
- for(CriteriaProgressMap::const_iterator iter = m_criteriaProgress.begin(); iter!=m_criteriaProgress.end(); ++iter)
+ for (CriteriaProgressMap::const_iterator iter = m_criteriaProgress.begin(); iter!=m_criteriaProgress.end(); ++iter)
{
*data << uint32(iter->first);
data->appendPackGUID(iter->second.counter);
@@ -2209,7 +2206,7 @@ void AchievementGlobalMgr::LoadRewardLocales()
AchievementRewardLocale& data = m_achievementRewardLocales[entry];
- for(int i = 1; i < MAX_LOCALE; ++i)
+ for (int i = 1; i < MAX_LOCALE; ++i)
{
std::string str = fields[1+2*(i-1)].GetCppString();
if(!str.empty())
@@ -2240,7 +2237,6 @@ void AchievementGlobalMgr::LoadRewardLocales()
delete result;
-
sLog.outString();
sLog.outString( ">> Loaded %lu achievement reward locale strings", (unsigned long)m_achievementRewardLocales.size() );
}
diff --git a/src/game/AchievementMgr.h b/src/game/AchievementMgr.h
index 5020539bb5c..d031672f2a5 100644
--- a/src/game/AchievementMgr.h
+++ b/src/game/AchievementMgr.h
@@ -186,7 +186,6 @@ struct AchievementCriteriaDataSet
Storage storage;
};
-
typedef std::map<uint32,AchievementCriteriaDataSet> AchievementCriteriaDataMap;
struct AchievementReward
@@ -208,7 +207,6 @@ struct AchievementRewardLocale
typedef std::map<uint32,AchievementRewardLocale> AchievementRewardLocales;
-
struct CompletedAchievementData
{
time_t date;
diff --git a/src/game/ArenaTeam.cpp b/src/game/ArenaTeam.cpp
index 22d121c38c1..96468f20c42 100644
--- a/src/game/ArenaTeam.cpp
+++ b/src/game/ArenaTeam.cpp
@@ -298,7 +298,7 @@ void ArenaTeam::DelMember(uint64 guid)
player->SetInArenaTeam(0, GetSlot());
player->GetSession()->SendArenaTeamCommandResult(ERR_ARENA_TEAM_QUIT_S, GetName(), "", 0);
// delete all info regarding this team
- for(uint8 i = 0; i < 6; ++i)
+ for (uint8 i = 0; i < 6; ++i)
{
player->SetUInt32Value(PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + (GetSlot() * 6) + i, 0);
}
@@ -401,7 +401,7 @@ void ArenaTeam::NotifyStatsChanged()
{
// this is called after a rated match ended
// updates arena team stats for every member of the team (not only the ones who participated!)
- for(MemberList::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
+ for (MemberList::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
Player * plr = objmgr.GetPlayer(itr->guid);
if(plr)
@@ -550,7 +550,7 @@ void ArenaTeam::FinishGame(int32 mod)
// update team's rank
m_stats.rank = 1;
ObjectMgr::ArenaTeamMap::const_iterator i = objmgr.GetArenaTeamMapBegin();
- for ( ; i != objmgr.GetArenaTeamMapEnd(); ++i)
+ for (; i != objmgr.GetArenaTeamMapEnd(); ++i)
{
if (i->second->GetType() == m_Type && i->second->GetStats().rating > m_stats.rating)
++m_stats.rank;
@@ -590,7 +590,7 @@ int32 ArenaTeam::LostAgainst(uint32 againstRating)
void ArenaTeam::MemberLost(Player * plr, uint32 againstRating)
{
// called for each participant of a match after losing
- for(MemberList::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
+ for (MemberList::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
if(itr->guid == plr->GetGUID())
{
@@ -612,7 +612,7 @@ void ArenaTeam::MemberLost(Player * plr, uint32 againstRating)
void ArenaTeam::OfflineMemberLost(uint64 guid, uint32 againstRating)
{
// called for offline player after ending rated arena match!
- for(MemberList::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
+ for (MemberList::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
if(itr->guid == guid)
{
@@ -634,7 +634,7 @@ void ArenaTeam::OfflineMemberLost(uint64 guid, uint32 againstRating)
void ArenaTeam::MemberWon(Player * plr, uint32 againstRating)
{
// called for each participant after winning a match
- for(MemberList::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
+ for (MemberList::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
if(itr->guid == plr->GetGUID())
{
@@ -664,7 +664,7 @@ void ArenaTeam::UpdateArenaPointsHelper(std::map<uint32, uint32>& PlayerPoints)
return;
// to get points, a player has to participate in at least 30% of the matches
uint32 min_plays = (uint32) ceil(m_stats.games_week * 0.3);
- for(MemberList::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
+ for (MemberList::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
// the player participated in enough games, update his points
uint32 points_to_add = 0;
@@ -690,7 +690,7 @@ void ArenaTeam::SaveToDB()
// called after a match has ended, or when calculating arena_points
CharacterDatabase.BeginTransaction();
CharacterDatabase.PExecute("UPDATE arena_team_stats SET rating = '%u',games = '%u',played = '%u',rank = '%u',wins = '%u',wins2 = '%u' WHERE arenateamid = '%u'", m_stats.rating, m_stats.games_week, m_stats.games_season, m_stats.rank, m_stats.wins_week, m_stats.wins_season, GetId());
- for(MemberList::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
+ for (MemberList::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
CharacterDatabase.PExecute("UPDATE arena_team_member SET played_week = '%u', wons_week = '%u', played_season = '%u', wons_season = '%u', personal_rating = '%u' WHERE arenateamid = '%u' AND guid = '%u'", itr->games_week, itr->wins_week, itr->games_season, itr->wins_season, itr->personal_rating, m_TeamId, GUID_LOPART(itr->guid));
}
@@ -701,7 +701,7 @@ void ArenaTeam::FinishWeek()
{
m_stats.games_week = 0; // played this week
m_stats.wins_week = 0; // wins this week
- for(MemberList::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
+ for (MemberList::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
itr->games_week = 0;
itr->wins_week = 0;
diff --git a/src/game/AuctionHouseBot.cpp b/src/game/AuctionHouseBot.cpp
index cef09af8252..2a77aaea7a6 100644
--- a/src/game/AuctionHouseBot.cpp
+++ b/src/game/AuctionHouseBot.cpp
@@ -210,7 +210,7 @@ void AuctionHouseBot::addNewAuctions(Player *AHBplayer, AHBConfig *config)
if (debug_Out) sLog.outString("AHSeller: %u items", items);
// only insert a few at a time, so as not to peg the processor
- for (uint32 cnt = 1;cnt <= items;cnt++)
+ for (uint32 cnt = 1; cnt <= items; cnt++)
{
if (debug_Out) sLog.outString("AHSeller: %u count", cnt);
uint32 itemID = 0;
@@ -484,7 +484,7 @@ void AuctionHouseBot::addNewAuctionBuyerBotBid(Player *AHBplayer, AHBConfig *con
if (debug_Out) sLog.outError("AHBuyer: Disabled");
return;
}
-
+
QueryResult* result = CharacterDatabase.PQuery("SELECT id FROM auctionhouse WHERE itemowner<>%u AND buyguid<>%u", AHBplayerGUID, AHBplayerGUID);
if (!result)
@@ -510,7 +510,7 @@ void AuctionHouseBot::addNewAuctionBuyerBotBid(Player *AHBplayer, AHBConfig *con
}while (result->NextRow());
delete result;
- for (uint32 count = 1;count <= config->GetBidsPerInterval();++count)
+ for (uint32 count = 1; count <= config->GetBidsPerInterval(); ++count)
{
// Do we have anything to bid? If not, stop here.
if (possibleBids.empty())
@@ -767,7 +767,6 @@ void AuctionHouseBot::Initialize()
AHBplayerGUID = sConfig.GetIntDefault("AuctionHouseBot.GUID", 0);
ItemsPerCycle = sConfig.GetIntDefault("AuctionHouseBot.ItemsPerCycle", 200);
-
//Begin Filters
Vendor_Items = sConfig.GetBoolDefault("AuctionHouseBot.VendorItems", false);
@@ -1774,10 +1773,10 @@ void AuctionHouseBot::LoadValues(AHBConfig *config)
config->ResetItemCounts();
uint32 auctions = auctionHouse->Getcount();
-
+
if (auctions)
{
- for (AuctionHouseObject::AuctionEntryMap::const_iterator itr = auctionHouse->GetAuctionsBegin();itr != auctionHouse->GetAuctionsEnd();++itr)
+ for (AuctionHouseObject::AuctionEntryMap::const_iterator itr = auctionHouse->GetAuctionsBegin(); itr != auctionHouse->GetAuctionsEnd(); ++itr)
{
AuctionEntry *Aentry = itr->second;
Item *item = auctionmgr.GetAItem(Aentry->item_guidlow);
diff --git a/src/game/AuctionHouseBot.h b/src/game/AuctionHouseBot.h
index d135af5c479..8299a53ca0f 100644
--- a/src/game/AuctionHouseBot.h
+++ b/src/game/AuctionHouseBot.h
@@ -956,7 +956,7 @@ public:
break;
}
}
-
+
void IncItemCounts(uint32 Class, uint32 Quality)
{
switch(Class)
diff --git a/src/game/AuctionHouseHandler.cpp b/src/game/AuctionHouseHandler.cpp
index 52790526dd7..f0284a6458b 100644
--- a/src/game/AuctionHouseHandler.cpp
+++ b/src/game/AuctionHouseHandler.cpp
@@ -31,7 +31,6 @@
#include "UpdateMask.h"
#include "Util.h"
-
//please DO NOT use iterator++, because it is slower than ++iterator!!!
//post-incrementation is always slower than pre-incrementation !
diff --git a/src/game/AuctionHouseMgr.cpp b/src/game/AuctionHouseMgr.cpp
index ffc0c55d9d3..905e9c4fa17 100644
--- a/src/game/AuctionHouseMgr.cpp
+++ b/src/game/AuctionHouseMgr.cpp
@@ -35,7 +35,6 @@
#include "ProgressBar.h"
#include <vector>
-
INSTANTIATE_SINGLETON_1(AuctionHouseMgr);
using namespace std;
@@ -564,7 +563,7 @@ void AuctionHouseObject::Update()
void AuctionHouseObject::BuildListBidderItems(WorldPacket& data, Player* player, uint32& count, uint32& totalcount)
{
- for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin();itr != AuctionsMap.end();++itr)
+ for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr)
{
AuctionEntry *Aentry = itr->second;
if (Aentry && Aentry->bidder == player->GetGUIDLow())
@@ -579,7 +578,7 @@ void AuctionHouseObject::BuildListBidderItems(WorldPacket& data, Player* player,
void AuctionHouseObject::BuildListOwnerItems(WorldPacket& data, Player* player, uint32& count, uint32& totalcount)
{
- for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin();itr != AuctionsMap.end();++itr)
+ for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr)
{
AuctionEntry *Aentry = itr->second;
if (Aentry && Aentry->owner == player->GetGUIDLow())
@@ -599,7 +598,7 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
{
int loc_idx = player->GetSession()->GetSessionDbLocaleIndex();
- for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin();itr != AuctionsMap.end();++itr)
+ for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr)
{
AuctionEntry *Aentry = itr->second;
Item *item = auctionmgr.GetAItem(Aentry->item_guidlow);
diff --git a/src/game/Bag.cpp b/src/game/Bag.cpp
index 2d58b63c0a9..72d71c5e8bc 100644
--- a/src/game/Bag.cpp
+++ b/src/game/Bag.cpp
@@ -38,7 +38,7 @@ Bag::Bag( ): Item()
Bag::~Bag()
{
- for(uint8 i = 0; i < MAX_BAG_SIZE; ++i)
+ for (uint8 i = 0; i < MAX_BAG_SIZE; ++i)
if (Item *item = m_bagslot[i])
{
if(item->IsInWorld())
@@ -56,14 +56,14 @@ void Bag::AddToWorld()
{
Item::AddToWorld();
- for(uint32 i = 0; i < GetBagSize(); ++i)
+ for (uint32 i = 0; i < GetBagSize(); ++i)
if(m_bagslot[i])
m_bagslot[i]->AddToWorld();
}
void Bag::RemoveFromWorld()
{
- for(uint32 i = 0; i < GetBagSize(); ++i)
+ for (uint32 i = 0; i < GetBagSize(); ++i)
if(m_bagslot[i])
m_bagslot[i]->RemoveFromWorld();
@@ -184,7 +184,7 @@ void Bag::BuildCreateUpdateBlockForPlayer( UpdateData *data, Player *target ) co
// If the bag is empty returns true
bool Bag::IsEmpty() const
{
- for(uint32 i = 0; i < GetBagSize(); ++i)
+ for (uint32 i = 0; i < GetBagSize(); ++i)
if (m_bagslot[i])
return false;
@@ -195,7 +195,7 @@ uint32 Bag::GetItemCount( uint32 item, Item* eItem ) const
{
Item *pItem;
uint32 count = 0;
- for(uint32 i=0; i < GetBagSize(); ++i)
+ for (uint32 i=0; i < GetBagSize(); ++i)
{
pItem = m_bagslot[i];
if( pItem && pItem != eItem && pItem->GetEntry() == item )
@@ -204,7 +204,7 @@ uint32 Bag::GetItemCount( uint32 item, Item* eItem ) const
if(eItem && eItem->GetProto()->GemProperties)
{
- for(uint32 i=0; i < GetBagSize(); ++i)
+ for (uint32 i=0; i < GetBagSize(); ++i)
{
pItem = m_bagslot[i];
if( pItem && pItem != eItem && pItem->GetProto()->Socket[0].Color )
@@ -217,7 +217,7 @@ uint32 Bag::GetItemCount( uint32 item, Item* eItem ) const
uint8 Bag::GetSlotByItemGUID(uint64 guid) const
{
- for(uint32 i = 0; i < GetBagSize(); ++i)
+ for (uint32 i = 0; i < GetBagSize(); ++i)
if(m_bagslot[i] != 0)
if(m_bagslot[i]->GetGUID() == guid)
return i;
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
index 3eb699472d8..97b8aa0c928 100644
--- a/src/game/BattleGround.cpp
+++ b/src/game/BattleGround.cpp
@@ -36,7 +36,6 @@
#include "SpellAuras.h"
#include "Util.h"
-
namespace MaNGOS
{
class BattleGroundChatBuilder
@@ -122,7 +121,7 @@ namespace MaNGOS
template<class Do>
void BattleGround::BroadcastWorker(Do& _do)
{
- for(BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
+ for (BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
if (Player *plr = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(itr->first, 0, HIGHGUID_PLAYER)))
_do(plr);
}
@@ -206,11 +205,11 @@ BattleGround::~BattleGround()
// remove objects and creatures
// (this is done automatically in mapmanager update, when the instance is reset after the reset time)
int size = m_BgCreatures.size();
- for(int i = 0; i < size; ++i)
+ for (int i = 0; i < size; ++i)
DelCreature(i);
size = m_BgObjects.size();
- for(int i = 0; i < size; ++i)
+ for (int i = 0; i < size; ++i)
DelObject(i);
if (GetInstanceID()) // not spam by useless queries in case BG templates
@@ -231,7 +230,7 @@ BattleGround::~BattleGround()
// remove from bg free slot queue
this->RemoveFromBGFreeSlotQueue();
- for(BattleGroundScoreMap::const_iterator itr = m_PlayerScores.begin(); itr != m_PlayerScores.end(); ++itr)
+ for (BattleGroundScoreMap::const_iterator itr = m_PlayerScores.begin(); itr != m_PlayerScores.end(); ++itr)
delete itr->second;
}
@@ -279,10 +278,10 @@ void BattleGround::Update(uint32 diff)
{
if (GetReviveQueueSize())
{
- for(std::map<uint64, std::vector<uint64> >::iterator itr = m_ReviveQueue.begin(); itr != m_ReviveQueue.end(); ++itr)
+ for (std::map<uint64, std::vector<uint64> >::iterator itr = m_ReviveQueue.begin(); itr != m_ReviveQueue.end(); ++itr)
{
Creature *sh = NULL;
- for(std::vector<uint64>::const_iterator itr2 = (itr->second).begin(); itr2 != (itr->second).end(); ++itr2)
+ for (std::vector<uint64>::const_iterator itr2 = (itr->second).begin(); itr2 != (itr->second).end(); ++itr2)
{
Player *plr = objmgr.GetPlayer(*itr2);
if (!plr)
@@ -313,7 +312,7 @@ void BattleGround::Update(uint32 diff)
}
else if (m_LastResurrectTime > 500) // Resurrect players only half a second later, to see spirit heal effect on NPC
{
- for(std::vector<uint64>::const_iterator itr = m_ResurrectQueue.begin(); itr != m_ResurrectQueue.end(); ++itr)
+ for (std::vector<uint64>::const_iterator itr = m_ResurrectQueue.begin(); itr != m_ResurrectQueue.end(); ++itr)
{
Player *plr = objmgr.GetPlayer(*itr);
if (!plr)
@@ -423,13 +422,13 @@ void BattleGround::Update(uint32 diff)
{
//TODO : add arena sound PlaySoundToAll(SOUND_ARENA_START);
- for(BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
+ for (BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
if (Player *plr = objmgr.GetPlayer(itr->first))
{
plr->RemoveAurasDueToSpell(SPELL_ARENA_PREPARATION);
// remove auras with duration lower than 30s
Unit::AuraMap & aurMap = plr->GetAuras();
- for(Unit::AuraMap::iterator iter = aurMap.begin(); iter != aurMap.end();)
+ for (Unit::AuraMap::iterator iter = aurMap.begin(); iter != aurMap.end(); )
{
if (!iter->second->IsPermanent()
&& iter->second->GetAuraDuration()<=30*IN_MILISECONDS
@@ -451,7 +450,7 @@ void BattleGround::Update(uint32 diff)
PlaySoundToAll(SOUND_BG_START);
- for(BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
+ for (BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
if (Player* plr = objmgr.GetPlayer(itr->first))
plr->RemoveAurasDueToSpell(SPELL_PREPARATION);
//Announce BG starting
@@ -475,7 +474,7 @@ void BattleGround::Update(uint32 diff)
{
m_EndTime = 0;
BattleGroundPlayerMap::iterator itr, next;
- for(itr = m_Players.begin(); itr != m_Players.end(); itr = next)
+ for (itr = m_Players.begin(); itr != m_Players.end(); itr = next)
{
next = itr;
++next;
@@ -501,7 +500,7 @@ void BattleGround::SetTeamStartLoc(uint32 TeamID, float X, float Y, float Z, flo
void BattleGround::SendPacketToAll(WorldPacket *packet)
{
- for(BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
+ for (BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{
Player *plr = objmgr.GetPlayer(itr->first);
if (plr)
@@ -513,7 +512,7 @@ void BattleGround::SendPacketToAll(WorldPacket *packet)
void BattleGround::SendPacketToTeam(uint32 TeamID, WorldPacket *packet, Player *sender, bool self)
{
- for(BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
+ for (BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{
Player *plr = objmgr.GetPlayer(itr->first);
@@ -545,7 +544,7 @@ void BattleGround::PlaySoundToTeam(uint32 SoundID, uint32 TeamID)
{
WorldPacket data;
- for(BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
+ for (BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{
Player *plr = objmgr.GetPlayer(itr->first);
@@ -568,7 +567,7 @@ void BattleGround::PlaySoundToTeam(uint32 SoundID, uint32 TeamID)
void BattleGround::CastSpellOnTeam(uint32 SpellID, uint32 TeamID)
{
- for(BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
+ for (BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{
Player *plr = objmgr.GetPlayer(itr->first);
@@ -588,7 +587,7 @@ void BattleGround::CastSpellOnTeam(uint32 SpellID, uint32 TeamID)
void BattleGround::YellToAll(Creature* creature, const char* text, uint32 language)
{
- for(std::map<uint64, BattleGroundPlayer>::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
+ for (std::map<uint64, BattleGroundPlayer>::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{
WorldPacket data(SMSG_MESSAGECHAT, 200);
Player *plr = objmgr.GetPlayer(itr->first);
@@ -602,10 +601,9 @@ void BattleGround::YellToAll(Creature* creature, const char* text, uint32 langua
}
}
-
void BattleGround::RewardHonorToTeam(uint32 Honor, uint32 TeamID)
{
- for(BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
+ for (BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{
Player *plr = objmgr.GetPlayer(itr->first);
@@ -630,7 +628,7 @@ void BattleGround::RewardReputationToTeam(uint32 faction_id, uint32 Reputation,
if (!factionEntry)
return;
- for(BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
+ for (BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{
Player *plr = objmgr.GetPlayer(itr->first);
@@ -721,7 +719,7 @@ void BattleGround::EndBattleGround(uint32 winner)
}
}
- for(BattleGroundPlayerMap::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
+ for (BattleGroundPlayerMap::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{
Player *plr = objmgr.GetPlayer(itr->first);
uint32 team = itr->second.Team;
@@ -1125,7 +1123,7 @@ void BattleGround::Reset()
m_Players.clear();
- for(BattleGroundScoreMap::const_iterator itr = m_PlayerScores.begin(); itr != m_PlayerScores.end(); ++itr)
+ for (BattleGroundScoreMap::const_iterator itr = m_PlayerScores.begin(); itr != m_PlayerScores.end(); ++itr)
delete itr->second;
m_PlayerScores.clear();
@@ -1251,7 +1249,7 @@ void BattleGround::AddOrSetPlayerToCorrectBgGroup(Player *plr, uint64 plr_guid,
void BattleGround::EventPlayerLoggedIn(Player* player, uint64 plr_guid)
{
// player is correct pointer
- for(std::deque<uint64>::iterator itr = m_OfflineQueue.begin(); itr != m_OfflineQueue.end(); ++itr)
+ for (std::deque<uint64>::iterator itr = m_OfflineQueue.begin(); itr != m_OfflineQueue.end(); ++itr)
{
if (*itr == plr_guid)
{
@@ -1427,9 +1425,9 @@ void BattleGround::AddPlayerToResurrectQueue(uint64 npc_guid, uint64 player_guid
void BattleGround::RemovePlayerFromResurrectQueue(uint64 player_guid)
{
- for(std::map<uint64, std::vector<uint64> >::iterator itr = m_ReviveQueue.begin(); itr != m_ReviveQueue.end(); ++itr)
+ for (std::map<uint64, std::vector<uint64> >::iterator itr = m_ReviveQueue.begin(); itr != m_ReviveQueue.end(); ++itr)
{
- for(std::vector<uint64>::iterator itr2 =(itr->second).begin(); itr2 != (itr->second).end(); ++itr2)
+ for (std::vector<uint64>::iterator itr2 =(itr->second).begin(); itr2 != (itr->second).end(); ++itr2)
{
if (*itr2 == player_guid)
{
@@ -1790,7 +1788,7 @@ void BattleGround::HandleKillPlayer( Player *player, Player *killer )
UpdatePlayerScore(killer, SCORE_HONORABLE_KILLS, 1);
UpdatePlayerScore(killer, SCORE_KILLING_BLOWS, 1);
- for(BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
+ for (BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{
Player *plr = objmgr.GetPlayer(itr->first);
@@ -1850,7 +1848,7 @@ void BattleGround::PlayerAddedToBGCheckIfBGIsRunning(Player* plr)
uint32 BattleGround::GetAlivePlayersCountByTeam(uint32 Team) const
{
int count = 0;
- for(BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
+ for (BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
{
if (itr->second.Team == Team)
{
@@ -1872,7 +1870,7 @@ void BattleGround::SetHoliday(bool is_holiday)
int32 BattleGround::GetObjectType(uint64 guid)
{
- for(uint32 i = 0; i < m_BgObjects.size(); ++i)
+ for (uint32 i = 0; i < m_BgObjects.size(); ++i)
if(m_BgObjects[i] == guid)
return i;
sLog.outError("BattleGround: cheating? a player used a gameobject which isnt supposed to be a usable object!");
diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h
index 007f7a642dd..38772f9fd33 100644
--- a/src/game/BattleGround.h
+++ b/src/game/BattleGround.h
@@ -543,7 +543,7 @@ class BattleGround
void PlayerAddedToBGCheckIfBGIsRunning(Player* plr);
/* Scorekeeping */
-
+
BattleGroundScoreMap m_PlayerScores; // Player scores
// must be implemented in BG subclass
virtual void RemovePlayer(Player * /*player*/, uint64 /*guid*/) {}
diff --git a/src/game/BattleGroundAB.cpp b/src/game/BattleGroundAB.cpp
index 6609c3400be..b684f4523e1 100644
--- a/src/game/BattleGroundAB.cpp
+++ b/src/game/BattleGroundAB.cpp
@@ -688,7 +688,7 @@ void BattleGroundAB::UpdatePlayerScore(Player *Source, uint32 type, uint32 value
bool BattleGroundAB::IsAllNodesConrolledByTeam(uint32 team) const
{
uint32 count = 0;
- for(int i = 0; i < BG_AB_DYNAMIC_NODES_COUNT; ++i)
+ for (int i = 0; i < BG_AB_DYNAMIC_NODES_COUNT; ++i)
if ((team == ALLIANCE && m_Nodes[i] == BG_AB_NODE_STATUS_ALLY_OCCUPIED) ||
(team == HORDE && m_Nodes[i] == BG_AB_NODE_STATUS_HORDE_OCCUPIED))
++count;
diff --git a/src/game/BattleGroundAV.cpp b/src/game/BattleGroundAV.cpp
index 42d15a6ce84..abcc2e72d14 100644
--- a/src/game/BattleGroundAV.cpp
+++ b/src/game/BattleGroundAV.cpp
@@ -90,7 +90,7 @@ void BattleGroundAV::HandleKillUnit(Creature *unit, Player *killer)
RewardHonorToTeam(GetBonusHonor(BG_AV_KILL_CAPTAIN),HORDE);
UpdateScore(ALLIANCE,(-1)*BG_AV_RES_CAPTAIN);
//spawn destroyed aura
- for(uint8 i=0; i<=9; i++)
+ for (uint8 i=0; i<=9; i++)
SpawnBGObject(BG_AV_OBJECT_BURN_BUILDING_ALLIANCE+i,RESPAWN_IMMEDIATELY);
Creature* creature = GetBGCreature(AV_CPLACE_HERALD);
if(creature)
@@ -109,7 +109,7 @@ void BattleGroundAV::HandleKillUnit(Creature *unit, Player *killer)
RewardHonorToTeam(GetBonusHonor(BG_AV_KILL_CAPTAIN),ALLIANCE);
UpdateScore(HORDE,(-1)*BG_AV_RES_CAPTAIN);
//spawn destroyed aura
- for(uint8 i=0; i<=9; i++)
+ for (uint8 i=0; i<=9; i++)
SpawnBGObject(BG_AV_OBJECT_BURN_BUILDING_HORDE+i,RESPAWN_IMMEDIATELY);
Creature* creature = GetBGCreature(AV_CPLACE_HERALD);
if(creature)
@@ -224,7 +224,6 @@ void BattleGroundAV::HandleQuestComplete(uint32 questid, Player *player)
}
}
-
void BattleGroundAV::UpdateScore(uint16 team, int16 points )
{ //note: to remove reinforcementpoints points must be negative, for adding reinforcements points must be positive
assert( team == ALLIANCE || team == HORDE);
@@ -302,7 +301,7 @@ void BattleGroundAV::Update(uint32 diff)
if(GetStatus() == STATUS_IN_PROGRESS)
{
- for(uint8 i=0; i<=1;i++)//0=alliance, 1=horde
+ for (uint8 i=0; i<=1; i++)//0=alliance, 1=horde
{
if(!m_CaptainAlive[i])
continue;
@@ -329,7 +328,7 @@ void BattleGroundAV::Update(uint32 diff)
}
//add points from mine owning, and look if he neutral team wanrts to reclaim the mine
m_Mine_Timer -=diff;
- for(uint8 mine=0; mine <2; mine++)
+ for (uint8 mine=0; mine <2; mine++)
{
if(m_Mine_Owner[mine] == ALLIANCE || m_Mine_Owner[mine] == HORDE)
{
@@ -347,7 +346,7 @@ void BattleGroundAV::Update(uint32 diff)
m_Mine_Timer=AV_MINE_TICK_TIMER; //this is at the end, cause we need to update both mines
//looks for all timers of the nodes and destroy the building (for graveyards the building wont get destroyed, it goes just to the other team
- for(BG_AV_Nodes i = BG_AV_NODES_FIRSTAID_STATION; i < BG_AV_NODES_MAX; ++i)
+ for (BG_AV_Nodes i = BG_AV_NODES_FIRSTAID_STATION; i < BG_AV_NODES_MAX; ++i)
if(m_Nodes[i].State == POINT_ASSAULTED) //maybe remove this
{
if(m_Nodes[i].Timer > diff)
@@ -367,11 +366,11 @@ void BattleGroundAV::StartingEventCloseDoors()
void BattleGroundAV::StartingEventOpenDoors()
{
sLog.outDebug("BG_AV: start spawning mine stuff");
- for(uint16 i= BG_AV_OBJECT_MINE_SUPPLY_N_MIN; i<=BG_AV_OBJECT_MINE_SUPPLY_N_MAX;i++)
+ for (uint16 i= BG_AV_OBJECT_MINE_SUPPLY_N_MIN; i<=BG_AV_OBJECT_MINE_SUPPLY_N_MAX; i++)
SpawnBGObject(i,RESPAWN_IMMEDIATELY);
- for(uint16 i= BG_AV_OBJECT_MINE_SUPPLY_S_MIN; i<=BG_AV_OBJECT_MINE_SUPPLY_S_MAX;i++)
+ for (uint16 i= BG_AV_OBJECT_MINE_SUPPLY_S_MIN; i<=BG_AV_OBJECT_MINE_SUPPLY_S_MAX; i++)
SpawnBGObject(i,RESPAWN_IMMEDIATELY);
- for(uint8 mine = AV_NORTH_MINE; mine <= AV_SOUTH_MINE; mine++) //mine population
+ for (uint8 mine = AV_NORTH_MINE; mine <= AV_SOUTH_MINE; mine++) //mine population
ChangeMineOwner(mine, AV_NEUTRAL_TEAM,true);
UpdateWorldState(AV_SHOW_H_SCORE, 1);
@@ -398,7 +397,7 @@ void BattleGroundAV::EndBattleGround(uint32 winner)
//first towers:
uint8 kills[2]={0,0}; //0=ally 1=horde
uint8 rep[2]={0,0}; //0=ally 1=horde
- for(BG_AV_Nodes i = BG_AV_NODES_DUNBALDAR_SOUTH; i <= BG_AV_NODES_FROSTWOLF_WTOWER; ++i)
+ for (BG_AV_Nodes i = BG_AV_NODES_DUNBALDAR_SOUTH; i <= BG_AV_NODES_FROSTWOLF_WTOWER; ++i)
{
if(m_Nodes[i].State == POINT_CONTROLED)
{
@@ -415,7 +414,7 @@ void BattleGroundAV::EndBattleGround(uint32 winner)
}
}
- for(int i=0; i<=1; i++) //0=ally 1=horde
+ for (int i=0; i<=1; i++) //0=ally 1=horde
{
if(m_CaptainAlive[i])
{
@@ -445,7 +444,6 @@ void BattleGroundAV::RemovePlayer(Player* plr,uint64 /*guid*/)
plr->RemoveAurasDueToSpell(AV_BUFF_H_CAPTAIN);
}
-
void BattleGroundAV::HandleAreaTrigger(Player *Source, uint32 Trigger)
{
// this is wrong way to implement these things. On official it done by gameobject spell cast.
@@ -522,8 +520,6 @@ void BattleGroundAV::UpdatePlayerScore(Player* Source, uint32 type, uint32 value
}
}
-
-
void BattleGroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node)
{
@@ -545,7 +541,7 @@ void BattleGroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node)
else
sLog.outError("BG_AV: playerdestroyedpoint: marshal %i doesn't exist",AV_CPLACE_A_MARSHAL_SOUTH + tmp);
//spawn destroyed aura
- for(uint8 i=0; i<=9; i++)
+ for (uint8 i=0; i<=9; i++)
SpawnBGObject(BG_AV_OBJECT_BURN_DUNBALDAR_SOUTH + i + (tmp * 10),RESPAWN_IMMEDIATELY);
UpdateScore((owner == ALLIANCE) ? HORDE : ALLIANCE, (-1)*BG_AV_RES_TOWER);
@@ -566,7 +562,7 @@ void BattleGroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node)
PopulateNode(node);
if(node == BG_AV_NODES_SNOWFALL_GRAVE) //snowfall eyecandy
{
- for(uint8 i = 0; i < 4; i++)
+ for (uint8 i = 0; i < 4; i++)
{
SpawnBGObject(((owner==ALLIANCE)?BG_AV_OBJECT_SNOW_EYECANDY_PA : BG_AV_OBJECT_SNOW_EYECANDY_PH)+i,RESPAWN_ONE_DAY);
SpawnBGObject(((owner==ALLIANCE)?BG_AV_OBJECT_SNOW_EYECANDY_A : BG_AV_OBJECT_SNOW_EYECANDY_H )+i,RESPAWN_IMMEDIATELY);
@@ -603,10 +599,10 @@ void BattleGroundAV::ChangeMineOwner(uint8 mine, uint32 team, bool initial)
{
sLog.outDebug("bg_av depopulating mine %i (0=north,1=south)",mine);
if(mine==AV_SOUTH_MINE)
- for(uint16 i=AV_CPLACE_MINE_S_S_MIN; i <= AV_CPLACE_MINE_S_S_MAX; i++)
+ for (uint16 i=AV_CPLACE_MINE_S_S_MIN; i <= AV_CPLACE_MINE_S_S_MAX; i++)
if( m_BgCreatures[i] )
DelCreature(i); //TODO just set the respawntime to 999999
- for(uint16 i=((mine==AV_NORTH_MINE)?AV_CPLACE_MINE_N_1_MIN:AV_CPLACE_MINE_S_1_MIN); i <= ((mine==AV_NORTH_MINE)?AV_CPLACE_MINE_N_3:AV_CPLACE_MINE_S_3); i++)
+ for (uint16 i=((mine==AV_NORTH_MINE)?AV_CPLACE_MINE_N_1_MIN:AV_CPLACE_MINE_S_1_MIN); i <= ((mine==AV_NORTH_MINE)?AV_CPLACE_MINE_N_3:AV_CPLACE_MINE_S_3); i++)
if( m_BgCreatures[i] )
DelCreature(i); //TODO here also
}
@@ -641,17 +637,17 @@ void BattleGroundAV::ChangeMineOwner(uint8 mine, uint32 team, bool initial)
cinfo = AV_NPC_S_MINE_H_3;
else
cinfo = AV_NPC_S_MINE_N_S;
- for(uint16 i=AV_CPLACE_MINE_S_S_MIN; i <= AV_CPLACE_MINE_S_S_MAX; i++)
+ for (uint16 i=AV_CPLACE_MINE_S_S_MIN; i <= AV_CPLACE_MINE_S_S_MAX; i++)
AddAVCreature(cinfo,i);
}
- for(uint16 i=( (mine==AV_NORTH_MINE)?AV_CPLACE_MINE_N_1_MIN:AV_CPLACE_MINE_S_1_MIN ); i <= ((mine==AV_NORTH_MINE)?AV_CPLACE_MINE_N_1_MAX:AV_CPLACE_MINE_S_1_MAX); i++)
+ for (uint16 i=( (mine==AV_NORTH_MINE)?AV_CPLACE_MINE_N_1_MIN:AV_CPLACE_MINE_S_1_MIN ); i <= ((mine==AV_NORTH_MINE)?AV_CPLACE_MINE_N_1_MAX:AV_CPLACE_MINE_S_1_MAX); i++)
AddAVCreature(miner,i);
//the next chooses randomly between 2 cretures
- for(uint16 i=((mine==AV_NORTH_MINE)?AV_CPLACE_MINE_N_2_MIN:AV_CPLACE_MINE_S_2_MIN); i <= ((mine==AV_NORTH_MINE)?AV_CPLACE_MINE_N_2_MAX:AV_CPLACE_MINE_S_2_MAX); i++)
+ for (uint16 i=((mine==AV_NORTH_MINE)?AV_CPLACE_MINE_N_2_MIN:AV_CPLACE_MINE_S_2_MIN); i <= ((mine==AV_NORTH_MINE)?AV_CPLACE_MINE_N_2_MAX:AV_CPLACE_MINE_S_2_MAX); i++)
AddAVCreature(miner+(urand(1,2)),i);
AddAVCreature(miner+3,(mine==AV_NORTH_MINE)?AV_CPLACE_MINE_N_3:AV_CPLACE_MINE_S_3);
//because the gameobjects in this mine have changed, update all surrounding players:
-// for(uint16 i = ((mine==AV_NORTH_MINE)?BG_AV_OBJECT_MINE_SUPPLY_N_MIN:BG_AV_OBJECT_MINE_SUPPLY_N_MIN); i <= ((mine==AV_NORTH_MINE)?BG_AV_OBJECT_MINE_SUPPLY_N_MAX:BG_AV_OBJECT_MINE_SUPPLY_N_MAX); i++)
+// for (uint16 i = ((mine==AV_NORTH_MINE)?BG_AV_OBJECT_MINE_SUPPLY_N_MIN:BG_AV_OBJECT_MINE_SUPPLY_N_MIN); i <= ((mine==AV_NORTH_MINE)?BG_AV_OBJECT_MINE_SUPPLY_N_MAX:BG_AV_OBJECT_MINE_SUPPLY_N_MAX); i++)
// {
//TODO: add gameobject-update code
// }
@@ -711,7 +707,7 @@ void BattleGroundAV::PopulateNode(BG_AV_Nodes node)
sLog.outError("AV: couldn't spawn spiritguide at node %i",node);
}
- for(uint8 i=0; i<4; i++)
+ for (uint8 i=0; i<4; i++)
{
Creature* cr = AddAVCreature(creatureid,c_place+i);
}
@@ -719,7 +715,7 @@ void BattleGroundAV::PopulateNode(BG_AV_Nodes node)
void BattleGroundAV::DePopulateNode(BG_AV_Nodes node)
{
uint32 c_place = AV_CPLACE_DEFENSE_STORM_AID + ( 4 * node );
- for(uint8 i=0; i<4; i++)
+ for (uint8 i=0; i<4; i++)
if( m_BgCreatures[c_place+i] )
DelCreature(c_place+i);
//spiritguide
@@ -727,7 +723,6 @@ void BattleGroundAV::DePopulateNode(BG_AV_Nodes node)
DelCreature(node);
}
-
const BG_AV_Nodes BattleGroundAV::GetNodeThroughObject(uint32 object)
{
sLog.outDebug("bg_AV getnodethroughobject %i",object);
@@ -786,7 +781,6 @@ const uint32 BattleGroundAV::GetObjectThroughNode(BG_AV_Nodes node)
return 0;
}
-
//called when using banner
void BattleGroundAV::EventPlayerClickedOnFlag(Player *source, GameObject* target_obj)
@@ -840,7 +834,6 @@ void BattleGroundAV::EventPlayerDefendsPoint(Player* player, uint32 object)
return;
}
-
//spawn new go :)
if(m_Nodes[node].Owner == ALLIANCE)
SpawnBGObject(object+22, RESPAWN_IMMEDIATELY); //spawn horde banner
@@ -869,7 +862,7 @@ void BattleGroundAV::EventPlayerDefendsPoint(Player* player, uint32 object)
}
else if(node == BG_AV_NODES_SNOWFALL_GRAVE) //snowfall eyecandy
{
- for(uint8 i = 0; i < 4; i++)
+ for (uint8 i = 0; i < 4; i++)
{
SpawnBGObject(((owner==ALLIANCE)?BG_AV_OBJECT_SNOW_EYECANDY_PA : BG_AV_OBJECT_SNOW_EYECANDY_PH)+i,RESPAWN_ONE_DAY);
SpawnBGObject(((team==ALLIANCE)?BG_AV_OBJECT_SNOW_EYECANDY_A : BG_AV_OBJECT_SNOW_EYECANDY_H)+i,RESPAWN_IMMEDIATELY);
@@ -900,7 +893,6 @@ void BattleGroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object)
if(owner == team || team == m_Nodes[node].TotalOwner)
return; //surely a gm used this object
-
if(node == BG_AV_NODES_SNOWFALL_GRAVE) //snowfall is a bit special in capping + it gets eyecandy stuff
{
if(object == BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE) //initial capping
@@ -932,7 +924,7 @@ void BattleGroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object)
despawn = ( m_Nodes[node].State == POINT_ASSAULTED )?BG_AV_OBJECT_SNOW_EYECANDY_PA : BG_AV_OBJECT_SNOW_EYECANDY_A;
spawn = BG_AV_OBJECT_SNOW_EYECANDY_PH;
}
- for(uint8 i = 0; i < 4; i++)
+ for (uint8 i = 0; i < 4; i++)
{
SpawnBGObject(despawn+i,RESPAWN_ONE_DAY);
SpawnBGObject(spawn+i,RESPAWN_IMMEDIATELY);
@@ -1094,7 +1086,6 @@ void BattleGroundAV::SendMineWorldStates(uint32 mine)
UpdateWorldState(BG_AV_MineWorldStates[mine2][prevowner],0);
}
-
WorldSafeLocsEntry const* BattleGroundAV::GetClosestGraveYard(Player* player)
{
WorldSafeLocsEntry const* good_entry = NULL;
@@ -1124,7 +1115,6 @@ WorldSafeLocsEntry const* BattleGroundAV::GetClosestGraveYard(Player* player)
return good_entry;
}
-
bool BattleGroundAV::SetupBattleGround()
{
// Create starting objects
@@ -1184,7 +1174,7 @@ bool BattleGroundAV::SetupBattleGround()
return false;
}
}
- for(uint8 j=0; j<=9; j++) //burning aura
+ for (uint8 j=0; j<=9; j++) //burning aura
{
if(!AddObject(BG_AV_OBJECT_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j,BG_AV_OBJECTID_FIRE,BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][0],BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][1],BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][2],BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][3]/2),RESPAWN_ONE_DAY))
{
@@ -1194,9 +1184,9 @@ bool BattleGroundAV::SetupBattleGround()
}
}
}
- for(uint8 i=0;i<2;i++) //burning aura for buildings
+ for (uint8 i=0; i<2; i++) //burning aura for buildings
{
- for(uint8 j=0; j<=9; j++)
+ for (uint8 j=0; j<=9; j++)
{
if(j<5)
{
@@ -1216,7 +1206,7 @@ bool BattleGroundAV::SetupBattleGround()
}
}
}
- for(uint16 i= 0; i<=(BG_AV_OBJECT_MINE_SUPPLY_N_MAX-BG_AV_OBJECT_MINE_SUPPLY_N_MIN);i++)
+ for (uint16 i= 0; i<=(BG_AV_OBJECT_MINE_SUPPLY_N_MAX-BG_AV_OBJECT_MINE_SUPPLY_N_MIN); i++)
{
if(!AddObject(BG_AV_OBJECT_MINE_SUPPLY_N_MIN+i,BG_AV_OBJECTID_MINE_N,BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][0],BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][1],BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][2],BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][3]/2),RESPAWN_ONE_DAY))
{
@@ -1224,7 +1214,7 @@ bool BattleGroundAV::SetupBattleGround()
return false;
}
}
- for(uint16 i= 0 ; i<=(BG_AV_OBJECT_MINE_SUPPLY_S_MAX-BG_AV_OBJECT_MINE_SUPPLY_S_MIN);i++)
+ for (uint16 i= 0 ; i<=(BG_AV_OBJECT_MINE_SUPPLY_S_MAX-BG_AV_OBJECT_MINE_SUPPLY_S_MIN); i++)
{
if(!AddObject(BG_AV_OBJECT_MINE_SUPPLY_S_MIN+i,BG_AV_OBJECTID_MINE_S,BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][0],BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][1],BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][2],BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][3]/2),RESPAWN_ONE_DAY))
{
@@ -1238,7 +1228,7 @@ bool BattleGroundAV::SetupBattleGround()
sLog.outError("BatteGroundAV: Failed to spawn some object BattleGround not created!8");
return false;
}
- for(uint8 i = 0; i < 4; i++)
+ for (uint8 i = 0; i < 4; i++)
{
if(!AddObject(BG_AV_OBJECT_SNOW_EYECANDY_A+i, BG_AV_OBJECTID_SNOWFALL_CANDY_A ,BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][0],BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][1],BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][2],BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3],0,0,sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), RESPAWN_ONE_DAY)
|| !AddObject(BG_AV_OBJECT_SNOW_EYECANDY_PA+i, BG_AV_OBJECTID_SNOWFALL_CANDY_PA ,BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][0],BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][1],BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][2],BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3],0,0,sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), RESPAWN_ONE_DAY)
@@ -1253,44 +1243,44 @@ bool BattleGroundAV::SetupBattleGround()
uint16 i;
sLog.outDebug("Alterac Valley: entering state STATUS_WAIT_JOIN ...");
// Initial Nodes
- for(i = 0; i < BG_AV_OBJECT_MAX; i++)
+ for (i = 0; i < BG_AV_OBJECT_MAX; i++)
SpawnBGObject(i, RESPAWN_ONE_DAY);
- for(i = BG_AV_OBJECT_FLAG_A_FIRSTAID_STATION; i <= BG_AV_OBJECT_FLAG_A_STONEHEART_GRAVE ; i++){
+ for (i = BG_AV_OBJECT_FLAG_A_FIRSTAID_STATION; i <= BG_AV_OBJECT_FLAG_A_STONEHEART_GRAVE ; i++){
SpawnBGObject(BG_AV_OBJECT_AURA_A_FIRSTAID_STATION+3*i,RESPAWN_IMMEDIATELY);
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
}
- for(i = BG_AV_OBJECT_FLAG_A_DUNBALDAR_SOUTH; i <= BG_AV_OBJECT_FLAG_A_STONEHEART_BUNKER ; i++)
+ for (i = BG_AV_OBJECT_FLAG_A_DUNBALDAR_SOUTH; i <= BG_AV_OBJECT_FLAG_A_STONEHEART_BUNKER ; i++)
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
- for(i = BG_AV_OBJECT_FLAG_H_ICEBLOOD_GRAVE; i <= BG_AV_OBJECT_FLAG_H_FROSTWOLF_WTOWER ; i++){
+ for (i = BG_AV_OBJECT_FLAG_H_ICEBLOOD_GRAVE; i <= BG_AV_OBJECT_FLAG_H_FROSTWOLF_WTOWER ; i++){
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
if(i<=BG_AV_OBJECT_FLAG_H_FROSTWOLF_HUT)
SpawnBGObject(BG_AV_OBJECT_AURA_H_FIRSTAID_STATION+3*GetNodeThroughObject(i),RESPAWN_IMMEDIATELY);
}
- for(i = BG_AV_OBJECT_TFLAG_A_DUNBALDAR_SOUTH; i <= BG_AV_OBJECT_TFLAG_A_STONEHEART_BUNKER; i+=2)
+ for (i = BG_AV_OBJECT_TFLAG_A_DUNBALDAR_SOUTH; i <= BG_AV_OBJECT_TFLAG_A_STONEHEART_BUNKER; i+=2)
{
SpawnBGObject(i, RESPAWN_IMMEDIATELY); //flag
SpawnBGObject(i+16, RESPAWN_IMMEDIATELY); //aura
}
- for(i = BG_AV_OBJECT_TFLAG_H_ICEBLOOD_TOWER; i <= BG_AV_OBJECT_TFLAG_H_FROSTWOLF_WTOWER; i+=2)
+ for (i = BG_AV_OBJECT_TFLAG_H_ICEBLOOD_TOWER; i <= BG_AV_OBJECT_TFLAG_H_FROSTWOLF_WTOWER; i+=2)
{
SpawnBGObject(i, RESPAWN_IMMEDIATELY); //flag
SpawnBGObject(i+16, RESPAWN_IMMEDIATELY); //aura
}
//snowfall and the doors
- for(i = BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE; i <= BG_AV_OBJECT_DOOR_A; i++)
+ for (i = BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE; i <= BG_AV_OBJECT_DOOR_A; i++)
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
SpawnBGObject(BG_AV_OBJECT_AURA_N_SNOWFALL_GRAVE,RESPAWN_IMMEDIATELY);
//creatures
sLog.outDebug("BG_AV start poputlating nodes");
- for(BG_AV_Nodes i= BG_AV_NODES_FIRSTAID_STATION; i < BG_AV_NODES_MAX; ++i )
+ for (BG_AV_Nodes i= BG_AV_NODES_FIRSTAID_STATION; i < BG_AV_NODES_MAX; ++i )
{
if(m_Nodes[i].Owner)
PopulateNode(i);
}
//all creatures which don't get despawned through the script are static
sLog.outDebug("BG_AV: start spawning static creatures");
- for(i=0; i < AV_STATICCPLACE_MAX; i++ )
+ for (i=0; i < AV_STATICCPLACE_MAX; i++ )
AddAVCreature(0,i+AV_CPLACE_MAX);
//mainspiritguides:
sLog.outDebug("BG_AV: start spawning spiritguides creatures");
@@ -1298,7 +1288,7 @@ bool BattleGroundAV::SetupBattleGround()
AddSpiritGuide(8, BG_AV_CreaturePos[8][0], BG_AV_CreaturePos[8][1], BG_AV_CreaturePos[8][2], BG_AV_CreaturePos[8][3], HORDE);
//spawn the marshals (those who get deleted, if a tower gets destroyed)
sLog.outDebug("BG_AV: start spawning marshal creatures");
- for(i=AV_NPC_A_MARSHAL_SOUTH; i<= AV_NPC_H_MARSHAL_WTOWER; i++)
+ for (i=AV_NPC_A_MARSHAL_SOUTH; i<= AV_NPC_H_MARSHAL_WTOWER; i++)
AddAVCreature(i,AV_CPLACE_A_MARSHAL_SOUTH+(i-AV_NPC_A_MARSHAL_SOUTH));
AddAVCreature(AV_NPC_HERALD,AV_CPLACE_HERALD);
return true;
@@ -1400,9 +1390,9 @@ void BattleGroundAV::DefendNode(BG_AV_Nodes node, uint16 team)
void BattleGroundAV::ResetBGSubclass()
{
m_MaxLevel=0;
- for(uint8 i=0; i<2; i++) //forloop for both teams (it just make 0==alliance and 1==horde also for both mines 0=north 1=south
+ for (uint8 i=0; i<2; i++) //forloop for both teams (it just make 0==alliance and 1==horde also for both mines 0=north 1=south
{
- for(uint8 j=0; j<9; j++)
+ for (uint8 j=0; j<9; j++)
m_Team_QuestStatus[i][j]=0;
m_Team_Scores[i]=BG_AV_SCORE_INITIAL_POINTS;
m_IsInformedNearVictory[i]=false;
@@ -1411,18 +1401,18 @@ void BattleGroundAV::ResetBGSubclass()
m_Mine_Owner[i] = AV_NEUTRAL_TEAM;
m_Mine_PrevOwner[i] = m_Mine_Owner[i];
}
- for(BG_AV_Nodes i = BG_AV_NODES_FIRSTAID_STATION; i <= BG_AV_NODES_STONEHEART_GRAVE; ++i) //alliance graves
+ for (BG_AV_Nodes i = BG_AV_NODES_FIRSTAID_STATION; i <= BG_AV_NODES_STONEHEART_GRAVE; ++i) //alliance graves
InitNode(i,ALLIANCE,false);
- for(BG_AV_Nodes i = BG_AV_NODES_DUNBALDAR_SOUTH; i <= BG_AV_NODES_STONEHEART_BUNKER; ++i) //alliance towers
+ for (BG_AV_Nodes i = BG_AV_NODES_DUNBALDAR_SOUTH; i <= BG_AV_NODES_STONEHEART_BUNKER; ++i) //alliance towers
InitNode(i,ALLIANCE,true);
- for(BG_AV_Nodes i = BG_AV_NODES_ICEBLOOD_GRAVE; i <= BG_AV_NODES_FROSTWOLF_HUT; ++i) //horde graves
+ for (BG_AV_Nodes i = BG_AV_NODES_ICEBLOOD_GRAVE; i <= BG_AV_NODES_FROSTWOLF_HUT; ++i) //horde graves
InitNode(i,HORDE,false);
- for(BG_AV_Nodes i = BG_AV_NODES_ICEBLOOD_TOWER; i <= BG_AV_NODES_FROSTWOLF_WTOWER; ++i) //horde towers
+ for (BG_AV_Nodes i = BG_AV_NODES_ICEBLOOD_TOWER; i <= BG_AV_NODES_FROSTWOLF_WTOWER; ++i) //horde towers
InitNode(i,HORDE,true);
InitNode(BG_AV_NODES_SNOWFALL_GRAVE,AV_NEUTRAL_TEAM,false); //give snowfall neutral owner
m_Mine_Timer=AV_MINE_TICK_TIMER;
- for(uint16 i = 0; i < AV_CPLACE_MAX+AV_STATICCPLACE_MAX; i++)
+ for (uint16 i = 0; i < AV_CPLACE_MAX+AV_STATICCPLACE_MAX; i++)
if(m_BgCreatures[i])
DelCreature(i);
diff --git a/src/game/BattleGroundAV.h b/src/game/BattleGroundAV.h
index 306c513ae95..17d8c97e7e8 100644
--- a/src/game/BattleGroundAV.h
+++ b/src/game/BattleGroundAV.h
@@ -97,7 +97,6 @@ horde:
AV_SOUND_ALLIANCE_CAPTAIN = 8232, //gets called when someone attacks them and at the beginning after 3min+rand(x)*10sec (maybe buff)
AV_SOUND_HORDE_CAPTAIN = 8333,
-
};
enum BG_AV_OTHER_VALUES
@@ -310,8 +309,6 @@ enum BG_AV_ObjectTypes
BG_AV_OBJECT_MAX = 237
};
-
-
enum BG_AV_OBJECTS
{
AV_OPLACE_FIRSTAID_STATION = 0,
@@ -535,7 +532,6 @@ const float BG_AV_DoorPositons[2][4] = {
{-1375.193f, -538.981f, 55.2824f, 0.72178f} //horde
};
-
//creaturestuff starts here
//is related to BG_AV_CreaturePos
enum BG_AV_CreaturePlace
@@ -942,7 +938,6 @@ const float BG_AV_CreaturePos[AV_CPLACE_MAX][4] = {
};
-
enum BG_AV_CreatureIds
{
@@ -1256,8 +1251,6 @@ enum BG_AV_Graveyards
AV_GRAVE_MAIN_HORDE = 610
};
-
-
const uint32 BG_AV_GraveyardIds[9]= {
AV_GRAVE_STORM_AID,
AV_GRAVE_STORM_GRAVE,
@@ -1338,7 +1331,6 @@ enum BG_AV_WorldStates
AV_FROSTWOLFHUT_H_C = 1330,
AV_FROSTWOLFHUT_H_A = 1332, //over ac
-
//Towers
//Alliance
//Dunbaldar South Bunker
@@ -1405,7 +1397,6 @@ const uint32 BG_AV_MineWorldStates[2][3] = {
{1355, 1357,1356}
};
-
//alliance_control alliance_assault h_control h_assault
const uint32 BG_AV_NodeWorldStates[16][4] = {
//Stormpike first aid station
@@ -1523,7 +1514,6 @@ class BattleGroundAV : public BattleGround
void HandleQuestComplete(uint32 questid, Player *player);
bool PlayerCanDoMineQuest(int32 GOId,uint32 team);
-
void EndBattleGround(uint32 winner);
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
@@ -1547,7 +1537,6 @@ class BattleGroundAV : public BattleGround
const char* GetNodeName(BG_AV_Nodes node);
const bool IsTower(BG_AV_Nodes node) { return m_Nodes[node].Tower; }
-
/*mine*/
void ChangeMineOwner(uint8 mine, uint32 team, bool initial=false);
@@ -1577,7 +1566,6 @@ class BattleGroundAV : public BattleGround
uint8 m_MaxLevel; //TODO remove this when battleground-getmaxlevel() returns something usefull
bool m_IsInformedNearVictory[2];
-
};
#endif
diff --git a/src/game/BattleGroundBE.cpp b/src/game/BattleGroundBE.cpp
index 05475328b01..c81042ec2e8 100644
--- a/src/game/BattleGroundBE.cpp
+++ b/src/game/BattleGroundBE.cpp
@@ -58,19 +58,19 @@ void BattleGroundBE::Update(uint32 diff)
void BattleGroundBE::StartingEventCloseDoors()
{
- for(uint32 i = BG_BE_OBJECT_DOOR_1; i <= BG_BE_OBJECT_DOOR_4; ++i)
+ for (uint32 i = BG_BE_OBJECT_DOOR_1; i <= BG_BE_OBJECT_DOOR_4; ++i)
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
- for(uint32 i = BG_BE_OBJECT_BUFF_1; i <= BG_BE_OBJECT_BUFF_2; ++i)
+ for (uint32 i = BG_BE_OBJECT_BUFF_1; i <= BG_BE_OBJECT_BUFF_2; ++i)
SpawnBGObject(i, RESPAWN_ONE_DAY);
}
void BattleGroundBE::StartingEventOpenDoors()
{
- for(uint32 i = BG_BE_OBJECT_DOOR_1; i <= BG_BE_OBJECT_DOOR_2; ++i)
+ for (uint32 i = BG_BE_OBJECT_DOOR_1; i <= BG_BE_OBJECT_DOOR_2; ++i)
DoorOpen(i);
- for(uint32 i = BG_BE_OBJECT_BUFF_1; i <= BG_BE_OBJECT_BUFF_2; ++i)
+ for (uint32 i = BG_BE_OBJECT_BUFF_1; i <= BG_BE_OBJECT_BUFF_2; ++i)
SpawnBGObject(i, 60);
}
diff --git a/src/game/BattleGroundEY.cpp b/src/game/BattleGroundEY.cpp
index 0c7ea66388b..55c745525dc 100644
--- a/src/game/BattleGroundEY.cpp
+++ b/src/game/BattleGroundEY.cpp
@@ -107,7 +107,7 @@ void BattleGroundEY::StartingEventCloseDoors()
SpawnBGObject(BG_EY_OBJECT_DOOR_A, RESPAWN_IMMEDIATELY);
SpawnBGObject(BG_EY_OBJECT_DOOR_H, RESPAWN_IMMEDIATELY);
- for(uint32 i = BG_EY_OBJECT_A_BANNER_FEL_REALVER_CENTER; i < BG_EY_OBJECT_MAX; ++i)
+ for (uint32 i = BG_EY_OBJECT_A_BANNER_FEL_REALVER_CENTER; i < BG_EY_OBJECT_MAX; ++i)
SpawnBGObject(i, RESPAWN_ONE_DAY);
}
@@ -116,9 +116,9 @@ void BattleGroundEY::StartingEventOpenDoors()
SpawnBGObject(BG_EY_OBJECT_DOOR_A, RESPAWN_ONE_DAY);
SpawnBGObject(BG_EY_OBJECT_DOOR_H, RESPAWN_ONE_DAY);
- for(uint32 i = BG_EY_OBJECT_N_BANNER_FEL_REALVER_CENTER; i <= BG_EY_OBJECT_FLAG_NETHERSTORM; ++i)
+ for (uint32 i = BG_EY_OBJECT_N_BANNER_FEL_REALVER_CENTER; i <= BG_EY_OBJECT_FLAG_NETHERSTORM; ++i)
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
- for(uint32 i = 0; i < EY_POINTS_MAX; ++i)
+ for (uint32 i = 0; i < EY_POINTS_MAX; ++i)
{
//randomly spawn buff
uint8 buff = urand(0, 2);
@@ -182,7 +182,7 @@ void BattleGroundEY::CheckSomeoneLeftPoint()
for (uint8 i = 0; i < 2*EY_POINTS_MAX; ++i)
m_CurrentPointPlayersCount[i] = 0;
GameObject *obj = NULL;
- for(uint8 i = 0; i < EY_POINTS_MAX; ++i)
+ for (uint8 i = 0; i < EY_POINTS_MAX; ++i)
{
obj = HashMapHolder<GameObject>::Find(m_BgObjects[BG_EY_OBJECT_TOWER_CAP_FEL_REALVER + i]);
if (obj)
@@ -220,7 +220,7 @@ void BattleGroundEY::CheckSomeoneLeftPoint()
void BattleGroundEY::UpdatePointStatuses()
{
- for(uint8 point = 0; point < EY_POINTS_MAX; ++point)
+ for (uint8 point = 0; point < EY_POINTS_MAX; ++point)
{
if (m_PlayersNearPoint[point].empty())
continue;
@@ -350,7 +350,7 @@ void BattleGroundEY::RemovePlayer(Player *plr, uint64 guid)
// sometimes flag aura not removed :(
for (int j = EY_POINTS_MAX; j >= 0; --j)
{
- for(size_t i = 0; i < m_PlayersNearPoint[j].size(); ++i)
+ for (size_t i = 0; i < m_PlayersNearPoint[j].size(); ++i)
if (m_PlayersNearPoint[j][i] == guid)
m_PlayersNearPoint[j].erase(m_PlayersNearPoint[j].begin() + i);
}
@@ -532,7 +532,7 @@ void BattleGroundEY::Reset()
bool isBGWeekend = sBattleGroundMgr.IsBGWeekend(GetTypeID());
m_HonorTics = (isBGWeekend) ? BG_EY_EYWeekendHonorTicks : BG_EY_NotEYWeekendHonorTicks;
- for(uint8 i = 0; i < EY_POINTS_MAX; ++i)
+ for (uint8 i = 0; i < EY_POINTS_MAX; ++i)
{
m_PointOwnedByTeam[i] = EY_POINT_NO_OWNER;
m_PointState[i] = EY_POINT_STATE_UNCONTROLLED;
@@ -881,11 +881,10 @@ WorldSafeLocsEntry const *BattleGroundEY::GetClosestGraveYard(Player* player)
float plr_y = player->GetPositionY();
float plr_z = player->GetPositionZ();
-
distance = (entry->x - plr_x)*(entry->x - plr_x) + (entry->y - plr_y)*(entry->y - plr_y) + (entry->z - plr_z)*(entry->z - plr_z);
nearestDistance = distance;
- for(uint8 i = 0; i < EY_POINTS_MAX; ++i)
+ for (uint8 i = 0; i < EY_POINTS_MAX; ++i)
{
if (m_PointOwnedByTeam[i]==player->GetTeam() && m_PointState[i]==EY_POINT_UNDER_CONTROL)
{
@@ -910,7 +909,7 @@ WorldSafeLocsEntry const *BattleGroundEY::GetClosestGraveYard(Player* player)
bool BattleGroundEY::IsAllNodesConrolledByTeam(uint32 team) const
{
uint32 count = 0;
- for(int i = 0; i < EY_POINTS_MAX; ++i)
+ for (int i = 0; i < EY_POINTS_MAX; ++i)
if (m_PointOwnedByTeam[i] == team && m_PointState[i] == EY_POINT_UNDER_CONTROL)
++count;
diff --git a/src/game/BattleGroundHandler.cpp b/src/game/BattleGroundHandler.cpp
index 3e7c453e300..caf400f7364 100644
--- a/src/game/BattleGroundHandler.cpp
+++ b/src/game/BattleGroundHandler.cpp
@@ -153,7 +153,7 @@ void WorldSession::HandleBattlemasterJoinOpcode( WorldPacket & recv_data )
if (joinAsGroup /* && _player->GetGroup()*/)
{
sLog.outDebug("Battleground: the following players are joining as group:");
- for(GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *member = itr->getSource();
if(!member) continue; // this should never happen
@@ -215,7 +215,7 @@ void WorldSession::HandleBattleGroundPlayerPositionsOpcode( WorldPacket & /*recv
WorldPacket data(MSG_BATTLEGROUND_PLAYER_POSITIONS, (4+4+16*count1+16*count2));
data << count1; // alliance flag holders count - obsolete, now always 0
- /*for(uint8 i = 0; i < count1; ++i)
+ /*for (uint8 i = 0; i < count1; ++i)
{
data << uint64(0); // guid
data << (float)0; // x
@@ -710,7 +710,7 @@ void WorldSession::HandleBattlemasterJoinArena( WorldPacket & recv_data )
// the arenateam id must match for everyone in the group
// get the personal ratings for queueing
uint32 avg_pers_rating = 0;
- for(GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *member = itr->getSource();
@@ -738,8 +738,8 @@ void WorldSession::HandleBattlemasterJoinArena( WorldPacket & recv_data )
}
else
bg->SetRated(false);
-
- for(GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
+
+ for (GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *member = itr->getSource();
if(!member) continue;
diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp
index f2143de5bdc..49d24fd2809 100644
--- a/src/game/BattleGroundMgr.cpp
+++ b/src/game/BattleGroundMgr.cpp
@@ -54,13 +54,13 @@ INSTANTIATE_SINGLETON_1( BattleGroundMgr );
BattleGroundQueue::BattleGroundQueue()
{
- for(uint32 i = 0; i < BG_TEAMS_COUNT; i++)
+ for (uint32 i = 0; i < BG_TEAMS_COUNT; i++)
{
- for(uint32 j = 0; j < MAX_BATTLEGROUND_QUEUES; j++)
+ for (uint32 j = 0; j < MAX_BATTLEGROUND_QUEUES; j++)
{
m_SumOfWaitTimes[i][j] = 0;
m_WaitTimeLastPlayer[i][j] = 0;
- for(uint32 k = 0; k < COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME; k++)
+ for (uint32 k = 0; k < COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME; k++)
m_WaitTimes[i][j][k] = 0;
}
}
@@ -71,9 +71,9 @@ BattleGroundQueue::~BattleGroundQueue()
m_QueuedPlayers.clear();
for (int i = 0; i < MAX_BATTLEGROUND_QUEUES; i++)
{
- for(uint32 j = 0; j < BG_QUEUE_GROUP_TYPES_COUNT; j++)
+ for (uint32 j = 0; j < BG_QUEUE_GROUP_TYPES_COUNT; j++)
{
- for(GroupsQueueType::iterator itr = m_QueuedGroups[i][j].begin(); itr!= m_QueuedGroups[i][j].end(); ++itr)
+ for (GroupsQueueType::iterator itr = m_QueuedGroups[i][j].begin(); itr!= m_QueuedGroups[i][j].end(); ++itr)
delete (*itr);
m_QueuedGroups[i][j].clear();
}
@@ -273,7 +273,7 @@ void BattleGroundQueue::RemovePlayer(const uint64& guid, bool decreaseInvitedCou
//they leave groupinfo so we can't use its players size to find out index
for (uint32 j = index; j < BG_QUEUE_GROUP_TYPES_COUNT; j += BG_QUEUE_NORMAL_ALLIANCE)
{
- for(group_itr_tmp = m_QueuedGroups[queue_id_tmp][j].begin(); group_itr_tmp != m_QueuedGroups[queue_id_tmp][j].end(); ++group_itr_tmp)
+ for (group_itr_tmp = m_QueuedGroups[queue_id_tmp][j].begin(); group_itr_tmp != m_QueuedGroups[queue_id_tmp][j].end(); ++group_itr_tmp)
{
if ((*group_itr_tmp) == group)
{
@@ -415,10 +415,10 @@ void BattleGroundQueue::AnnounceWorld(GroupQueueInfo *ginfo, const uint64& playe
uint32 q_min_level = (queue_id + 1) * 10;
uint32 q_max_level = std::min(q_min_level + 9, sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL));
GroupsQueueType::const_iterator itr;
- for(itr = m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE].begin(); itr != m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE].end(); ++itr)
+ for (itr = m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE].begin(); itr != m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE].end(); ++itr)
if (!(*itr)->IsInvitedToBGInstanceGUID)
qAlliance += (*itr)->Players.size();
- for(itr = m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_HORDE].begin(); itr != m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_HORDE].end(); ++itr)
+ for (itr = m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_HORDE].begin(); itr != m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_HORDE].end(); ++itr)
if (!(*itr)->IsInvitedToBGInstanceGUID)
qHorde += (*itr)->Players.size();
@@ -460,7 +460,7 @@ bool BattleGroundQueue::InviteGroupToBG(GroupQueueInfo * ginfo, BattleGround * b
ginfo->RemoveInviteTime = getMSTime() + INVITE_ACCEPT_WAIT_TIME;
// loop through the players
- for(std::map<uint64,PlayerQueueInfo*>::iterator itr = ginfo->Players.begin(); itr != ginfo->Players.end(); ++itr)
+ for (std::map<uint64,PlayerQueueInfo*>::iterator itr = ginfo->Players.begin(); itr != ginfo->Players.end(); ++itr)
{
// get the player
Player* plr = objmgr.GetPlayer(itr->first);
@@ -591,10 +591,10 @@ bool BattleGroundQueue::CheckPremadeMatch(BGQueueIdBasedOnLevel queue_id, uint32
//start premade match
//if groups aren't invited
GroupsQueueType::const_iterator ali_group, horde_group;
- for( ali_group = m_QueuedGroups[queue_id][BG_QUEUE_PREMADE_ALLIANCE].begin(); ali_group != m_QueuedGroups[queue_id][BG_QUEUE_PREMADE_ALLIANCE].end(); ++ali_group)
+ for (ali_group = m_QueuedGroups[queue_id][BG_QUEUE_PREMADE_ALLIANCE].begin(); ali_group != m_QueuedGroups[queue_id][BG_QUEUE_PREMADE_ALLIANCE].end(); ++ali_group)
if (!(*ali_group)->IsInvitedToBGInstanceGUID)
break;
- for( horde_group = m_QueuedGroups[queue_id][BG_QUEUE_PREMADE_HORDE].begin(); horde_group != m_QueuedGroups[queue_id][BG_QUEUE_PREMADE_HORDE].end(); ++horde_group)
+ for (horde_group = m_QueuedGroups[queue_id][BG_QUEUE_PREMADE_HORDE].begin(); horde_group != m_QueuedGroups[queue_id][BG_QUEUE_PREMADE_HORDE].end(); ++horde_group)
if (!(*horde_group)->IsInvitedToBGInstanceGUID)
break;
@@ -605,9 +605,9 @@ bool BattleGroundQueue::CheckPremadeMatch(BGQueueIdBasedOnLevel queue_id, uint32
//add groups/players from normal queue to size of bigger group
uint32 maxPlayers = std::min(m_SelectionPools[BG_TEAM_ALLIANCE].GetPlayerCount(), m_SelectionPools[BG_TEAM_HORDE].GetPlayerCount());
GroupsQueueType::const_iterator itr;
- for(uint32 i = 0; i < BG_TEAMS_COUNT; i++)
+ for (uint32 i = 0; i < BG_TEAMS_COUNT; i++)
{
- for(itr = m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE + i].begin(); itr != m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE + i].end(); ++itr)
+ for (itr = m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE + i].begin(); itr != m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE + i].end(); ++itr)
{
//if itr can join BG and player count is less that maxPlayers, then add group to selectionpool
if (!(*itr)->IsInvitedToBGInstanceGUID && !m_SelectionPools[i].AddGroup((*itr), maxPlayers))
@@ -623,7 +623,7 @@ bool BattleGroundQueue::CheckPremadeMatch(BGQueueIdBasedOnLevel queue_id, uint32
// if first is invited to BG and seconds timer expired, but we can ignore it, because players have only 80 seconds to click to enter bg
// and when they click or after 80 seconds the queue info is removed from queue
uint32 time_before = getMSTime() - sWorld.getConfig(CONFIG_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH);
- for(uint32 i = 0; i < BG_TEAMS_COUNT; i++)
+ for (uint32 i = 0; i < BG_TEAMS_COUNT; i++)
{
if (!m_QueuedGroups[queue_id][BG_QUEUE_PREMADE_ALLIANCE + i].empty())
{
@@ -644,10 +644,10 @@ bool BattleGroundQueue::CheckPremadeMatch(BGQueueIdBasedOnLevel queue_id, uint32
bool BattleGroundQueue::CheckNormalMatch(BattleGround* bg_template, BGQueueIdBasedOnLevel queue_id, uint32 minPlayers, uint32 maxPlayers)
{
GroupsQueueType::const_iterator itr_team[BG_TEAMS_COUNT];
- for(uint32 i = 0; i < BG_TEAMS_COUNT; i++)
+ for (uint32 i = 0; i < BG_TEAMS_COUNT; i++)
{
itr_team[i] = m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE + i].begin();
- for(; itr_team[i] != m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE + i].end(); ++(itr_team[i]))
+ for (; itr_team[i] != m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE + i].end(); ++(itr_team[i]))
{
if (!(*(itr_team[i]))->IsInvitedToBGInstanceGUID)
{
@@ -666,7 +666,7 @@ bool BattleGroundQueue::CheckNormalMatch(BattleGround* bg_template, BGQueueIdBas
{
//we will try to invite more groups to team with less players indexed by j
++(itr_team[j]); //this will not cause a crash, because for cycle above reached break;
- for(; itr_team[j] != m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE + j].end(); ++(itr_team[j]))
+ for (; itr_team[j] != m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE + j].end(); ++(itr_team[j]))
{
if (!(*(itr_team[j]))->IsInvitedToBGInstanceGUID)
if (!m_SelectionPools[j].AddGroup(*(itr_team[j]), m_SelectionPools[(j + 1) % BG_TEAMS_COUNT].GetPlayerCount()))
@@ -703,7 +703,7 @@ bool BattleGroundQueue::CheckSkirmishForSameFaction(BGQueueIdBasedOnLevel queue_
GroupQueueInfo* ginfo = m_SelectionPools[teamIndex].SelectedGroups.back();
//set itr_team to group that was added to selection pool latest
GroupsQueueType::iterator itr_team = m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE + teamIndex].begin();
- for(; itr_team != m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE + teamIndex].end(); ++itr_team)
+ for (; itr_team != m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE + teamIndex].end(); ++itr_team)
if (ginfo == *itr_team)
break;
if (itr_team == m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE + teamIndex].end())
@@ -711,7 +711,7 @@ bool BattleGroundQueue::CheckSkirmishForSameFaction(BGQueueIdBasedOnLevel queue_
GroupsQueueType::iterator itr_team2 = itr_team;
++itr_team2;
//invite players to other selection pool
- for(; itr_team2 != m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE + teamIndex].end(); ++itr_team2)
+ for (; itr_team2 != m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE + teamIndex].end(); ++itr_team2)
{
//if selection pool is full then break;
if (!(*itr_team2)->IsInvitedToBGInstanceGUID && !m_SelectionPools[otherTeam].AddGroup(*itr_team2, minPlayersPerTeam))
@@ -721,7 +721,7 @@ bool BattleGroundQueue::CheckSkirmishForSameFaction(BGQueueIdBasedOnLevel queue_
return false;
//here we have correct 2 selections and we need to change one teams team and move selection pool teams to other team's queue
- for(GroupsQueueType::iterator itr = m_SelectionPools[otherTeam].SelectedGroups.begin(); itr != m_SelectionPools[otherTeam].SelectedGroups.end(); ++itr)
+ for (GroupsQueueType::iterator itr = m_SelectionPools[otherTeam].SelectedGroups.begin(); itr != m_SelectionPools[otherTeam].SelectedGroups.end(); ++itr)
{
//set correct team
(*itr)->Team = otherTeamId;
@@ -730,7 +730,7 @@ bool BattleGroundQueue::CheckSkirmishForSameFaction(BGQueueIdBasedOnLevel queue_
//remove team from old queue
GroupsQueueType::iterator itr2 = itr_team;
++itr2;
- for(; itr2 != m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE + teamIndex].end(); ++itr2)
+ for (; itr2 != m_QueuedGroups[queue_id][BG_QUEUE_NORMAL_ALLIANCE + teamIndex].end(); ++itr2)
{
if (*itr2 == *itr)
{
@@ -778,9 +778,9 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BGQueueIdBasedOnLeve
FillPlayersToBG(bg, queue_id);
// now everything is set, invite players
- for(GroupsQueueType::const_iterator citr = m_SelectionPools[BG_TEAM_ALLIANCE].SelectedGroups.begin(); citr != m_SelectionPools[BG_TEAM_ALLIANCE].SelectedGroups.end(); ++citr)
+ for (GroupsQueueType::const_iterator citr = m_SelectionPools[BG_TEAM_ALLIANCE].SelectedGroups.begin(); citr != m_SelectionPools[BG_TEAM_ALLIANCE].SelectedGroups.end(); ++citr)
InviteGroupToBG((*citr), bg, (*citr)->Team);
- for(GroupsQueueType::const_iterator citr = m_SelectionPools[BG_TEAM_HORDE].SelectedGroups.begin(); citr != m_SelectionPools[BG_TEAM_HORDE].SelectedGroups.end(); ++citr)
+ for (GroupsQueueType::const_iterator citr = m_SelectionPools[BG_TEAM_HORDE].SelectedGroups.begin(); citr != m_SelectionPools[BG_TEAM_HORDE].SelectedGroups.end(); ++citr)
InviteGroupToBG((*citr), bg, (*citr)->Team);
if (!bg->HasFreeSlots())
@@ -850,8 +850,8 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BGQueueIdBasedOnLeve
return;
}
//invite those selection pools
- for(uint32 i = 0; i < BG_TEAMS_COUNT; i++)
- for(GroupsQueueType::const_iterator citr = m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.begin(); citr != m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.end(); ++citr)
+ for (uint32 i = 0; i < BG_TEAMS_COUNT; i++)
+ for (GroupsQueueType::const_iterator citr = m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.begin(); citr != m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.end(); ++citr)
InviteGroupToBG((*citr), bg2, (*citr)->Team);
//start bg
bg2->StartBattleGround();
@@ -877,8 +877,8 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BGQueueIdBasedOnLeve
}
// invite those selection pools
- for(uint32 i = 0; i < BG_TEAMS_COUNT; i++)
- for(GroupsQueueType::const_iterator citr = m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.begin(); citr != m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.end(); ++citr)
+ for (uint32 i = 0; i < BG_TEAMS_COUNT; i++)
+ for (GroupsQueueType::const_iterator citr = m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.begin(); citr != m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.end(); ++citr)
InviteGroupToBG((*citr), bg2, (*citr)->Team);
// start bg
bg2->StartBattleGround();
@@ -927,11 +927,11 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BGQueueIdBasedOnLeve
//optimalization : --- we dont need to use selection_pools - each update we select max 2 groups
- for(uint32 i = BG_QUEUE_PREMADE_ALLIANCE; i < BG_QUEUE_NORMAL_ALLIANCE; i++)
+ for (uint32 i = BG_QUEUE_PREMADE_ALLIANCE; i < BG_QUEUE_NORMAL_ALLIANCE; i++)
{
// take the group that joined first
itr_team[i] = m_QueuedGroups[queue_id][i].begin();
- for(; itr_team[i] != m_QueuedGroups[queue_id][i].end(); ++(itr_team[i]))
+ for (; itr_team[i] != m_QueuedGroups[queue_id][i].end(); ++(itr_team[i]))
{
// if group match conditions, then add it to pool
if( !(*itr_team[i])->IsInvitedToBGInstanceGUID
@@ -952,7 +952,7 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BGQueueIdBasedOnLeve
{
itr_team[BG_TEAM_ALLIANCE] = itr_team[BG_TEAM_HORDE];
++itr_team[BG_TEAM_ALLIANCE];
- for(; itr_team[BG_TEAM_ALLIANCE] != m_QueuedGroups[queue_id][BG_QUEUE_PREMADE_HORDE].end(); ++(itr_team[BG_TEAM_ALLIANCE]))
+ for (; itr_team[BG_TEAM_ALLIANCE] != m_QueuedGroups[queue_id][BG_QUEUE_PREMADE_HORDE].end(); ++(itr_team[BG_TEAM_ALLIANCE]))
{
if( !(*itr_team[BG_TEAM_ALLIANCE])->IsInvitedToBGInstanceGUID
&& (((*itr_team[BG_TEAM_ALLIANCE])->ArenaTeamRating >= arenaMinRating && (*itr_team[BG_TEAM_ALLIANCE])->ArenaTeamRating <= arenaMaxRating)
@@ -968,7 +968,7 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BGQueueIdBasedOnLeve
{
itr_team[BG_TEAM_HORDE] = itr_team[BG_TEAM_ALLIANCE];
++itr_team[BG_TEAM_HORDE];
- for(; itr_team[BG_TEAM_HORDE] != m_QueuedGroups[queue_id][BG_QUEUE_PREMADE_ALLIANCE].end(); ++(itr_team[BG_TEAM_HORDE]))
+ for (; itr_team[BG_TEAM_HORDE] != m_QueuedGroups[queue_id][BG_QUEUE_PREMADE_ALLIANCE].end(); ++(itr_team[BG_TEAM_HORDE]))
{
if( !(*itr_team[BG_TEAM_HORDE])->IsInvitedToBGInstanceGUID
&& (((*itr_team[BG_TEAM_HORDE])->ArenaTeamRating >= arenaMinRating && (*itr_team[BG_TEAM_HORDE])->ArenaTeamRating <= arenaMaxRating)
@@ -1119,7 +1119,7 @@ void BGQueueRemoveEvent::Abort(uint64 /*e_time*/)
BattleGroundMgr::BattleGroundMgr() : m_AutoDistributionTimeChecker(0), m_ArenaTesting(false)
{
- for(uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; i++)
+ for (uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; i++)
m_BattleGrounds[i].clear();
m_NextRatingDiscardUpdate = sWorld.getConfig(CONFIG_ARENA_RATING_DISCARD_TIMER);
m_Testing=false;
@@ -1132,9 +1132,9 @@ BattleGroundMgr::~BattleGroundMgr()
void BattleGroundMgr::DeleteAllBattleGrounds()
{
- for(uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; i++)
+ for (uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; i++)
{
- for(BattleGroundSet::iterator itr = m_BattleGrounds[i].begin(); itr != m_BattleGrounds[i].end();)
+ for (BattleGroundSet::iterator itr = m_BattleGrounds[i].begin(); itr != m_BattleGrounds[i].end(); )
{
BattleGround * bg = itr->second;
m_BattleGrounds[i].erase(itr++);
@@ -1145,7 +1145,7 @@ void BattleGroundMgr::DeleteAllBattleGrounds()
}
// destroy template battlegrounds that listed only in queues (other already terminated)
- for(uint32 bgTypeId = 0; bgTypeId < MAX_BATTLEGROUND_TYPE_ID; ++bgTypeId)
+ for (uint32 bgTypeId = 0; bgTypeId < MAX_BATTLEGROUND_TYPE_ID; ++bgTypeId)
{
// ~BattleGround call unregistring BG from queue
while(!BGFreeSlotQueue[bgTypeId].empty())
@@ -1157,13 +1157,13 @@ void BattleGroundMgr::DeleteAllBattleGrounds()
void BattleGroundMgr::Update(uint32 diff)
{
BattleGroundSet::iterator itr, next;
- for(uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; i++)
+ for (uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; i++)
{
itr = m_BattleGrounds[i].begin();
// skip updating battleground template
if (itr != m_BattleGrounds[i].end())
++itr;
- for(; itr != m_BattleGrounds[i].end(); itr = next)
+ for (; itr != m_BattleGrounds[i].end(); itr = next)
{
next = itr;
++next;
@@ -1339,14 +1339,14 @@ void BattleGroundMgr::BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg)
if(type) // arena
{
// it seems this must be according to BG_WINNER_A/H and _NOT_ BG_TEAM_A/H
- for(int i = 1; i >= 0; --i)
+ for (int i = 1; i >= 0; --i)
{
*data << uint32(bg->m_ArenaTeamRatingChanges[i]);
*data << uint32(3999); // huge thanks for TOM_RUS for this!
*data << uint32(0); // added again in 3.1
sLog.outDebug("rating change: %d", bg->m_ArenaTeamRatingChanges[i]);
}
- for(int i = 1; i >= 0; --i)
+ for (int i = 1; i >= 0; --i)
{
uint32 at_id = bg->m_ArenaTeamIds[i];
ArenaTeam * at = objmgr.GetArenaTeamById(at_id);
@@ -1369,7 +1369,7 @@ void BattleGroundMgr::BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg)
*data << (int32)(bg->GetPlayerScoresSize());
- for(BattleGround::BattleGroundScoreMap::const_iterator itr = bg->GetPlayerScoresBegin(); itr != bg->GetPlayerScoresEnd(); ++itr)
+ for (BattleGround::BattleGroundScoreMap::const_iterator itr = bg->GetPlayerScoresBegin(); itr != bg->GetPlayerScoresEnd(); ++itr)
{
*data << (uint64)itr->first;
*data << (int32)itr->second->KillingBlows;
@@ -1484,7 +1484,7 @@ BattleGround * BattleGroundMgr::GetBattleGroundThroughClientInstance(uint32 inst
if (bg->isArena())
return GetBattleGround(instanceId, bgTypeId);
- for(BattleGroundSet::iterator itr = m_BattleGrounds[bgTypeId].begin(); itr != m_BattleGrounds[bgTypeId].end(); ++itr)
+ for (BattleGroundSet::iterator itr = m_BattleGrounds[bgTypeId].begin(); itr != m_BattleGrounds[bgTypeId].end(); ++itr)
{
if (itr->second->GetClientInstanceID() == instanceId)
return itr->second;
@@ -1500,7 +1500,7 @@ BattleGround * BattleGroundMgr::GetBattleGround(uint32 InstanceID, BattleGroundT
BattleGroundSet::iterator itr;
if (bgTypeId == BATTLEGROUND_TYPE_NONE)
{
- for(uint32 i = BATTLEGROUND_AV; i < MAX_BATTLEGROUND_TYPE_ID; i++)
+ for (uint32 i = BATTLEGROUND_AV; i < MAX_BATTLEGROUND_TYPE_ID; i++)
{
itr = m_BattleGrounds[i].find(InstanceID);
if (itr != m_BattleGrounds[i].end())
@@ -1530,7 +1530,7 @@ uint32 BattleGroundMgr::CreateClientVisibleInstanceId(BattleGroundTypeId bgTypeI
// the following works, because std::set is default ordered with "<"
// the optimalization would be to use as bitmask std::vector<uint32> - but that would only make code unreadable
uint32 lastId = 0;
- for(std::set<uint32>::iterator itr = m_ClientBattleGroundIds[bgTypeId][queue_id].begin(); itr != m_ClientBattleGroundIds[bgTypeId][queue_id].end();)
+ for (std::set<uint32>::iterator itr = m_ClientBattleGroundIds[bgTypeId][queue_id].begin(); itr != m_ClientBattleGroundIds[bgTypeId][queue_id].end(); )
{
if( (++lastId) != *itr) //if there is a gap between the ids, we will break..
break;
@@ -1816,7 +1816,7 @@ void BattleGroundMgr::DistributeArenaPoints()
std::map<uint32, uint32> PlayerPoints;
//at first update all points for all team members
- for(ObjectMgr::ArenaTeamMap::iterator team_itr = objmgr.GetArenaTeamMapBegin(); team_itr != objmgr.GetArenaTeamMapEnd(); ++team_itr)
+ for (ObjectMgr::ArenaTeamMap::iterator team_itr = objmgr.GetArenaTeamMapBegin(); team_itr != objmgr.GetArenaTeamMapEnd(); ++team_itr)
if (ArenaTeam * at = team_itr->second)
at->UpdateArenaPointsHelper(PlayerPoints);
@@ -1843,7 +1843,7 @@ void BattleGroundMgr::DistributeArenaPoints()
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_ONLINE_END);
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_TEAM_START);
- for(ObjectMgr::ArenaTeamMap::iterator titr = objmgr.GetArenaTeamMapBegin(); titr != objmgr.GetArenaTeamMapEnd(); ++titr)
+ for (ObjectMgr::ArenaTeamMap::iterator titr = objmgr.GetArenaTeamMapBegin(); titr != objmgr.GetArenaTeamMapEnd(); ++titr)
{
if (ArenaTeam * at = titr->second)
{
@@ -1884,7 +1884,7 @@ void BattleGroundMgr::BuildBattleGroundListPacket(WorldPacket *data, const uint6
*data << uint32(0x00); // number of bg instances
uint32 queue_id = plr->GetBattleGroundQueueIdFromLevel(bgTypeId);
- for(std::set<uint32>::iterator itr = m_ClientBattleGroundIds[bgTypeId][queue_id].begin(); itr != m_ClientBattleGroundIds[bgTypeId][queue_id].end();++itr)
+ for (std::set<uint32>::iterator itr = m_ClientBattleGroundIds[bgTypeId][queue_id].begin(); itr != m_ClientBattleGroundIds[bgTypeId][queue_id].end(); ++itr)
{
*data << uint32(*itr);
++count;
@@ -2026,7 +2026,7 @@ void BattleGroundMgr::ToggleArenaTesting()
void BattleGroundMgr::SetHolidayWeekends(uint32 mask)
{
- for(uint32 bgtype = 1; bgtype < MAX_BATTLEGROUND_TYPE_ID; ++bgtype)
+ for (uint32 bgtype = 1; bgtype < MAX_BATTLEGROUND_TYPE_ID; ++bgtype)
{
if(BattleGround * bg = GetBattleGroundTemplate(BattleGroundTypeId(bgtype)))
{
diff --git a/src/game/BattleGroundNA.cpp b/src/game/BattleGroundNA.cpp
index 92e71c1c283..cbf43117d0a 100644
--- a/src/game/BattleGroundNA.cpp
+++ b/src/game/BattleGroundNA.cpp
@@ -58,16 +58,16 @@ void BattleGroundNA::Update(uint32 diff)
void BattleGroundNA::StartingEventCloseDoors()
{
- for(uint32 i = BG_NA_OBJECT_DOOR_1; i <= BG_NA_OBJECT_DOOR_4; ++i)
+ for (uint32 i = BG_NA_OBJECT_DOOR_1; i <= BG_NA_OBJECT_DOOR_4; ++i)
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
}
void BattleGroundNA::StartingEventOpenDoors()
{
- for(uint32 i = BG_NA_OBJECT_DOOR_1; i <= BG_NA_OBJECT_DOOR_2; ++i)
+ for (uint32 i = BG_NA_OBJECT_DOOR_1; i <= BG_NA_OBJECT_DOOR_2; ++i)
DoorOpen(i);
- for(uint32 i = BG_NA_OBJECT_BUFF_1; i <= BG_NA_OBJECT_BUFF_2; ++i)
+ for (uint32 i = BG_NA_OBJECT_BUFF_1; i <= BG_NA_OBJECT_BUFF_2; ++i)
SpawnBGObject(i, 60);
}
diff --git a/src/game/BattleGroundRL.cpp b/src/game/BattleGroundRL.cpp
index b9f9943bbf2..2890f3698d6 100644
--- a/src/game/BattleGroundRL.cpp
+++ b/src/game/BattleGroundRL.cpp
@@ -18,7 +18,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
#include "BattleGround.h"
#include "BattleGroundRL.h"
#include "Language.h"
@@ -59,16 +58,16 @@ void BattleGroundRL::Update(uint32 diff)
void BattleGroundRL::StartingEventCloseDoors()
{
- for(uint32 i = BG_RL_OBJECT_DOOR_1; i <= BG_RL_OBJECT_DOOR_2; ++i)
+ for (uint32 i = BG_RL_OBJECT_DOOR_1; i <= BG_RL_OBJECT_DOOR_2; ++i)
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
}
void BattleGroundRL::StartingEventOpenDoors()
{
- for(uint32 i = BG_RL_OBJECT_DOOR_1; i <= BG_RL_OBJECT_DOOR_2; ++i)
+ for (uint32 i = BG_RL_OBJECT_DOOR_1; i <= BG_RL_OBJECT_DOOR_2; ++i)
DoorOpen(i);
- for(uint32 i = BG_RL_OBJECT_BUFF_1; i <= BG_RL_OBJECT_BUFF_2; ++i)
+ for (uint32 i = BG_RL_OBJECT_BUFF_1; i <= BG_RL_OBJECT_BUFF_2; ++i)
SpawnBGObject(i, 60);
}
diff --git a/src/game/BattleGroundWS.cpp b/src/game/BattleGroundWS.cpp
index ec19308e71f..63dd2f48a0b 100644
--- a/src/game/BattleGroundWS.cpp
+++ b/src/game/BattleGroundWS.cpp
@@ -148,20 +148,20 @@ void BattleGroundWS::Update(uint32 diff)
void BattleGroundWS::StartingEventCloseDoors()
{
- for(uint32 i = BG_WS_OBJECT_DOOR_A_1; i <= BG_WS_OBJECT_DOOR_H_4; ++i)
+ for (uint32 i = BG_WS_OBJECT_DOOR_A_1; i <= BG_WS_OBJECT_DOOR_H_4; ++i)
{
DoorClose(i);
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
}
- for(uint32 i = BG_WS_OBJECT_A_FLAG; i <= BG_WS_OBJECT_BERSERKBUFF_2; ++i)
+ for (uint32 i = BG_WS_OBJECT_A_FLAG; i <= BG_WS_OBJECT_BERSERKBUFF_2; ++i)
SpawnBGObject(i, RESPAWN_ONE_DAY);
}
void BattleGroundWS::StartingEventOpenDoors()
{
- for(uint32 i = BG_WS_OBJECT_DOOR_A_1; i <= BG_WS_OBJECT_DOOR_A_4; ++i)
+ for (uint32 i = BG_WS_OBJECT_DOOR_A_1; i <= BG_WS_OBJECT_DOOR_A_4; ++i)
DoorOpen(i);
- for(uint32 i = BG_WS_OBJECT_DOOR_H_1; i <= BG_WS_OBJECT_DOOR_H_2; ++i)
+ for (uint32 i = BG_WS_OBJECT_DOOR_H_1; i <= BG_WS_OBJECT_DOOR_H_2; ++i)
DoorOpen(i);
SpawnBGObject(BG_WS_OBJECT_DOOR_A_5, RESPAWN_ONE_DAY);
@@ -169,7 +169,7 @@ void BattleGroundWS::StartingEventOpenDoors()
SpawnBGObject(BG_WS_OBJECT_DOOR_H_3, RESPAWN_ONE_DAY);
SpawnBGObject(BG_WS_OBJECT_DOOR_H_4, RESPAWN_ONE_DAY);
- for(uint32 i = BG_WS_OBJECT_A_FLAG; i <= BG_WS_OBJECT_BERSERKBUFF_2; ++i)
+ for (uint32 i = BG_WS_OBJECT_A_FLAG; i <= BG_WS_OBJECT_BERSERKBUFF_2; ++i)
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
}
diff --git a/src/game/CalendarHandler.cpp b/src/game/CalendarHandler.cpp
index 93d3b7eae26..8d7bd63a9a9 100644
--- a/src/game/CalendarHandler.cpp
+++ b/src/game/CalendarHandler.cpp
@@ -45,7 +45,7 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket &recv_data)
size_t p_counter = data.wpos();
data << uint32(counter); // instance save count
- for(int i = 0; i < TOTAL_DIFFICULTIES; ++i)
+ for (int i = 0; i < TOTAL_DIFFICULTIES; ++i)
{
for (Player::BoundInstancesMap::const_iterator itr = _player->m_boundInstances[i].begin(); itr != _player->m_boundInstances[i].end(); ++itr)
{
@@ -119,7 +119,7 @@ void WorldSession::HandleCalendarAddEvent(WorldPacket &recv_data)
// {
// uint8 unk12,unk13;
// uint64 guid;
- // for (int i=0;i<count;i++)
+ // for (int i=0; i<count; i++)
// {
// recv_data.readPackGUID(guid);
// recv_data >> (uint8)unk12;
diff --git a/src/game/Cell.h b/src/game/Cell.h
index 9baf4104080..5b9f62bdc64 100644
--- a/src/game/Cell.h
+++ b/src/game/Cell.h
@@ -52,7 +52,7 @@ struct TRINITY_DLL_DECL CellArea
CellArea() : right_offset(0), left_offset(0), upper_offset(0), lower_offset(0) {}
CellArea(int right, int left, int upper, int lower) : right_offset(right), left_offset(left), upper_offset(upper), lower_offset(lower) {}
bool operator!() const { return !right_offset && !left_offset && !upper_offset && !lower_offset; }
-
+
void ResizeBorders(CellPair& begin_cell, CellPair& end_cell) const
{
begin_cell << left_offset;
@@ -60,13 +60,12 @@ struct TRINITY_DLL_DECL CellArea
end_cell >> right_offset;
end_cell += upper_offset;
}
-
+
int right_offset;
int left_offset;
int upper_offset;
int lower_offset;
};
-
struct TRINITY_DLL_DECL Cell
{
@@ -168,9 +167,9 @@ struct TRINITY_DLL_DECL Cell
template<class LOCK_TYPE, class T, class CONTAINER> void Visit(const CellLock<LOCK_TYPE> &, TypeContainerVisitor<T, CONTAINER> &visitor, Map &) const;
template<class LOCK_TYPE, class T, class CONTAINER> void Visit(const CellLock<LOCK_TYPE> &, TypeContainerVisitor<T, CONTAINER> &visitor, Map &m, const WorldObject &obj, float radius) const;
template<class LOCK_TYPE, class T, class CONTAINER> void Visit(const CellLock<LOCK_TYPE> &, TypeContainerVisitor<T, CONTAINER> &visitor, Map &, float radius, float x_off, float y_off) const;
-
+
static CellArea CalculateCellArea(const WorldObject &obj, float radius);
-
+
private:
template<class LOCK_TYPE, class T, class CONTAINER> void VisitCircle(const CellLock<LOCK_TYPE> &, TypeContainerVisitor<T, CONTAINER> &, Map &, const CellPair& , const CellPair& ) const;
};
diff --git a/src/game/CellImpl.h b/src/game/CellImpl.h
index ff2b0343c69..617d567ce32 100644
--- a/src/game/CellImpl.h
+++ b/src/game/CellImpl.h
@@ -119,9 +119,9 @@ Cell::Visit(const CellLock<LOCK_TYPE> &l, TypeContainerVisitor<T, CONTAINER> &vi
}
// loop the cell range
- for(uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; x++)
+ for (uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; x++)
{
- for(uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; y++)
+ for (uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; y++)
{
CellPair cell_pair(x,y);
Cell r_zone(cell_pair);
@@ -167,9 +167,9 @@ Cell::Visit(const CellLock<LOCK_TYPE> &l, TypeContainerVisitor<T, CONTAINER> &vi
end_cell += upper;
// loop the cell range
- for(uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; x++)
+ for (uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; x++)
{
- for(uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; y++)
+ for (uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; y++)
{
CellPair cell_pair(x,y);
Cell r_zone(cell_pair);
@@ -184,15 +184,15 @@ inline int CellHelper(const float radius)
{
if(radius < 1.0f)
return 0;
-
+
return (int)ceilf(radius/SIZE_OF_GRID_CELL);
}
-
+
inline CellArea Cell::CalculateCellArea(const WorldObject &obj, float radius)
{
if(radius <= 0.0f)
return CellArea();
-
+
//we should increase search radius by object's radius, otherwise
//we could have problems with huge creatures, which won't attack nearest players etc
radius += obj.GetObjectSize();
@@ -200,23 +200,23 @@ inline CellArea Cell::CalculateCellArea(const WorldObject &obj, float radius)
//TODO: add more correct/generic method for this task
const float x_offset = (obj.GetPositionX() - CENTER_GRID_CELL_OFFSET)/SIZE_OF_GRID_CELL;
const float y_offset = (obj.GetPositionY() - CENTER_GRID_CELL_OFFSET)/SIZE_OF_GRID_CELL;
-
+
const float x_val = floor(x_offset + CENTER_GRID_CELL_ID + 0.5f);
const float y_val = floor(y_offset + CENTER_GRID_CELL_ID + 0.5f);
-
+
const float x_off = (x_offset - x_val + CENTER_GRID_CELL_ID) * SIZE_OF_GRID_CELL;
const float y_off = (y_offset - y_val + CENTER_GRID_CELL_ID) * SIZE_OF_GRID_CELL;
-
+
const float tmp_diff = radius - CENTER_GRID_CELL_OFFSET;
//lets calculate upper/lower/right/left corners for cell search
int right = CellHelper(tmp_diff + x_off);
int left = CellHelper(tmp_diff - x_off);
int upper = CellHelper(tmp_diff + y_off);
int lower = CellHelper(tmp_diff - y_off);
-
+
return CellArea(right, left, upper, lower);
}
-
+
template<class LOCK_TYPE, class T, class CONTAINER>
inline void
Cell::Visit(const CellLock<LOCK_TYPE> &l, TypeContainerVisitor<T, CONTAINER> &visitor, Map &m, const WorldObject &obj, float radius) const
@@ -224,7 +224,7 @@ Cell::Visit(const CellLock<LOCK_TYPE> &l, TypeContainerVisitor<T, CONTAINER> &vi
const CellPair &standing_cell = l.i_cellPair;
if (standing_cell.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || standing_cell.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP)
return;
-
+
//no jokes here... Actually placing ASSERT() here was good idea, but
//we had some problems with DynamicObjects, which pass radius = 0.0f (DB issue?)
//maybe it is better to just return when radius <= 0.0f?
@@ -236,7 +236,7 @@ Cell::Visit(const CellLock<LOCK_TYPE> &l, TypeContainerVisitor<T, CONTAINER> &vi
//lets limit the upper value for search radius
if(radius > 333.0f)
radius = 333.0f;
-
+
//lets calculate object coord offsets from cell borders.
CellArea area = Cell::CalculateCellArea(obj, radius);
//if radius fits inside standing cell
@@ -245,10 +245,10 @@ Cell::Visit(const CellLock<LOCK_TYPE> &l, TypeContainerVisitor<T, CONTAINER> &vi
m.Visit(l, visitor);
return;
}
-
+
CellPair begin_cell = standing_cell;
CellPair end_cell = standing_cell;
-
+
area.ResizeBorders(begin_cell, end_cell);
//visit all cells, found in CalculateCellArea()
//if radius is known to reach cell area more than 4x4 then we should call optimized VisitCircle
@@ -259,15 +259,15 @@ Cell::Visit(const CellLock<LOCK_TYPE> &l, TypeContainerVisitor<T, CONTAINER> &vi
VisitCircle(l, visitor, m, begin_cell, end_cell);
return;
}
-
+
//ALWAYS visit standing cell first!!! Since we deal with small radiuses
//it is very essential to call visitor for standing cell firstly...
m.Visit(l, visitor);
-
+
// loop the cell range
- for(uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; x++)
+ for (uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; x++)
{
- for(uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; y++)
+ for (uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; y++)
{
CellPair cell_pair(x,y);
//lets skip standing cell since we already visited it
@@ -281,7 +281,7 @@ Cell::Visit(const CellLock<LOCK_TYPE> &l, TypeContainerVisitor<T, CONTAINER> &vi
}
}
}
-
+
template<class LOCK_TYPE, class T, class CONTAINER>
inline void
Cell::VisitCircle(const CellLock<LOCK_TYPE> &l, TypeContainerVisitor<T, CONTAINER> &visitor, Map &m, const CellPair& begin_cell, const CellPair& end_cell) const
@@ -291,11 +291,11 @@ Cell::VisitCircle(const CellLock<LOCK_TYPE> &l, TypeContainerVisitor<T, CONTAINE
//lets calculate x_start/x_end coords for central strip...
const uint32 x_start = begin_cell.x_coord + x_shift;
const uint32 x_end = end_cell.x_coord - x_shift;
-
+
//visit central strip with constant width...
- for(uint32 x = x_start; x <= x_end; ++x)
+ for (uint32 x = x_start; x <= x_end; ++x)
{
- for(uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; ++y)
+ for (uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; ++y)
{
CellPair cell_pair(x,y);
Cell r_zone(cell_pair);
@@ -304,12 +304,12 @@ Cell::VisitCircle(const CellLock<LOCK_TYPE> &l, TypeContainerVisitor<T, CONTAINE
m.Visit(lock, visitor);
}
}
-
+
//if x_shift == 0 then we have too small cell area, which were already
//visited at previous step, so just return from procedure...
if(x_shift == 0)
return;
-
+
uint32 y_start = end_cell.y_coord;
uint32 y_end = begin_cell.y_coord;
//now we are visiting borders of an octagon...
@@ -327,7 +327,7 @@ Cell::VisitCircle(const CellLock<LOCK_TYPE> &l, TypeContainerVisitor<T, CONTAINE
r_zone_left.data.Part.nocreate = l->data.Part.nocreate;
CellLock<LOCK_TYPE> lock_left(r_zone_left, cell_pair_left);
m.Visit(lock_left, visitor);
-
+
//right trapezoid cell visit
CellPair cell_pair_right(x_end + step, y);
Cell r_zone_right(cell_pair_right);
diff --git a/src/game/Channel.cpp b/src/game/Channel.cpp
index 72e35a6e777..c7155d7d2b1 100644
--- a/src/game/Channel.cpp
+++ b/src/game/Channel.cpp
@@ -46,7 +46,7 @@ Channel::Channel(const std::string& name, uint32 channel_id, uint32 Team)
m_flags |= CHANNEL_FLAG_LFG;
else // for all other channels
m_flags |= CHANNEL_FLAG_NOT_LFG;
- m_IsSaved = false;
+ m_IsSaved = false;
}
else // it's custom channel
{
@@ -62,14 +62,14 @@ Channel::Channel(const std::string& name, uint32 channel_id, uint32 Team)
m_moderate = fields[3].GetBool();
m_password = fields[4].GetString();
const char* db_BannedList = fields[5].GetString();
-
+
m_IsSaved = true;
if(db_BannedList)
{
Tokens tokens = StrSplit(db_BannedList, " ");
Tokens::iterator iter;
- for (iter = tokens.begin();iter != tokens.end(); ++iter)
+ for (iter = tokens.begin(); iter != tokens.end(); ++iter)
{
uint64 banned_guid = atol((*iter).c_str());
if(banned_guid)
@@ -87,7 +87,7 @@ Channel::Channel(const std::string& name, uint32 channel_id, uint32 Team)
{
sLog.outDebug("New Channel(%s) saved", name.c_str());
m_IsSaved = true;
- }
+ }
}
}
}
@@ -160,7 +160,7 @@ void Channel::Join(uint64 p, const char *pass)
if(!IsConstant() && !m_ownerGUID)
{
SetOwner(p, (players.size() > 1 ? true : false));
- players[p].SetModerator(true);
+ players[p].SetModerator(true);
}
/*
else if(!IsConstant() && m_ownerGUID && plr && m_ownerGUID == plr->GetGUID() ))
@@ -265,7 +265,7 @@ void Channel::KickOrBan(uint64 good, const char *badname, bool ban)
{
std::ostringstream banlist;
BannedList::iterator iter;
- for (iter = banned.begin();iter != banned.end(); ++iter)
+ for (iter = banned.begin(); iter != banned.end(); ++iter)
{
banlist << (*iter) << " ";
}
@@ -274,7 +274,7 @@ void Channel::KickOrBan(uint64 good, const char *badname, bool ban)
if(CharacterDatabase.PExecute( ss.str( ).c_str( ) ))
{
sLog.outDebug("Channel(%s) BannedList saved", m_name.c_str());
- }
+ }
}
}
@@ -335,7 +335,7 @@ void Channel::UnBan(uint64 good, const char *badname)
{
std::ostringstream banlist;
BannedList::iterator iter;
- for (iter = banned.begin();iter != banned.end(); ++iter)
+ for (iter = banned.begin(); iter != banned.end(); ++iter)
{
banlist << (*iter) << " ";
}
@@ -344,7 +344,7 @@ void Channel::UnBan(uint64 good, const char *badname)
if(CharacterDatabase.PExecute( ss.str( ).c_str( ) ))
{
sLog.outDebug("Channel(%s) BannedList saved", m_name.c_str());
- }
+ }
}
}
}
@@ -383,7 +383,7 @@ void Channel::Password(uint64 p, const char *pass)
if(CharacterDatabase.PExecute( ss.str( ).c_str( ) ))
{
sLog.outDebug("Channel(%s) password saved", m_name.c_str());
- }
+ }
}
}
}
@@ -541,7 +541,7 @@ void Channel::List(Player* player)
uint32 gmLevelInWhoList = sWorld.getConfig(CONFIG_GM_LEVEL_IN_WHO_LIST);
uint32 count = 0;
- for(PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
+ for (PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
{
Player *plr = objmgr.GetPlayer(i->first);
@@ -598,7 +598,7 @@ void Channel::Announce(uint64 p)
if(CharacterDatabase.PExecute( ss.str( ).c_str( ) ))
{
sLog.outDebug("Channel(%s) announce saved", m_name.c_str());
- }
+ }
}
}
@@ -640,7 +640,7 @@ void Channel::Moderate(uint64 p)
if(CharacterDatabase.PExecute( ss.str( ).c_str( ) ))
{
sLog.outDebug("Channel(%s) moderate saved", m_name.c_str());
- }
+ }
}
}
}
@@ -777,7 +777,7 @@ void Channel::SetOwner(uint64 guid, bool exclaim)
if(CharacterDatabase.PExecute( ss.str( ).c_str( ) ))
{
sLog.outDebug("Channel(%s) owner saved", m_name.c_str());
- }
+ }
}*/
}
@@ -785,7 +785,7 @@ void Channel::SetOwner(uint64 guid, bool exclaim)
void Channel::SendToAll(WorldPacket *data, uint64 p)
{
- for(PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
+ for (PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
{
Player *plr = objmgr.GetPlayer(i->first);
if(plr)
@@ -798,7 +798,7 @@ void Channel::SendToAll(WorldPacket *data, uint64 p)
void Channel::SendToAllButOne(WorldPacket *data, uint64 who)
{
- for(PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
+ for (PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
{
if(i->first != who)
{
diff --git a/src/game/ChannelHandler.cpp b/src/game/ChannelHandler.cpp
index abf73e0e274..31d0c609da1 100644
--- a/src/game/ChannelHandler.cpp
+++ b/src/game/ChannelHandler.cpp
@@ -18,7 +18,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
#include "Policies/SingletonImp.h"
#include "ObjectMgr.h" // for normalizePlayerName
diff --git a/src/game/ChannelMgr.cpp b/src/game/ChannelMgr.cpp
index 09d172155cc..09483c7fbe0 100644
--- a/src/game/ChannelMgr.cpp
+++ b/src/game/ChannelMgr.cpp
@@ -38,7 +38,7 @@ ChannelMgr* channelMgr(uint32 team)
ChannelMgr::~ChannelMgr()
{
- for(ChannelMap::iterator itr = channels.begin();itr!=channels.end(); ++itr)
+ for (ChannelMap::iterator itr = channels.begin(); itr!=channels.end(); ++itr)
delete itr->second;
channels.clear();
diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp
index e1e6eae86a3..14a69e2b732 100644
--- a/src/game/CharacterHandler.cpp
+++ b/src/game/CharacterHandler.cpp
@@ -443,7 +443,7 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data )
recv_data >> hairColor;
recv_data >> facialHair;
recv_data >> outfitId;
-
+
if(recv_data.rpos() < recv_data.wpos())
{
uint8 unk;
@@ -846,7 +846,7 @@ void WorldSession::HandleSetFactionCheat( WorldPacket & /*recv_data*/ )
std::list<struct Factions>::iterator itr;
- for(itr = GetPlayer()->factions.begin(); itr != GetPlayer()->factions.end(); ++itr)
+ for (itr = GetPlayer()->factions.begin(); itr != GetPlayer()->factions.end(); ++itr)
{
if(itr->ReputationListID == FactionID)
{
@@ -1060,7 +1060,7 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
return;
}
- for(int i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
+ for (int i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
{
recv_data >> declinedname.name[i];
if(!normalizePlayerName(declinedname.name[i]))
@@ -1082,7 +1082,7 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
return;
}
- for(int i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
+ for (int i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
CharacterDatabase.escape_string(declinedname.name[i]);
CharacterDatabase.BeginTransaction();
@@ -1288,7 +1288,7 @@ void WorldSession::HandleEquipmentSetSave(WorldPacket &recv_data)
eqSet.IconName = iconName;
eqSet.state = EQUIPMENT_SET_NEW;
- for(uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
+ for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
{
uint64 itemGuid;
if(!recv_data.readPackGUID(itemGuid))
@@ -1324,7 +1324,7 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data)
sLog.outDebug("CMSG_EQUIPMENT_SET_USE");
recv_data.hexlike();
- for(uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
+ for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
{
uint64 itemGuid;
if(!recv_data.readPackGUID(itemGuid))
diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp
index 32233aae5a9..48ffb073327 100644
--- a/src/game/Chat.cpp
+++ b/src/game/Chat.cpp
@@ -825,7 +825,7 @@ bool ChatHandler::hasStringAbbr(const char* name, const char* part)
if (!*part)
return false;
- for (;;)
+ for (; ; )
{
if (!*part)
return true;
@@ -2373,4 +2373,4 @@ LocaleConstant CliHandler::GetSessionDbcLocale() const
int CliHandler::GetSessionDbLocaleIndex() const
{
return objmgr.GetDBCLocaleIndex();
-} \ No newline at end of file
+}
diff --git a/src/game/Chat.h b/src/game/Chat.h
index 1518cb6d45e..70a3c4149f9 100644
--- a/src/game/Chat.h
+++ b/src/game/Chat.h
@@ -92,7 +92,6 @@ class TRINITY_DLL_SPEC ChatHandler
bool HasLowerSecurity(Player* target, uint64 guid, bool strong = false);
bool HasLowerSecurityAccount(WorldSession* target, uint32 account, bool strong = false);
-
void SendGlobalGMSysMessage(const char *str);
static bool SetDataForCommandInTable(ChatCommand *table, const char* text, uint32 security, std::string const& help, std::string const& fullcommand );
diff --git a/src/game/ChatHandler.cpp b/src/game/ChatHandler.cpp
index e5aaab05c9d..77661def698 100644
--- a/src/game/ChatHandler.cpp
+++ b/src/game/ChatHandler.cpp
@@ -90,7 +90,7 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
// also check SPELL_AURA_COMPREHEND_LANGUAGE (client offers option to speak in that language)
Unit::AuraEffectList const& langAuras = _player->GetAurasByType(SPELL_AURA_COMPREHEND_LANGUAGE);
bool foundAura = false;
- for(Unit::AuraEffectList::const_iterator i = langAuras.begin();i != langAuras.end(); ++i)
+ for (Unit::AuraEffectList::const_iterator i = langAuras.begin(); i != langAuras.end(); ++i)
{
if((*i)->GetMiscValue() == int32(lang))
{
diff --git a/src/game/CombatAI.cpp b/src/game/CombatAI.cpp
index b18e6dd7532..b4b7e662188 100644
--- a/src/game/CombatAI.cpp
+++ b/src/game/CombatAI.cpp
@@ -56,7 +56,7 @@ int TurretAI::Permissible(const Creature *creature)
void CombatAI::InitializeAI()
{
- for(uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
+ for (uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
if(me->m_spells[i] && GetSpellStore()->LookupEntry(me->m_spells[i]))
spells.push_back(me->m_spells[i]);
@@ -70,14 +70,14 @@ void CombatAI::Reset()
void CombatAI::JustDied(Unit *killer)
{
- for(SpellVct::iterator i = spells.begin(); i != spells.end(); ++i)
+ for (SpellVct::iterator i = spells.begin(); i != spells.end(); ++i)
if(AISpellInfo[*i].condition == AICOND_DIE)
me->CastSpell(killer, *i, true);
}
void CombatAI::EnterCombat(Unit *who)
{
- for(SpellVct::iterator i = spells.begin(); i != spells.end(); ++i)
+ for (SpellVct::iterator i = spells.begin(); i != spells.end(); ++i)
{
if(AISpellInfo[*i].condition == AICOND_AGGRO)
me->CastSpell(who, *i, false);
@@ -105,7 +105,6 @@ void CombatAI::UpdateAI(const uint32 diff)
DoMeleeAttackIfReady();
}
-
/////////////////
//CasterAI
/////////////////
@@ -115,7 +114,7 @@ void CasterAI::InitializeAI()
CombatAI::InitializeAI();
float m_attackDist = 30.0f;
- for(SpellVct::iterator itr = spells.begin(); itr != spells.end(); ++itr)
+ for (SpellVct::iterator itr = spells.begin(); itr != spells.end(); ++itr)
if (AISpellInfo[*itr].condition == AICOND_COMBAT && m_attackDist > GetAISpellInfo(*itr)->maxRange)
m_attackDist = GetAISpellInfo(*itr)->maxRange;
if (m_attackDist == 30.0f)
@@ -129,7 +128,7 @@ void CasterAI::EnterCombat(Unit *who)
uint32 spell = rand()%spells.size();
uint32 count = 0;
- for(SpellVct::iterator itr = spells.begin(); itr != spells.end(); ++itr, ++count)
+ for (SpellVct::iterator itr = spells.begin(); itr != spells.end(); ++itr, ++count)
{
if(AISpellInfo[*itr].condition == AICOND_AGGRO)
me->CastSpell(who, *itr, false);
@@ -164,7 +163,6 @@ void CasterAI::UpdateAI(const uint32 diff)
}
}
-
//////////////
//ArchorAI
//////////////
@@ -210,7 +208,6 @@ void ArchorAI::UpdateAI(const uint32 diff)
DoMeleeAttackIfReady();
}
-
//////////////
//TurretAI
//////////////
diff --git a/src/game/ConfusedMovementGenerator.cpp b/src/game/ConfusedMovementGenerator.cpp
index 23477c6e62f..24308dd6c36 100644
--- a/src/game/ConfusedMovementGenerator.cpp
+++ b/src/game/ConfusedMovementGenerator.cpp
@@ -49,15 +49,15 @@ ConfusedMovementGenerator<T>::Initialize(T &unit)
VMAP::IVMapManager *vMaps = VMAP::VMapFactory::createOrGetVMapManager();
- for(unsigned int idx=0; idx < MAX_CONF_WAYPOINTS+1; ++idx)
+ for (unsigned int idx=0; idx < MAX_CONF_WAYPOINTS+1; ++idx)
{
const float wanderX=wander_distance*rand_norm() - wander_distance/2;
const float wanderY=wander_distance*rand_norm() - wander_distance/2;
- const bool isInLoS = vMaps->isInLineOfSight(unit.GetMapId(), x, y, z + 2.0f, i_waypoints[idx][0], i_waypoints[idx][1], z + 2.0f);
+ const bool isInLoS = vMaps->isInLineOfSight(unit.GetMapId(), x, y, z + 2.0f, i_waypoints[idx][0], i_waypoints[idx][1], z + 2.0f);
if (!isInLoS)
{
- i_waypoints[idx][0] = x;
+ i_waypoints[idx][0] = x;
i_waypoints[idx][1] = y;
}
diff --git a/src/game/Corpse.cpp b/src/game/Corpse.cpp
index 16e52ef46aa..7c669a568ba 100644
--- a/src/game/Corpse.cpp
+++ b/src/game/Corpse.cpp
@@ -118,7 +118,7 @@ void Corpse::SaveToDB()
<< GetOrientation() << ", "
<< GetZoneId() << ", "
<< GetMapId() << ", '";
- for(uint16 i = 0; i < m_valuesCount; ++i )
+ for (uint16 i = 0; i < m_valuesCount; ++i )
ss << GetUInt32Value(i) << " ";
ss << "',"
<< uint64(m_time) <<", "
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index a3a2e5c1690..5ba7427bcbe 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -61,7 +61,7 @@ TrainerSpell const* TrainerSpellData::Find(uint32 spell_id) const
bool VendorItemData::RemoveItem( uint32 item_id )
{
- for(VendorItemList::iterator i = m_items.begin(); i != m_items.end(); ++i )
+ for (VendorItemList::iterator i = m_items.begin(); i != m_items.end(); ++i )
{
if((*i)->item==item_id)
{
@@ -74,7 +74,7 @@ bool VendorItemData::RemoveItem( uint32 item_id )
size_t VendorItemData::FindItemSlot(uint32 item_id) const
{
- for(size_t i = 0; i < m_items.size(); ++i )
+ for (size_t i = 0; i < m_items.size(); ++i )
if(m_items[i]->item==item_id)
return i;
return m_items.size();
@@ -82,7 +82,7 @@ size_t VendorItemData::FindItemSlot(uint32 item_id) const
VendorItem const* VendorItemData::FindItem(uint32 item_id) const
{
- for(VendorItemList::const_iterator i = m_items.begin(); i != m_items.end(); ++i )
+ for (VendorItemList::const_iterator i = m_items.begin(); i != m_items.end(); ++i )
if((*i)->item==item_id)
return *i;
return NULL;
@@ -146,7 +146,7 @@ m_creatureInfo(NULL), m_reactState(REACT_AGGRESSIVE), m_formation(NULL)
m_regenTimer = 200;
m_valuesCount = UNIT_END;
- for(uint8 i =0; i<CREATURE_MAX_SPELLS; ++i)
+ for (uint8 i =0; i<CREATURE_MAX_SPELLS; ++i)
m_spells[i] = 0;
m_CreatureSpellCooldowns.clear();
@@ -334,7 +334,7 @@ bool Creature::InitEntry(uint32 Entry, uint32 team, const CreatureData *data )
if(!m_respawnradius && m_defaultMovementType==RANDOM_MOTION_TYPE)
m_defaultMovementType = IDLE_MOTION_TYPE;
- for(uint8 i=0; i < CREATURE_MAX_SPELLS; ++i)
+ for (uint8 i=0; i < CREATURE_MAX_SPELLS; ++i)
m_spells[i] = GetCreatureInfo()->spells[i];
return true;
@@ -549,7 +549,7 @@ void Creature::Update(uint32 diff)
!getVictim()->GetCharmerOrOwnerPlayerOrPlayerItself() || // or the victim/owner/charmer is not a player
!getVictim()->GetCharmerOrOwnerPlayerOrPlayerItself()->isGameMaster()); // or the victim/owner/charmer is not a GameMaster
- /*if(m_regenTimer <= diff)
+ /*if(m_regenTimer <= diff)
{*/
if(!bInCombat || bIsPolymorphed) // regenerate health if not in combat or if polymorphed
RegenerateHealth();
@@ -564,7 +564,7 @@ void Creature::Update(uint32 diff)
/*if(!bIsPolymorphed) // only increase the timer if not polymorphed
m_regenTimer += 2000 - diff;
- }
+ }
else
if(!bIsPolymorphed) // if polymorphed, skip the timer
m_regenTimer -= diff;*/
@@ -682,7 +682,7 @@ bool Creature::AIM_Initialize(CreatureAI* ai)
UnitAI *oldAI = i_AI;
Motion_Initialize();
-
+
i_AI = ai ? ai : FactorySelector::selectAI(this);
if(oldAI) delete oldAI;
IsAIEnabled = true;
@@ -695,7 +695,7 @@ void Creature::Motion_Initialize()
if(!m_formation)
i_motionMaster.Initialize();
else if(m_formation->getLeader() == this)
- {
+ {
m_formation->FormationReset(false);
i_motionMaster.Initialize();
}
@@ -894,7 +894,7 @@ void Creature::prepareGossipMenu( Player *pPlayer,uint32 gossipid )
// lazy loading single time at use
LoadGossipOptions();
- for( GossipOptionList::iterator i = m_goptions.begin( ); i != m_goptions.end( ); ++i )
+ for (GossipOptionList::iterator i = m_goptions.begin( ); i != m_goptions.end( ); ++i )
{
GossipOption* gso=&*i;
if(gso->GossipId == gossipid)
@@ -1218,7 +1218,7 @@ uint32 Creature::GetNpcTextId()
GossipOption const* Creature::GetGossipOption( uint32 id ) const
{
- for( GossipOptionList::const_iterator i = m_goptions.begin( ); i != m_goptions.end( ); ++i )
+ for (GossipOptionList::const_iterator i = m_goptions.begin( ); i != m_goptions.end( ); ++i )
{
if(i->Action==id )
return &*i;
@@ -1421,7 +1421,6 @@ void Creature::SelectLevel(const CreatureInfo *cinfo)
SetModifierValue(UNIT_MOD_HEALTH, BASE_VALUE, health);
SetModifierValue(UNIT_MOD_MANA, BASE_VALUE, mana);
-
//damage
float damagemod = 1.0f;//_GetDamageMod(rank);
@@ -1607,7 +1606,7 @@ void Creature::LoadEquipment(uint32 equip_entry, bool force)
bool Creature::hasQuest(uint32 quest_id) const
{
QuestRelations const& qr = objmgr.mCreatureQuestRelations;
- for(QuestRelations::const_iterator itr = qr.lower_bound(GetEntry()); itr != qr.upper_bound(GetEntry()); ++itr)
+ for (QuestRelations::const_iterator itr = qr.lower_bound(GetEntry()); itr != qr.upper_bound(GetEntry()); ++itr)
{
if(itr->second==quest_id)
return true;
@@ -1618,7 +1617,7 @@ bool Creature::hasQuest(uint32 quest_id) const
bool Creature::hasInvolvedQuest(uint32 quest_id) const
{
QuestRelations const& qr = objmgr.mCreatureQuestInvolvedRelations;
- for(QuestRelations::const_iterator itr = qr.lower_bound(GetEntry()); itr != qr.upper_bound(GetEntry()); ++itr)
+ for (QuestRelations::const_iterator itr = qr.lower_bound(GetEntry()); itr != qr.upper_bound(GetEntry()); ++itr)
{
if(itr->second==quest_id)
return true;
@@ -1695,7 +1694,7 @@ bool Creature::canStartAttack(Unit const* who, bool force) const
{
if(isCivilian())
return false;
-
+
if(!canFly() && (GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE + m_CombatDistance))
//|| who->IsControlledByPlayer() && who->IsFlying()))
// we cannot check flying for other creatures, too much map/vmap calculation
@@ -1784,7 +1783,7 @@ void Creature::setDeathState(DeathState s)
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
SetNoSearchAssistance(false);
-
+
//Dismiss group if is leader
if(m_formation && m_formation->getLeader() == this)
m_formation->FormationReset(true);
@@ -1927,7 +1926,7 @@ SpellEntry const *Creature::reachWithSpellAttack(Unit *pVictim)
if(!pVictim)
return NULL;
- for(uint32 i=0; i < CREATURE_MAX_SPELLS; ++i)
+ for (uint32 i=0; i < CREATURE_MAX_SPELLS; ++i)
{
if(!m_spells[i])
continue;
@@ -1939,7 +1938,7 @@ SpellEntry const *Creature::reachWithSpellAttack(Unit *pVictim)
}
bool bcontinue = true;
- for(uint32 j=0;j<3;j++)
+ for (uint32 j=0; j<3; j++)
{
if( (spellInfo->Effect[j] == SPELL_EFFECT_SCHOOL_DAMAGE ) ||
(spellInfo->Effect[j] == SPELL_EFFECT_INSTAKILL) ||
@@ -1977,7 +1976,7 @@ SpellEntry const *Creature::reachWithSpellCure(Unit *pVictim)
if(!pVictim)
return NULL;
- for(uint32 i=0; i < CREATURE_MAX_SPELLS; ++i)
+ for (uint32 i=0; i < CREATURE_MAX_SPELLS; ++i)
{
if(!m_spells[i])
continue;
@@ -1989,7 +1988,7 @@ SpellEntry const *Creature::reachWithSpellCure(Unit *pVictim)
}
bool bcontinue = true;
- for(uint32 j=0;j<3;j++)
+ for (uint32 j=0; j<3; j++)
{
if( (spellInfo->Effect[j] == SPELL_EFFECT_HEAL ) )
{
@@ -2221,7 +2220,7 @@ void Creature::SaveRespawnTime()
objmgr.SaveCreatureRespawnTime(m_DBTableGuid,GetInstanceId(),time(NULL)+m_respawnDelay+m_deathTimer/IN_MILISECONDS);
}
-// this should not be called by petAI or
+// this should not be called by petAI or
bool Creature::canCreatureAttack(Unit const *pVictim, bool force) const
{
if(!pVictim->IsInMap(this))
@@ -2370,7 +2369,7 @@ void Creature::SetInCombatWithZone()
if (PlList.isEmpty())
return;
- for(Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
+ for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
{
if (Player* pPlayer = i->getSource())
{
@@ -2405,7 +2404,7 @@ void Creature::AddCreatureSpellCooldown(uint32 spellid)
uint32 cooldown = GetSpellRecoveryTime(spellInfo);
if(Player *modOwner = GetSpellModOwner())
modOwner->ApplySpellMod(spellid, SPELLMOD_COOLDOWN, cooldown);
-
+
if(cooldown)
_AddCreatureSpellCooldown(spellid, time(NULL) + cooldown/IN_MILISECONDS);
@@ -2438,7 +2437,7 @@ bool Creature::HasSpellCooldown(uint32 spell_id) const
bool Creature::HasSpell(uint32 spellID) const
{
uint8 i;
- for(i = 0; i < CREATURE_MAX_SPELLS; ++i)
+ for (i = 0; i < CREATURE_MAX_SPELLS; ++i)
if(spellID == m_spells[i])
break;
return i < CREATURE_MAX_SPELLS; //broke before end of iteration of known spells
@@ -2542,7 +2541,7 @@ uint32 Creature::GetVendorItemCurrentCount(VendorItem const* vItem)
return vItem->maxcount;
VendorItemCounts::iterator itr = m_vendorItemCounts.begin();
- for(; itr != m_vendorItemCounts.end(); ++itr)
+ for (; itr != m_vendorItemCounts.end(); ++itr)
if(itr->itemId==vItem->item)
break;
@@ -2577,7 +2576,7 @@ uint32 Creature::UpdateVendorItemCurrentCount(VendorItem const* vItem, uint32 us
return 0;
VendorItemCounts::iterator itr = m_vendorItemCounts.begin();
- for(; itr != m_vendorItemCounts.end(); ++itr)
+ for (; itr != m_vendorItemCounts.end(); ++itr)
if(itr->itemId==vItem->item)
break;
diff --git a/src/game/CreatureAI.cpp b/src/game/CreatureAI.cpp
index 27fe428efd1..f065a0b40c6 100644
--- a/src/game/CreatureAI.cpp
+++ b/src/game/CreatureAI.cpp
@@ -79,7 +79,7 @@ void CreatureAI::DoZoneInCombat(Creature* creature)
if(PlList.isEmpty())
return;
- for(Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
+ for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
{
if(Player* pPlayer = i->getSource())
{
@@ -94,7 +94,7 @@ void CreatureAI::DoZoneInCombat(Creature* creature)
}
/* Causes certain things to never leave the threat list (Priest Lightwell, etc):
- for(Unit::ControlList::const_iterator itr = pPlayer->m_Controlled.begin(); itr != pPlayer->m_Controlled.end(); ++itr)
+ for (Unit::ControlList::const_iterator itr = pPlayer->m_Controlled.begin(); itr != pPlayer->m_Controlled.end(); ++itr)
{
creature->SetInCombatWith(*itr);
(*itr)->SetInCombatWith(creature);
@@ -108,7 +108,7 @@ void CreatureAI::MoveInLineOfSight(Unit *who)
{
if(me->getVictim())
return;
-
+
if (me->GetTypeId() == CREATURE_TYPE_NON_COMBAT_PET) // non-combat pets should just stand there and look good;)
return;
diff --git a/src/game/CreatureAI.h b/src/game/CreatureAI.h
index 556e9be14e0..6b20c059828 100644
--- a/src/game/CreatureAI.h
+++ b/src/game/CreatureAI.h
@@ -140,7 +140,7 @@ class TRINITY_DLL_SPEC CreatureAI : public UnitAI
void DoZoneInCombat(Creature* pUnit = NULL);
- // Called at text emote receive from player
+ // Called at text emote receive from player
virtual void ReceiveEmote(Player* pPlayer, uint32 text_emote) {}
///== Triggered Actions Requested ==================
diff --git a/src/game/CreatureAIImpl.h b/src/game/CreatureAIImpl.h
index 89d5bbc2a9e..38d91624c75 100644
--- a/src/game/CreatureAIImpl.h
+++ b/src/game/CreatureAIImpl.h
@@ -413,7 +413,7 @@ class EventMap : private std::map<uint32, uint32>
{
time += m_time;
gcd = (1 << (gcd + 16));
- for(iterator itr = begin(); itr != end();)
+ for (iterator itr = begin(); itr != end(); )
{
if(itr->first >= time)
break;
@@ -429,7 +429,7 @@ class EventMap : private std::map<uint32, uint32>
void CancelEvent(uint32 eventId)
{
- for(iterator itr = begin(); itr != end();)
+ for (iterator itr = begin(); itr != end(); )
{
if(eventId == (itr->second & 0x0000FFFF))
erase(itr++);
@@ -440,7 +440,7 @@ class EventMap : private std::map<uint32, uint32>
void CancelEventsByGCD(uint32 gcd)
{
- for(iterator itr = begin(); itr != end();)
+ for (iterator itr = begin(); itr != end(); )
{
if(itr->second & gcd)
erase(itr++);
@@ -482,7 +482,6 @@ struct AISpellInfoType
TRINITY_DLL_SPEC AISpellInfoType * GetAISpellInfo(uint32 i);
-
inline void CreatureAI::SetGazeOn(Unit *target)
{
if(me->canAttack(target))
@@ -573,7 +572,7 @@ inline bool CreatureAI::_EnterEvadeMode()
me->LoadCreaturesAddon();
me->SetLootRecipient(NULL);
me->ResetPlayerDamageReq();
-
+
if(me->IsInEvadeMode())
return false;
diff --git a/src/game/CreatureAISelector.cpp b/src/game/CreatureAISelector.cpp
index 9f2828bf776..83975c0fc7d 100644
--- a/src/game/CreatureAISelector.cpp
+++ b/src/game/CreatureAISelector.cpp
@@ -77,7 +77,7 @@ namespace FactorySelector
if(!ai_factory)
{
- for(uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
+ for (uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
{
if(creature->m_spells[i])
{
@@ -93,7 +93,7 @@ namespace FactorySelector
int best_val = -1;
typedef CreatureAIRegistry::RegistryMapType RMT;
RMT const &l = ai_registry.GetRegisteredItems();
- for( RMT::const_iterator iter = l.begin(); iter != l.end(); ++iter)
+ for (RMT::const_iterator iter = l.begin(); iter != l.end(); ++iter)
{
const CreatureAICreator *factory = iter->second;
const SelectableAI *p = dynamic_cast<const SelectableAI *>(factory);
@@ -125,7 +125,7 @@ namespace FactorySelector
int best_val = -1;
std::vector<std::string> l;
mv_registry.GetRegisteredItems(l);
- for( std::vector<std::string>::iterator iter = l.begin(); iter != l.end(); ++iter)
+ for (std::vector<std::string>::iterator iter = l.begin(); iter != l.end(); ++iter)
{
const MovementGeneratorCreator *factory = mv_registry.GetRegistryItem((*iter).c_str());
const SelectableMovement *p = dynamic_cast<const SelectableMovement *>(factory);
diff --git a/src/game/CreatureEventAIMgr.cpp b/src/game/CreatureEventAIMgr.cpp
index 5325edff4a9..79a17ed9c8d 100644
--- a/src/game/CreatureEventAIMgr.cpp
+++ b/src/game/CreatureEventAIMgr.cpp
@@ -722,7 +722,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
{
//sLog.outErrorDb("CreatureEventAI: Creature Entry %u has EventAI script but it also has C++ script. EventAI script will be overriden.", cInfo->Entry);
}
- }
+ }
} while (result->NextRow());
delete result;
diff --git a/src/game/CreatureGroups.cpp b/src/game/CreatureGroups.cpp
index 97610754e69..850af004789 100644
--- a/src/game/CreatureGroups.cpp
+++ b/src/game/CreatureGroups.cpp
@@ -142,7 +142,7 @@ void CreatureGroupManager::LoadCreatureFormations()
}
CreatureGroupMap[memberGUID] = group_member;
- }
+ }
while(result->NextRow()) ;
sLog.outString();
@@ -185,7 +185,7 @@ void CreatureGroup::MemberAttackStart(Creature *member, Unit *target)
if(groupAI == 1 && member != m_leader)
return;
- for(CreatureGroupMemberType::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
+ for (CreatureGroupMemberType::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
sLog.outDebug("GROUP ATTACK: group instance id %u calls member instid %u", m_leader->GetInstanceId(), member->GetInstanceId());
//sLog.outDebug("AI:%u:Group member found: %u, attacked by %s.", groupAI, itr->second->GetGUIDLow(), member->getVictim()->GetName());
@@ -207,7 +207,7 @@ void CreatureGroup::MemberAttackStart(Creature *member, Unit *target)
void CreatureGroup::FormationReset(bool dismiss)
{
- for(CreatureGroupMemberType::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
+ for (CreatureGroupMemberType::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
if(itr->first != m_leader && itr->first->isAlive())
{
@@ -228,14 +228,14 @@ void CreatureGroup::LeaderMoveTo(float x, float y, float z)
float pathangle = atan2(m_leader->GetPositionY() - y, m_leader->GetPositionX() - x);
- for(CreatureGroupMemberType::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
+ for (CreatureGroupMemberType::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
Creature *member = itr->first;
if(member == m_leader || !member->isAlive() || member->getVictim())
continue;
float angle = itr->second->follow_angle;
- float dist = itr->second->follow_dist;
+ float dist = itr->second->follow_dist;
float dx = x + cos(angle + pathangle) * dist;
float dy = y + sin(angle + pathangle) * dist;
diff --git a/src/game/CreatureGroups.h b/src/game/CreatureGroups.h
index cc3eacfe185..0f5ca4a90e2 100644
--- a/src/game/CreatureGroups.h
+++ b/src/game/CreatureGroups.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
@@ -28,8 +28,8 @@ class CreatureGroup;
struct FormationInfo
{
uint32 leaderGUID;
- float follow_dist;
- float follow_angle;
+ float follow_dist;
+ float follow_angle;
uint8 groupAI;
};
@@ -59,7 +59,7 @@ class CreatureGroup
//Group cannot be created empty
explicit CreatureGroup(uint32 id) : m_groupID(id), m_leader(NULL), m_Formed(false) {}
~CreatureGroup() { sLog.outDebug("Destroying group"); }
-
+
Creature* getLeader() const { return m_leader; }
uint32 GetId() const { return m_groupID; }
bool isEmpty() const { return m_members.empty(); }
diff --git a/src/game/DBCStores.cpp b/src/game/DBCStores.cpp
index 5dae4cb6e17..159c448f415 100644
--- a/src/game/DBCStores.cpp
+++ b/src/game/DBCStores.cpp
@@ -178,7 +178,7 @@ inline void LoadDBC(uint32& availableDbcLocales,barGoLink& bar, StoreProblemList
if(storage.Load(dbc_filename.c_str(), sql))
{
bar.step();
- for(uint8 i = 0; i < MAX_LOCALE; ++i)
+ for (uint8 i = 0; i < MAX_LOCALE; ++i)
{
if(!(availableDbcLocales & (1 << i)))
continue;
@@ -220,7 +220,7 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sAreaStore, dbcPath,"AreaTable.dbc");
// must be after sAreaStore loading
- for(uint32 i = 0; i < sAreaStore.GetNumRows(); ++i) // areaflag numbered from 0
+ for (uint32 i = 0; i < sAreaStore.GetNumRows(); ++i) // areaflag numbered from 0
{
if(AreaTableEntry const* area = sAreaStore.LookupEntry(i))
{
@@ -259,7 +259,7 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sEmotesStore, dbcPath,"Emotes.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sEmotesTextStore, dbcPath,"EmotesText.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sFactionStore, dbcPath,"Faction.dbc");
- for (uint32 i=0;i<sFactionStore.GetNumRows(); ++i)
+ for (uint32 i=0; i<sFactionStore.GetNumRows(); ++i)
{
FactionEntry const * faction = sFactionStore.LookupEntry(i);
if (faction && faction->team)
@@ -271,7 +271,7 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sFactionTemplateStore, dbcPath,"FactionTemplate.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGameObjectDisplayInfoStore, dbcPath,"GameObjectDisplayInfo.dbc");
- for(uint32 i = 0; i < sGameObjectDisplayInfoStore.GetNumRows(); ++i)
+ for (uint32 i = 0; i < sGameObjectDisplayInfoStore.GetNumRows(); ++i)
{
if(GameObjectDisplayInfoEntry const * info = sGameObjectDisplayInfoStore.LookupEntry(i))
{
@@ -323,7 +323,7 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSkillLineAbilityStore, dbcPath,"SkillLineAbility.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSoundEntriesStore, dbcPath,"SoundEntries.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellStore, dbcPath,"Spell.dbc", &CustomSpellEntryfmt, &CustomSpellEntryIndex);
- for(uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
+ for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
{
SpellEntry const * spell = sSpellStore.LookupEntry(i);
if(spell && spell->Category)
@@ -388,7 +388,7 @@ void LoadDBCStores(const std::string& dataPath)
// prepare fast data access to bit pos of talent ranks for use at inspecting
{
// now have all max ranks (and then bit amount used for store talent ranks in inspect)
- for(uint32 talentTabId = 1; talentTabId < sTalentTabStore.GetNumRows(); ++talentTabId)
+ for (uint32 talentTabId = 1; talentTabId < sTalentTabStore.GetNumRows(); ++talentTabId)
{
TalentTabEntry const *talentTabInfo = sTalentTabStore.LookupEntry( talentTabId );
if(!talentTabInfo)
@@ -400,7 +400,7 @@ void LoadDBCStores(const std::string& dataPath)
// store class talent tab pages
uint32 cls = 1;
- for(uint32 m=1;!(m & talentTabInfo->ClassMask) && cls < MAX_CLASSES;m <<=1, ++cls) {}
+ for (uint32 m=1; !(m & talentTabInfo->ClassMask) && cls < MAX_CLASSES; m <<=1, ++cls) {}
sTalentTabPages[cls][talentTabInfo->tabpage]=talentTabId;
}
@@ -409,7 +409,7 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sTaxiNodesStore, dbcPath,"TaxiNodes.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sTaxiPathStore, dbcPath,"TaxiPath.dbc");
- for(uint32 i = 1; i < sTaxiPathStore.GetNumRows(); ++i)
+ for (uint32 i = 1; i < sTaxiPathStore.GetNumRows(); ++i)
if(TaxiPathEntry const* entry = sTaxiPathStore.LookupEntry(i))
sTaxiPathSetBySource[entry->from][entry->to] = TaxiPathBySourceAndDestination(entry->ID,entry->price);
uint32 pathCount = sTaxiPathStore.GetNumRows();
@@ -419,7 +419,7 @@ void LoadDBCStores(const std::string& dataPath)
// Calculate path nodes count
std::vector<uint32> pathLength;
pathLength.resize(pathCount); // 0 and some other indexes not used
- for(uint32 i = 1; i < sTaxiPathNodeStore.GetNumRows(); ++i)
+ for (uint32 i = 1; i < sTaxiPathNodeStore.GetNumRows(); ++i)
if(TaxiPathNodeEntry const* entry = sTaxiPathNodeStore.LookupEntry(i))
{
if (pathLength[entry->path] < entry->index + 1)
@@ -427,10 +427,10 @@ void LoadDBCStores(const std::string& dataPath)
}
// Set path length
sTaxiPathNodesByPath.resize(pathCount); // 0 and some other indexes not used
- for(uint32 i = 1; i < sTaxiPathNodesByPath.size(); ++i)
+ for (uint32 i = 1; i < sTaxiPathNodesByPath.size(); ++i)
sTaxiPathNodesByPath[i].resize(pathLength[i]);
// fill data
- for(uint32 i = 1; i < sTaxiPathNodeStore.GetNumRows(); ++i)
+ for (uint32 i = 1; i < sTaxiPathNodeStore.GetNumRows(); ++i)
if(TaxiPathNodeEntry const* entry = sTaxiPathNodeStore.LookupEntry(i))
sTaxiPathNodesByPath[entry->path][entry->index] = TaxiPathNode(entry->mapid,entry->x,entry->y,entry->z,entry->actionFlag,entry->delay);
sTaxiPathNodeStore.Clear();
@@ -439,15 +439,15 @@ void LoadDBCStores(const std::string& dataPath)
// include existed nodes that have at least single not spell base (scripted) path
{
std::set<uint32> spellPaths;
- for(uint32 i = 1; i < sSpellStore.GetNumRows (); ++i)
+ for (uint32 i = 1; i < sSpellStore.GetNumRows (); ++i)
if(SpellEntry const* sInfo = sSpellStore.LookupEntry (i))
- for(int j=0; j < 3; ++j)
+ for (int j=0; j < 3; ++j)
if(sInfo->Effect[j]==123 /*SPELL_EFFECT_SEND_TAXI*/)
spellPaths.insert(sInfo->EffectMiscValue[j]);
memset(sTaxiNodesMask,0,sizeof(sTaxiNodesMask));
memset(sOldContinentsNodesMask,0,sizeof(sTaxiNodesMask));
- for(uint32 i = 1; i < sTaxiNodesStore.GetNumRows(); ++i)
+ for (uint32 i = 1; i < sTaxiNodesStore.GetNumRows(); ++i)
{
TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(i);
if(!node)
@@ -457,7 +457,7 @@ void LoadDBCStores(const std::string& dataPath)
if(src_i!=sTaxiPathSetBySource.end() && !src_i->second.empty())
{
bool ok = false;
- for(TaxiPathSetForSource::const_iterator dest_i = src_i->second.begin();dest_i != src_i->second.end(); ++dest_i)
+ for (TaxiPathSetForSource::const_iterator dest_i = src_i->second.begin(); dest_i != src_i->second.end(); ++dest_i)
{
// not spell path
if(spellPaths.find(dest_i->second.ID)==spellPaths.end())
@@ -498,7 +498,7 @@ void LoadDBCStores(const std::string& dataPath)
else if(!bad_dbc_files.empty() )
{
std::string str;
- for(std::list<std::string>::iterator i = bad_dbc_files.begin(); i != bad_dbc_files.end(); ++i)
+ for (std::list<std::string>::iterator i = bad_dbc_files.begin(); i != bad_dbc_files.end(); ++i)
str += *i + "\n";
sLog.outError("\nSome required *.dbc files (%u from %d) not found or not compatible:\n%s",(uint32)bad_dbc_files.size(),DBCFilesCount,str.c_str());
@@ -524,14 +524,14 @@ void LoadDBCStores(const std::string& dataPath)
SimpleFactionsList const* GetFactionTeamList(uint32 faction, bool &isTeamMember)
{
- for(FactionTeamMap::const_iterator itr = sFactionTeamMap.begin(); itr != sFactionTeamMap.end(); ++itr)
+ for (FactionTeamMap::const_iterator itr = sFactionTeamMap.begin(); itr != sFactionTeamMap.end(); ++itr)
{
if(itr->first == faction)
{
isTeamMember = false;
return &itr->second;
}
- for(SimpleFactionsList::const_iterator itr2 = itr->second.begin(); itr2 != itr->second.end(); ++itr2)
+ for (SimpleFactionsList::const_iterator itr2 = itr->second.begin(); itr2 != itr->second.end(); ++itr2)
{
if((*itr2) == faction)
{
@@ -640,7 +640,7 @@ ContentLevels GetContentLevelsForMapAndZone(uint32 mapid, uint32 zoneId)
ChatChannelsEntry const* GetChannelEntryFor(uint32 channel_id)
{
// not sorted, numbering index from 0
- for(uint32 i = 0; i < sChatChannelsStore.GetNumRows(); ++i)
+ for (uint32 i = 0; i < sChatChannelsStore.GetNumRows(); ++i)
{
ChatChannelsEntry const* ch = sChatChannelsStore.LookupEntry(i);
if(ch && ch->ChannelID == channel_id)
diff --git a/src/game/DBCStructure.h b/src/game/DBCStructure.h
index 7e459c61e8b..9e44687e867 100644
--- a/src/game/DBCStructure.h
+++ b/src/game/DBCStructure.h
@@ -390,7 +390,6 @@ struct AchievementCriteriaEntry
uint32 goldInCopper; // 4
} quest_reward_money;
-
// ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY = 67
struct
{
@@ -837,10 +836,10 @@ struct FactionTemplateEntry
return true;
if(entry.faction)
{
- for(int i = 0; i < 4; ++i)
+ for (int i = 0; i < 4; ++i)
if (enemyFaction[i] == entry.faction)
return false;
- for(int i = 0; i < 4; ++i)
+ for (int i = 0; i < 4; ++i)
if (friendFaction[i] == entry.faction)
return true;
}
@@ -852,10 +851,10 @@ struct FactionTemplateEntry
return false;
if(entry.faction)
{
- for(int i = 0; i < 4; ++i)
+ for (int i = 0; i < 4; ++i)
if (enemyFaction[i] == entry.faction)
return true;
- for(int i = 0; i < 4; ++i)
+ for (int i = 0; i < 4; ++i)
if (friendFaction[i] == entry.faction)
return false;
}
@@ -864,7 +863,7 @@ struct FactionTemplateEntry
bool IsHostileToPlayers() const { return (hostileMask & FACTION_MASK_PLAYER) !=0; }
bool IsNeutralToAll() const
{
- for(int i = 0; i < 4; ++i)
+ for (int i = 0; i < 4; ++i)
if (enemyFaction[i] != 0)
return false;
return hostileMask == 0 && friendlyMask == 0;
diff --git a/src/game/Debugcmds.cpp b/src/game/Debugcmds.cpp
index 97f90e33af4..e016d8c98b0 100644
--- a/src/game/Debugcmds.cpp
+++ b/src/game/Debugcmds.cpp
@@ -465,7 +465,7 @@ bool ChatHandler::HandleDebugGetItemStateCommand(const char* args)
if (list_queue)
{
std::vector<Item *> &updateQueue = player->GetItemUpdateQueue();
- for(size_t i = 0; i < updateQueue.size(); ++i)
+ for (size_t i = 0; i < updateQueue.size(); ++i)
{
Item *item = updateQueue[i];
if(!item) continue;
@@ -608,7 +608,7 @@ bool ChatHandler::HandleDebugGetItemStateCommand(const char* args)
}
}
- for(size_t i = 0; i < updateQueue.size(); ++i)
+ for (size_t i = 0; i < updateQueue.size(); ++i)
{
Item *item = updateQueue[i];
if(!item) continue;
@@ -669,7 +669,7 @@ bool ChatHandler::HandleDebugThreatList(const char * /*args*/)
std::list<HostilReference*>::iterator itr;
uint32 cnt = 0;
PSendSysMessage("Threat list of %s (guid %u)",target->GetName(), target->GetGUIDLow());
- for(itr = tlist.begin(); itr != tlist.end(); ++itr)
+ for (itr = tlist.begin(); itr != tlist.end(); ++itr)
{
Unit* unit = (*itr)->getTarget();
if(!unit)
@@ -901,7 +901,7 @@ bool ChatHandler::HandleDebugSetAuraStateCommand(const char* args)
if (!state)
{
// reset all states
- for(int i = 1; i <= 32; ++i)
+ for (int i = 1; i <= 32; ++i)
unit->ModifyAuraState(AuraState(i),false);
return true;
}
diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp
index 30147732b08..db0a4a7f2ef 100644
--- a/src/game/DynamicObject.cpp
+++ b/src/game/DynamicObject.cpp
@@ -135,12 +135,12 @@ void DynamicObject::Update(uint32 p_time)
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
-
+
MaNGOS::DynamicObjectUpdater notifier(*this, caster);
-
+
TypeContainerVisitor<MaNGOS::DynamicObjectUpdater, WorldTypeMapContainer > world_object_notifier(notifier);
TypeContainerVisitor<MaNGOS::DynamicObjectUpdater, GridTypeMapContainer > grid_object_notifier(notifier);
-
+
CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, world_object_notifier, *GetMap(), *this, m_radius);
cell_lock->Visit(cell_lock, grid_object_notifier, *GetMap(), *this, m_radius);
diff --git a/src/game/FleeingMovementGenerator.cpp b/src/game/FleeingMovementGenerator.cpp
index eef98b705cc..5c844ff4db5 100644
--- a/src/game/FleeingMovementGenerator.cpp
+++ b/src/game/FleeingMovementGenerator.cpp
@@ -80,7 +80,7 @@ FleeingMovementGenerator<T>::_getPoint(T &owner, float &x, float &y, float &z)
float temp_x, temp_y, angle;
const Map * _map = owner.GetBaseMap();
//primitive path-finding
- for(uint8 i = 0; i < 18; ++i)
+ for (uint8 i = 0; i < 18; ++i)
{
if(i_only_forward && i > 2)
break;
diff --git a/src/game/GameEventMgr.cpp b/src/game/GameEventMgr.cpp
index 5b7aa737bc0..22a4d7a7f13 100644
--- a/src/game/GameEventMgr.cpp
+++ b/src/game/GameEventMgr.cpp
@@ -58,7 +58,7 @@ bool GameEventMgr::CheckOneGameEvent(uint16 entry) const
case GAMEEVENT_WORLD_INACTIVE:
{
time_t currenttime = time(NULL);
- for(std::set<uint16>::const_iterator itr = mGameEvent[entry].prerequisite_events.begin(); itr != mGameEvent[entry].prerequisite_events.end(); ++itr)
+ for (std::set<uint16>::const_iterator itr = mGameEvent[entry].prerequisite_events.begin(); itr != mGameEvent[entry].prerequisite_events.end(); ++itr)
{
if( (mGameEvent[*itr].state != GAMEEVENT_WORLD_NEXTPHASE && mGameEvent[*itr].state != GAMEEVENT_WORLD_FINISHED) || // if prereq not in nextphase or finished state, then can't start this one
mGameEvent[*itr].nextstart > currenttime) // if not in nextphase state for long enough, can't start this one
@@ -181,7 +181,7 @@ void GameEventMgr::StopEvent( uint16 event_id, bool overwrite )
mGameEvent[event_id].nextstart = 0;
mGameEvent[event_id].state = GAMEEVENT_WORLD_INACTIVE;
std::map<uint32 /*condition id*/, GameEventFinishCondition>::iterator itr;
- for(itr = mGameEvent[event_id].conditions.begin(); itr != mGameEvent[event_id].conditions.end(); ++itr)
+ for (itr = mGameEvent[event_id].conditions.begin(); itr != mGameEvent[event_id].conditions.end(); ++itr)
itr->second.done = 0;
CharacterDatabase.BeginTransaction();
CharacterDatabase.PExecute("DELETE FROM game_event_save WHERE event_id = '%u'",event_id);
@@ -351,7 +351,6 @@ void GameEventMgr::LoadFromDB()
continue;
}
-
if(mGameEvent[event_id].state != GAMEEVENT_NORMAL && mGameEvent[event_id].state != GAMEEVENT_INTERNAL)
{
uint16 prerequisite_event = fields[1].GetUInt16();
@@ -839,7 +838,7 @@ void GameEventMgr::LoadFromDB()
// get the event npc flag for checking if the npc will be vendor during the event or not
uint32 event_npc_flag = 0;
NPCFlagList& flist = mGameEventNPCFlags[event_id];
- for(NPCFlagList::const_iterator itr = flist.begin(); itr != flist.end(); ++itr)
+ for (NPCFlagList::const_iterator itr = flist.begin(); itr != flist.end(); ++itr)
{
if(itr->first == guid)
{
@@ -1014,7 +1013,7 @@ uint32 GameEventMgr::GetNPCFlag(Creature * cr)
uint32 mask = 0;
uint32 guid = cr->GetDBTableGUIDLow();
- for(ActiveEvents::iterator e_itr = m_ActiveEvents.begin(); e_itr != m_ActiveEvents.end(); ++e_itr)
+ for (ActiveEvents::iterator e_itr = m_ActiveEvents.begin(); e_itr != m_ActiveEvents.end(); ++e_itr)
{
for(NPCFlagList::iterator itr = mGameEventNPCFlags[*e_itr].begin();
itr != mGameEventNPCFlags[*e_itr].end();
@@ -1102,13 +1101,13 @@ uint32 GameEventMgr::Update() // return the next e
// now activate the queue
// a now activated event can contain a spawn of a to-be-deactivated one
// following the activate - deactivate order, deactivating the first event later will leave the spawn in (wont disappear then reappear clientside)
- for(std::set<uint16>::iterator itr = activate.begin(); itr != activate.end(); ++itr)
+ for (std::set<uint16>::iterator itr = activate.begin(); itr != activate.end(); ++itr)
// start the event
// returns true the started event completed
// in that case, initiate next update in 1 second
if(StartEvent(*itr))
nextEventDelay = 0;
- for(std::set<uint16>::iterator itr = deactivate.begin(); itr != deactivate.end(); ++itr)
+ for (std::set<uint16>::iterator itr = deactivate.begin(); itr != deactivate.end(); ++itr)
StopEvent(*itr);
sLog.outDetail("Next game event check in %u seconds.", nextEventDelay + 1);
return (nextEventDelay + 1) * IN_MILISECONDS; // Add 1 second to be sure event has started/stopped at next call
@@ -1167,7 +1166,7 @@ void GameEventMgr::ApplyNewEvent(uint16 event_id)
void GameEventMgr::UpdateEventNPCFlags(uint16 event_id)
{
// go through the creatures whose npcflags are changed in the event
- for(NPCFlagList::iterator itr = mGameEventNPCFlags[event_id].begin(); itr != mGameEventNPCFlags[event_id].end(); ++itr)
+ for (NPCFlagList::iterator itr = mGameEventNPCFlags[event_id].begin(); itr != mGameEventNPCFlags[event_id].end(); ++itr)
{
// get the creature data from the low guid to get the entry, to be able to find out the whole guid
if( CreatureData const* data = objmgr.GetCreatureData(itr->first) )
@@ -1193,14 +1192,14 @@ void GameEventMgr::UpdateEventNPCFlags(uint16 event_id)
void GameEventMgr::UpdateBattleGroundSettings()
{
uint32 mask = 0;
- for(ActiveEvents::const_iterator itr = m_ActiveEvents.begin(); itr != m_ActiveEvents.end(); ++itr )
+ for (ActiveEvents::const_iterator itr = m_ActiveEvents.begin(); itr != m_ActiveEvents.end(); ++itr )
mask |= mGameEventBattleGroundHolidays[*itr];
sBattleGroundMgr.SetHolidayWeekends(mask);
}
void GameEventMgr::UpdateEventNPCVendor(uint16 event_id, bool activate)
{
- for(NPCVendorList::iterator itr = mGameEventVendors[event_id].begin(); itr != mGameEventVendors[event_id].end(); ++itr)
+ for (NPCVendorList::iterator itr = mGameEventVendors[event_id].begin(); itr != mGameEventVendors[event_id].end(); ++itr)
{
if(activate)
objmgr.AddVendorItem(itr->entry, itr->item, itr->maxcount, itr->incrtime, itr->ExtendedCost, false);
@@ -1219,7 +1218,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
return;
}
- for (GuidList::iterator itr = mGameEventCreatureGuids[internal_event_id].begin();itr != mGameEventCreatureGuids[internal_event_id].end();++itr)
+ for (GuidList::iterator itr = mGameEventCreatureGuids[internal_event_id].begin(); itr != mGameEventCreatureGuids[internal_event_id].end(); ++itr)
{
// Add to correct cell
CreatureData const* data = objmgr.GetCreatureData(*itr);
@@ -1252,7 +1251,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
return;
}
- for (GuidList::iterator itr = mGameEventGameobjectGuids[internal_event_id].begin();itr != mGameEventGameobjectGuids[internal_event_id].end();++itr)
+ for (GuidList::iterator itr = mGameEventGameobjectGuids[internal_event_id].begin(); itr != mGameEventGameobjectGuids[internal_event_id].end(); ++itr)
{
// Add to correct cell
GameObjectData const* data = objmgr.GetGOData(*itr);
@@ -1286,7 +1285,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
return;
}
- for (IdList::iterator itr = mGameEventPoolIds[internal_event_id].begin();itr != mGameEventPoolIds[internal_event_id].end();++itr)
+ for (IdList::iterator itr = mGameEventPoolIds[internal_event_id].begin(); itr != mGameEventPoolIds[internal_event_id].end(); ++itr)
{
poolhandler.SpawnPool(*itr);
}
@@ -1302,7 +1301,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
return;
}
- for (GuidList::iterator itr = mGameEventCreatureGuids[internal_event_id].begin();itr != mGameEventCreatureGuids[internal_event_id].end();++itr)
+ for (GuidList::iterator itr = mGameEventCreatureGuids[internal_event_id].begin(); itr != mGameEventCreatureGuids[internal_event_id].end(); ++itr)
{
// check if it's needed by another event, if so, don't remove
if( event_id > 0 && hasCreatureActiveEventExcept(*itr,event_id) )
@@ -1323,7 +1322,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
return;
}
- for (GuidList::iterator itr = mGameEventGameobjectGuids[internal_event_id].begin();itr != mGameEventGameobjectGuids[internal_event_id].end();++itr)
+ for (GuidList::iterator itr = mGameEventGameobjectGuids[internal_event_id].begin(); itr != mGameEventGameobjectGuids[internal_event_id].end(); ++itr)
{
// check if it's needed by another event, if so, don't remove
if( event_id >0 && hasGameObjectActiveEventExcept(*itr,event_id) )
@@ -1343,7 +1342,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
return;
}
- for (IdList::iterator itr = mGameEventPoolIds[internal_event_id].begin();itr != mGameEventPoolIds[internal_event_id].end();++itr)
+ for (IdList::iterator itr = mGameEventPoolIds[internal_event_id].begin(); itr != mGameEventPoolIds[internal_event_id].end(); ++itr)
{
poolhandler.DespawnPool(*itr);
}
@@ -1351,7 +1350,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
void GameEventMgr::ChangeEquipOrModel(int16 event_id, bool activate)
{
- for(ModelEquipList::iterator itr = mGameEventModelEquip[event_id].begin();itr != mGameEventModelEquip[event_id].end();++itr)
+ for (ModelEquipList::iterator itr = mGameEventModelEquip[event_id].begin(); itr != mGameEventModelEquip[event_id].end(); ++itr)
{
// Remove the creature from grid
CreatureData const* data = objmgr.GetCreatureData(itr->first);
@@ -1431,7 +1430,7 @@ void GameEventMgr::ChangeEquipOrModel(int16 event_id, bool activate)
bool GameEventMgr::hasCreatureQuestActiveEventExcept(uint32 quest_id, uint16 event_id)
{
- for(ActiveEvents::iterator e_itr = m_ActiveEvents.begin(); e_itr != m_ActiveEvents.end(); ++e_itr)
+ for (ActiveEvents::iterator e_itr = m_ActiveEvents.begin(); e_itr != m_ActiveEvents.end(); ++e_itr)
{
if((*e_itr) != event_id)
for(QuestRelList::iterator itr = mGameEventCreatureQuests[*e_itr].begin();
@@ -1445,7 +1444,7 @@ bool GameEventMgr::hasCreatureQuestActiveEventExcept(uint32 quest_id, uint16 eve
bool GameEventMgr::hasGameObjectQuestActiveEventExcept(uint32 quest_id, uint16 event_id)
{
- for(ActiveEvents::iterator e_itr = m_ActiveEvents.begin(); e_itr != m_ActiveEvents.end(); ++e_itr)
+ for (ActiveEvents::iterator e_itr = m_ActiveEvents.begin(); e_itr != m_ActiveEvents.end(); ++e_itr)
{
if((*e_itr) != event_id)
for(QuestRelList::iterator itr = mGameEventGameObjectQuests[*e_itr].begin();
@@ -1458,7 +1457,7 @@ bool GameEventMgr::hasGameObjectQuestActiveEventExcept(uint32 quest_id, uint16 e
}
bool GameEventMgr::hasCreatureActiveEventExcept(uint32 creature_id, uint16 event_id)
{
- for(ActiveEvents::iterator e_itr = m_ActiveEvents.begin(); e_itr != m_ActiveEvents.end(); ++e_itr)
+ for (ActiveEvents::iterator e_itr = m_ActiveEvents.begin(); e_itr != m_ActiveEvents.end(); ++e_itr)
{
if((*e_itr) != event_id)
{
@@ -1474,7 +1473,7 @@ bool GameEventMgr::hasCreatureActiveEventExcept(uint32 creature_id, uint16 event
}
bool GameEventMgr::hasGameObjectActiveEventExcept(uint32 go_id, uint16 event_id)
{
- for(ActiveEvents::iterator e_itr = m_ActiveEvents.begin(); e_itr != m_ActiveEvents.end(); ++e_itr)
+ for (ActiveEvents::iterator e_itr = m_ActiveEvents.begin(); e_itr != m_ActiveEvents.end(); ++e_itr)
{
if((*e_itr) != event_id)
{
@@ -1492,7 +1491,7 @@ bool GameEventMgr::hasGameObjectActiveEventExcept(uint32 go_id, uint16 event_id)
void GameEventMgr::UpdateEventQuests(uint16 event_id, bool Activate)
{
QuestRelList::iterator itr;
- for (itr = mGameEventCreatureQuests[event_id].begin();itr != mGameEventCreatureQuests[event_id].end();++itr)
+ for (itr = mGameEventCreatureQuests[event_id].begin(); itr != mGameEventCreatureQuests[event_id].end(); ++itr)
{
QuestRelations &CreatureQuestMap = objmgr.mCreatureQuestRelations;
if (Activate) // Add the pair(id,quest) to the multimap
@@ -1506,7 +1505,7 @@ void GameEventMgr::UpdateEventQuests(uint16 event_id, bool Activate)
if (qitr == CreatureQuestMap.end())
continue;
QuestRelations::iterator lastElement = CreatureQuestMap.upper_bound(itr->first);
- for ( ;qitr != lastElement;++qitr)
+ for (; qitr != lastElement; ++qitr)
{
if (qitr->second == itr->second)
{
@@ -1517,7 +1516,7 @@ void GameEventMgr::UpdateEventQuests(uint16 event_id, bool Activate)
}
}
}
- for (itr = mGameEventGameObjectQuests[event_id].begin();itr != mGameEventGameObjectQuests[event_id].end();++itr)
+ for (itr = mGameEventGameObjectQuests[event_id].begin(); itr != mGameEventGameObjectQuests[event_id].end(); ++itr)
{
QuestRelations &GameObjectQuestMap = objmgr.mGOQuestRelations;
if (Activate) // Add the pair(id,quest) to the multimap
@@ -1531,7 +1530,7 @@ void GameEventMgr::UpdateEventQuests(uint16 event_id, bool Activate)
if (qitr == GameObjectQuestMap.end())
continue;
QuestRelations::iterator lastElement = GameObjectQuestMap.upper_bound(itr->first);
- for ( ;qitr != lastElement;++qitr)
+ for (; qitr != lastElement; ++qitr)
{
if (qitr->second == itr->second)
{
@@ -1596,7 +1595,7 @@ void GameEventMgr::HandleQuestComplete(uint32 quest_id)
bool GameEventMgr::CheckOneGameEventConditions(uint16 event_id)
{
- for(std::map<uint32,GameEventFinishCondition>::iterator itr = mGameEvent[event_id].conditions.begin(); itr != mGameEvent[event_id].conditions.end(); ++itr)
+ for (std::map<uint32,GameEventFinishCondition>::iterator itr = mGameEvent[event_id].conditions.begin(); itr != mGameEvent[event_id].conditions.end(); ++itr)
if(itr->second.done < itr->second.reqNum)
// return false if a condition doesn't match
return false;
@@ -1637,7 +1636,7 @@ void GameEventMgr::HandleWorldEventGossip(Player *plr, Creature *c)
void GameEventMgr::SendWorldStateUpdate(Player * plr, uint16 event_id)
{
std::map<uint32,GameEventFinishCondition>::iterator itr;
- for(itr = mGameEvent[event_id].conditions.begin(); itr !=mGameEvent[event_id].conditions.end(); ++itr)
+ for (itr = mGameEvent[event_id].conditions.begin(); itr !=mGameEvent[event_id].conditions.end(); ++itr)
{
if(itr->second.done_world_state)
plr->SendUpdateWorldState(itr->second.done_world_state, (uint32)(itr->second.done));
@@ -1651,7 +1650,7 @@ TRINITY_DLL_SPEC bool IsHolidayActive( HolidayIds id )
GameEventMgr::GameEventDataMap const& events = gameeventmgr.GetEventMap();
GameEventMgr::ActiveEvents const& ae = gameeventmgr.GetActiveEventList();
- for(GameEventMgr::ActiveEvents::const_iterator itr = ae.begin(); itr != ae.end(); ++itr)
+ for (GameEventMgr::ActiveEvents::const_iterator itr = ae.begin(); itr != ae.end(); ++itr)
if(events[*itr].holiday_id==id)
return true;
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index d7315f9626b..ae12b1cb379 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -633,7 +633,7 @@ bool GameObject::LoadFromDB(uint32 guid, Map *map)
if(data->spawntimesecs >= 0)
{
m_spawnedByDefault = true;
-
+
if(!GetGOInfo()->GetDespawnPossibility() && !GetGOInfo()->IsDespawnAtAction())
{
SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NODESPAWN);
@@ -684,7 +684,7 @@ GameObject* GameObject::GetGameObject(WorldObject& object, uint64 guid)
bool GameObject::hasQuest(uint32 quest_id) const
{
QuestRelations const& qr = objmgr.mGOQuestRelations;
- for(QuestRelations::const_iterator itr = qr.lower_bound(GetEntry()); itr != qr.upper_bound(GetEntry()); ++itr)
+ for (QuestRelations::const_iterator itr = qr.lower_bound(GetEntry()); itr != qr.upper_bound(GetEntry()); ++itr)
{
if(itr->second==quest_id)
return true;
@@ -695,7 +695,7 @@ bool GameObject::hasQuest(uint32 quest_id) const
bool GameObject::hasInvolvedQuest(uint32 quest_id) const
{
QuestRelations const& qr = objmgr.mGOQuestInvolvedRelations;
- for(QuestRelations::const_iterator itr = qr.lower_bound(GetEntry()); itr != qr.upper_bound(GetEntry()); ++itr)
+ for (QuestRelations::const_iterator itr = qr.lower_bound(GetEntry()); itr != qr.upper_bound(GetEntry()); ++itr)
{
if(itr->second==quest_id)
return true;
@@ -1000,7 +1000,7 @@ void GameObject::Use(Unit* user)
// every slot will be on that straight line
float orthogonalOrientation = GetOrientation()+M_PI*0.5f;
// find nearest slot
- for(uint32 i=0; i<info->chair.slots; ++i)
+ for (uint32 i=0; i<info->chair.slots; ++i)
{
// the distance between this slot and the center of the go - imagine a 1D space
float relativeDistance = (info->size*i)-(info->size*(info->chair.slots-1)/2.0f);
@@ -1387,7 +1387,7 @@ void GameObject::CastSpell(Unit* target, uint32 spellId)
return;
bool self = false;
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
{
if(spellInfo->EffectImplicitTargetA[i] == TARGET_UNIT_CASTER)
{
@@ -1416,7 +1416,7 @@ void GameObject::CastSpell(Unit* target, uint32 spellId)
else
{
trigger->setFaction(14);
- // Set owner guid for target if no owner avalible - needed by trigger auras
+ // Set owner guid for target if no owner avalible - needed by trigger auras
// - trigger gets despawned and there's no caster avalible (see AuraEffect::TriggerSpell())
trigger->CastSpell(target, spellInfo, true, 0, 0, target ? target->GetGUID() : 0);
}
diff --git a/src/game/GameObject.h b/src/game/GameObject.h
index 358eb0cbfb7..c0362702176 100644
--- a/src/game/GameObject.h
+++ b/src/game/GameObject.h
@@ -698,7 +698,6 @@ class TRINITY_DLL_SPEC GameObject : public WorldObject
// 0 = use `gameobject`.`spawntimesecs`
void ResetDoorOrButton();
-
void TriggeringLinkedGameObject( uint32 trapEntry, Unit* target);
bool isVisibleForInState(Player const* u, bool inVisibleList) const;
diff --git a/src/game/GossipDef.cpp b/src/game/GossipDef.cpp
index cd633f6ab8b..e6458b8fee7 100644
--- a/src/game/GossipDef.cpp
+++ b/src/game/GossipDef.cpp
@@ -238,7 +238,7 @@ void PlayerMenu::SendTalking( uint32 textID )
if (!pGossip)
{
- for(uint32 i = 0; i < 8; ++i)
+ for (uint32 i = 0; i < 8; ++i)
{
data << float(0);
data << "Greetings $N";
@@ -255,7 +255,7 @@ void PlayerMenu::SendTalking( uint32 textID )
else
{
std::string Text_0[8],Text_1[8];
- for (int i=0;i<8;++i)
+ for (int i=0; i<8; ++i)
{
Text_0[i]=pGossip->Options[i].Text_0;
Text_1[i]=pGossip->Options[i].Text_1;
@@ -266,7 +266,7 @@ void PlayerMenu::SendTalking( uint32 textID )
NpcTextLocale const *nl = objmgr.GetNpcTextLocale(textID);
if (nl)
{
- for (int i=0;i<8;++i)
+ for (int i=0; i<8; ++i)
{
if (nl->Text_0[i].size() > loc_idx && !nl->Text_0[i][loc_idx].empty())
Text_0[i]=nl->Text_0[i][loc_idx];
@@ -291,7 +291,7 @@ void PlayerMenu::SendTalking( uint32 textID )
data << pGossip->Options[i].Language;
- for(int j = 0; j < 3; ++j)
+ for (int j = 0; j < 3; ++j)
{
data << pGossip->Options[i].Emotes[j]._Delay;
data << pGossip->Options[i].Emotes[j]._Emote;
@@ -307,7 +307,7 @@ void PlayerMenu::SendTalking( char const * title, char const * text )
{
WorldPacket data( SMSG_NPC_TEXT_UPDATE, 50 ); // guess size
data << uint32(0);
- for(uint32 i = 0; i < 8; ++i)
+ for (uint32 i = 0; i < 8; ++i)
{
data << float(0);
data << title;
@@ -521,7 +521,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
Details = pQuest->GetDetails();
Objectives = pQuest->GetObjectives();
EndText = pQuest->GetEndText();
- for (int i=0;i<QUEST_OBJECTIVES_COUNT;++i)
+ for (int i=0; i<QUEST_OBJECTIVES_COUNT; ++i)
ObjectiveText[i]=pQuest->ObjectiveText[i];
int loc_idx = pSession->GetSessionDbLocaleIndex();
@@ -539,7 +539,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
if (ql->EndText.size() > loc_idx && !ql->EndText[loc_idx].empty())
EndText=ql->EndText[loc_idx];
- for (int i=0;i<QUEST_OBJECTIVES_COUNT;++i)
+ for (int i=0; i<QUEST_OBJECTIVES_COUNT; ++i)
if (ql->ObjectiveText[i].size() > loc_idx && !ql->ObjectiveText[i][loc_idx].empty())
ObjectiveText[i]=ql->ObjectiveText[i][loc_idx];
}
diff --git a/src/game/GridNotifiers.cpp b/src/game/GridNotifiers.cpp
index 11cbb741e45..cf403208389 100644
--- a/src/game/GridNotifiers.cpp
+++ b/src/game/GridNotifiers.cpp
@@ -32,7 +32,7 @@ using namespace Trinity;
void
VisibleChangesNotifier::Visit(PlayerMapType &m)
{
- for(PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
+ for (PlayerMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
{
if(iter->getSource() == &i_object)
continue;
@@ -50,7 +50,7 @@ VisibleChangesNotifier::Visit(PlayerMapType &m)
void
VisibleChangesNotifier::Visit(CreatureMapType &m)
{
- for(CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
+ for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
if(!iter->getSource()->GetSharedVisionList().empty())
for(SharedVisionList::const_iterator i = iter->getSource()->GetSharedVisionList().begin();
i != iter->getSource()->GetSharedVisionList().end(); ++i)
@@ -61,7 +61,7 @@ VisibleChangesNotifier::Visit(CreatureMapType &m)
void
VisibleChangesNotifier::Visit(DynamicObjectMapType &m)
{
- for(DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
+ for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
if(IS_PLAYER_GUID(iter->getSource()->GetCasterGUID()))
if(Player* caster = (Player*)iter->getSource()->GetCaster())
if(caster->m_seer == iter->getSource())
@@ -75,7 +75,7 @@ PlayerVisibilityNotifier::Notify()
// but exist one case when this possible and object not out of range: transports
if(Transport* transport = i_player.GetTransport())
{
- for(Transport::PlayerSet::const_iterator itr = transport->GetPassengers().begin();itr!=transport->GetPassengers().end();++itr)
+ for (Transport::PlayerSet::const_iterator itr = transport->GetPassengers().begin(); itr!=transport->GetPassengers().end(); ++itr)
{
if(i_clientGUIDs.find((*itr)->GetGUID())!=i_clientGUIDs.end())
{
@@ -88,7 +88,7 @@ PlayerVisibilityNotifier::Notify()
// generate outOfRange for not iterate objects
i_data.AddOutOfRangeGUID(i_clientGUIDs);
- for(Player::ClientGUIDs::iterator itr = i_clientGUIDs.begin();itr!=i_clientGUIDs.end();++itr)
+ for (Player::ClientGUIDs::iterator itr = i_clientGUIDs.begin(); itr!=i_clientGUIDs.end(); ++itr)
{
i_player.m_clientGUIDs.erase(*itr);
@@ -118,7 +118,7 @@ PlayerVisibilityNotifier::Notify()
// send out of range to other players if need
std::set<uint64> const& oor = i_data.GetOutOfRangeGUIDs();
- for(std::set<uint64>::const_iterator iter = oor.begin(); iter != oor.end(); ++iter)
+ for (std::set<uint64>::const_iterator iter = oor.begin(); iter != oor.end(); ++iter)
{
if(!IS_PLAYER_GUID(*iter))
continue;
@@ -132,7 +132,7 @@ PlayerVisibilityNotifier::Notify()
// Now do operations that required done at object visibility change to visible
// send data at target visibility change (adding to client)
- for(std::set<WorldObject*>::const_iterator vItr = i_visibleNow.begin(); vItr != i_visibleNow.end(); ++vItr)
+ for (std::set<WorldObject*>::const_iterator vItr = i_visibleNow.begin(); vItr != i_visibleNow.end(); ++vItr)
// target aura duration for caster show only if target exist at caster client
if((*vItr)!=&i_player && (*vItr)->isType(TYPEMASK_UNIT))
i_player.SendInitialVisiblePackets((Unit*)(*vItr));
@@ -157,7 +157,7 @@ MessageDistDeliverer::Visit(PlayerMapType &m)
if (!target->GetSharedVisionList().empty())
{
SharedVisionList::const_iterator i = target->GetSharedVisionList().begin();
- for ( ; i != target->GetSharedVisionList().end(); ++i)
+ for (; i != target->GetSharedVisionList().end(); ++i)
if((*i)->m_seer == target)
SendPacket(*i);
}
@@ -182,7 +182,7 @@ MessageDistDeliverer::Visit(CreatureMapType &m)
if (!iter->getSource()->GetSharedVisionList().empty())
{
SharedVisionList::const_iterator i = iter->getSource()->GetSharedVisionList().begin();
- for ( ; i != iter->getSource()->GetSharedVisionList().end(); ++i)
+ for (; i != iter->getSource()->GetSharedVisionList().end(); ++i)
if((*i)->m_seer == iter->getSource())
SendPacket(*i);
}
@@ -224,7 +224,7 @@ MessageDistDeliverer::VisitObject(Player* plr)
template<class T> void
ObjectUpdater::Visit(GridRefManager<T> &m)
{
- for(typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
+ for (typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
{
if(iter->getSource()->IsInWorld())
iter->getSource()->Update(i_timeDiff);
diff --git a/src/game/GridNotifiers.h b/src/game/GridNotifiers.h
index b76bbb27256..38cef3bd61a 100644
--- a/src/game/GridNotifiers.h
+++ b/src/game/GridNotifiers.h
@@ -92,7 +92,7 @@ namespace Trinity
template<class T> void updateObjects(GridRefManager<T> &m)
{
- for(typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
+ for (typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
iter->getSource()->Update(i_timeDiff);
}
@@ -241,34 +241,34 @@ namespace Trinity
void Visit(GameObjectMapType &m)
{
- for(GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if(itr->getSource()->InSamePhase(i_phaseMask))
i_do(itr->getSource());
}
void Visit(PlayerMapType &m)
{
- for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if(itr->getSource()->InSamePhase(i_phaseMask))
i_do(itr->getSource());
}
void Visit(CreatureMapType &m)
{
- for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if(itr->getSource()->InSamePhase(i_phaseMask))
i_do(itr->getSource());
}
void Visit(CorpseMapType &m)
{
- for(CorpseMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (CorpseMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if(itr->getSource()->InSamePhase(i_phaseMask))
i_do(itr->getSource());
}
void Visit(DynamicObjectMapType &m)
{
- for(DynamicObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (DynamicObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if(itr->getSource()->InSamePhase(i_phaseMask))
i_do(itr->getSource());
}
@@ -436,7 +436,7 @@ namespace Trinity
void Visit(CreatureMapType &m)
{
- for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if(itr->getSource()->InSamePhase(i_phaseMask))
i_do(itr->getSource());
}
@@ -487,7 +487,7 @@ namespace Trinity
void Visit(PlayerMapType &m)
{
- for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if(itr->getSource()->InSamePhase(i_phaseMask))
i_do(itr->getSource());
}
@@ -507,7 +507,7 @@ namespace Trinity
void Visit(PlayerMapType &m)
{
- for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if (itr->getSource()->InSamePhase(i_searcher) && itr->getSource()->IsWithinDist(i_searcher,i_dist))
i_do(itr->getSource());
}
@@ -1202,7 +1202,7 @@ namespace Trinity
~LocalizedPacketDo()
{
- for(size_t i = 0; i < i_data_cache.size(); ++i)
+ for (size_t i = 0; i < i_data_cache.size(); ++i)
delete i_data_cache[i];
}
void operator()( Player* p );
@@ -1222,8 +1222,8 @@ namespace Trinity
~LocalizedPacketListDo()
{
- for(size_t i = 0; i < i_data_cache.size(); ++i)
- for(size_t j = 0; j < i_data_cache[i].size(); ++j)
+ for (size_t i = 0; i < i_data_cache.size(); ++i)
+ for (size_t j = 0; j < i_data_cache[i].size(); ++j)
delete i_data_cache[i][j];
}
void operator()( Player* p );
diff --git a/src/game/GridNotifiersImpl.h b/src/game/GridNotifiersImpl.h
index d9e27cc8bcc..5a439b9c164 100644
--- a/src/game/GridNotifiersImpl.h
+++ b/src/game/GridNotifiersImpl.h
@@ -32,7 +32,7 @@
inline void
Trinity::ObjectUpdater::Visit(CreatureMapType &m)
{
- for(CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
+ for (CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
if(iter->getSource()->IsInWorld() && !iter->getSource()->isSpiritService())
iter->getSource()->Update(i_timeDiff);
}
@@ -63,7 +63,7 @@ template<class T>
inline void
Trinity::PlayerVisibilityNotifier::Visit(GridRefManager<T> &m)
{
- for(typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
+ for (typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
{
i_player.UpdateVisibilityOf(iter->getSource(),i_data,i_visibleNow);
i_clientGUIDs.erase(iter->getSource()->GetGUID());
@@ -74,7 +74,7 @@ template<>
inline void
Trinity::PlayerRelocationNotifier::Visit(PlayerMapType &m)
{
- for(PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
+ for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
i_clientGUIDs.erase(iter->getSource()->GetGUID());
@@ -99,7 +99,7 @@ template<>
inline void
Trinity::PlayerRelocationNotifier::Visit(CreatureMapType &m)
{
- for(CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
+ for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
i_clientGUIDs.erase(iter->getSource()->GetGUID());
@@ -116,7 +116,7 @@ template<>
inline void
Trinity::CreatureRelocationNotifier::Visit(PlayerMapType &m)
{
- for(PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
+ for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
if(iter->getSource()->m_Notified)
continue;
@@ -134,7 +134,7 @@ Trinity::CreatureRelocationNotifier::Visit(CreatureMapType &m)
if(!i_creature.isAlive())
return;
- for(CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
+ for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
if(iter->getSource()->m_Notified)
continue;
@@ -175,9 +175,8 @@ inline void Trinity::DynamicObjectUpdater::VisitHelper(Unit* target)
if(target->HasAura(i_dynobject.GetSpellId(), i_check->GetGUID()))
return;
-
uint32 eff_index = 0;
- for(; eff_index < MAX_SPELL_EFFECTS; ++eff_index)
+ for (; eff_index < MAX_SPELL_EFFECTS; ++eff_index)
if(i_dynobject.HasEffect(eff_index))
break;
@@ -221,7 +220,7 @@ template<>
inline void
Trinity::DynamicObjectUpdater::Visit(CreatureMapType &m)
{
- for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
VisitHelper(itr->getSource());
}
@@ -229,7 +228,7 @@ template<>
inline void
Trinity::DynamicObjectUpdater::Visit(PlayerMapType &m)
{
- for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
VisitHelper(itr->getSource());
}
@@ -244,7 +243,7 @@ void Trinity::WorldObjectSearcher<Check>::Visit(GameObjectMapType &m)
if(i_object)
return;
- for(GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
if(!itr->getSource()->InSamePhase(i_phaseMask))
continue;
@@ -264,7 +263,7 @@ void Trinity::WorldObjectSearcher<Check>::Visit(PlayerMapType &m)
if(i_object)
return;
- for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
if(!itr->getSource()->InSamePhase(i_phaseMask))
continue;
@@ -284,7 +283,7 @@ void Trinity::WorldObjectSearcher<Check>::Visit(CreatureMapType &m)
if(i_object)
return;
- for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
if(!itr->getSource()->InSamePhase(i_phaseMask))
continue;
@@ -304,7 +303,7 @@ void Trinity::WorldObjectSearcher<Check>::Visit(CorpseMapType &m)
if(i_object)
return;
- for(CorpseMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (CorpseMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
if(!itr->getSource()->InSamePhase(i_phaseMask))
continue;
@@ -324,7 +323,7 @@ void Trinity::WorldObjectSearcher<Check>::Visit(DynamicObjectMapType &m)
if(i_object)
return;
- for(DynamicObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (DynamicObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
if(!itr->getSource()->InSamePhase(i_phaseMask))
continue;
@@ -340,7 +339,7 @@ void Trinity::WorldObjectSearcher<Check>::Visit(DynamicObjectMapType &m)
template<class Check>
void Trinity::WorldObjectListSearcher<Check>::Visit(PlayerMapType &m)
{
- for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if(itr->getSource()->InSamePhase(i_phaseMask))
if(i_check(itr->getSource()))
i_objects.push_back(itr->getSource());
@@ -349,7 +348,7 @@ void Trinity::WorldObjectListSearcher<Check>::Visit(PlayerMapType &m)
template<class Check>
void Trinity::WorldObjectListSearcher<Check>::Visit(CreatureMapType &m)
{
- for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if(itr->getSource()->InSamePhase(i_phaseMask))
if(i_check(itr->getSource()))
i_objects.push_back(itr->getSource());
@@ -358,7 +357,7 @@ void Trinity::WorldObjectListSearcher<Check>::Visit(CreatureMapType &m)
template<class Check>
void Trinity::WorldObjectListSearcher<Check>::Visit(CorpseMapType &m)
{
- for(CorpseMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (CorpseMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if(itr->getSource()->InSamePhase(i_phaseMask))
if(i_check(itr->getSource()))
i_objects.push_back(itr->getSource());
@@ -367,7 +366,7 @@ void Trinity::WorldObjectListSearcher<Check>::Visit(CorpseMapType &m)
template<class Check>
void Trinity::WorldObjectListSearcher<Check>::Visit(GameObjectMapType &m)
{
- for(GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if(itr->getSource()->InSamePhase(i_phaseMask))
if(i_check(itr->getSource()))
i_objects.push_back(itr->getSource());
@@ -376,7 +375,7 @@ void Trinity::WorldObjectListSearcher<Check>::Visit(GameObjectMapType &m)
template<class Check>
void Trinity::WorldObjectListSearcher<Check>::Visit(DynamicObjectMapType &m)
{
- for(DynamicObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (DynamicObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if(itr->getSource()->InSamePhase(i_phaseMask))
if(i_check(itr->getSource()))
i_objects.push_back(itr->getSource());
@@ -391,7 +390,7 @@ void Trinity::GameObjectSearcher<Check>::Visit(GameObjectMapType &m)
if(i_object)
return;
- for(GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
if(!itr->getSource()->InSamePhase(i_phaseMask))
continue;
@@ -407,7 +406,7 @@ void Trinity::GameObjectSearcher<Check>::Visit(GameObjectMapType &m)
template<class Check>
void Trinity::GameObjectLastSearcher<Check>::Visit(GameObjectMapType &m)
{
- for(GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
if(!itr->getSource()->InSamePhase(i_phaseMask))
continue;
@@ -420,7 +419,7 @@ void Trinity::GameObjectLastSearcher<Check>::Visit(GameObjectMapType &m)
template<class Check>
void Trinity::GameObjectListSearcher<Check>::Visit(GameObjectMapType &m)
{
- for(GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if(itr->getSource()->InSamePhase(i_phaseMask))
if(i_check(itr->getSource()))
i_objects.push_back(itr->getSource());
@@ -435,7 +434,7 @@ void Trinity::UnitSearcher<Check>::Visit(CreatureMapType &m)
if(i_object)
return;
- for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
if(!itr->getSource()->InSamePhase(i_phaseMask))
continue;
@@ -455,7 +454,7 @@ void Trinity::UnitSearcher<Check>::Visit(PlayerMapType &m)
if(i_object)
return;
- for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
if(!itr->getSource()->InSamePhase(i_phaseMask))
continue;
@@ -471,7 +470,7 @@ void Trinity::UnitSearcher<Check>::Visit(PlayerMapType &m)
template<class Check>
void Trinity::UnitLastSearcher<Check>::Visit(CreatureMapType &m)
{
- for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
if(!itr->getSource()->InSamePhase(i_phaseMask))
continue;
@@ -484,7 +483,7 @@ void Trinity::UnitLastSearcher<Check>::Visit(CreatureMapType &m)
template<class Check>
void Trinity::UnitLastSearcher<Check>::Visit(PlayerMapType &m)
{
- for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
if(!itr->getSource()->InSamePhase(i_phaseMask))
continue;
@@ -497,7 +496,7 @@ void Trinity::UnitLastSearcher<Check>::Visit(PlayerMapType &m)
template<class Check>
void Trinity::UnitListSearcher<Check>::Visit(PlayerMapType &m)
{
- for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if(itr->getSource()->InSamePhase(i_phaseMask))
if(i_check(itr->getSource()))
i_objects.push_back(itr->getSource());
@@ -506,7 +505,7 @@ void Trinity::UnitListSearcher<Check>::Visit(PlayerMapType &m)
template<class Check>
void Trinity::UnitListSearcher<Check>::Visit(CreatureMapType &m)
{
- for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if(itr->getSource()->InSamePhase(i_phaseMask))
if(i_check(itr->getSource()))
i_objects.push_back(itr->getSource());
@@ -521,7 +520,7 @@ void Trinity::CreatureSearcher<Check>::Visit(CreatureMapType &m)
if(i_object)
return;
- for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
if(!itr->getSource()->InSamePhase(i_phaseMask))
continue;
@@ -537,7 +536,7 @@ void Trinity::CreatureSearcher<Check>::Visit(CreatureMapType &m)
template<class Check>
void Trinity::CreatureLastSearcher<Check>::Visit(CreatureMapType &m)
{
- for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
if(!itr->getSource()->InSamePhase(i_phaseMask))
continue;
@@ -550,7 +549,7 @@ void Trinity::CreatureLastSearcher<Check>::Visit(CreatureMapType &m)
template<class Check>
void Trinity::CreatureListSearcher<Check>::Visit(CreatureMapType &m)
{
- for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if(itr->getSource()->InSamePhase(i_phaseMask))
if( i_check(itr->getSource()))
i_objects.push_back(itr->getSource());
@@ -559,7 +558,7 @@ void Trinity::CreatureListSearcher<Check>::Visit(CreatureMapType &m)
template<class Check>
void Trinity::PlayerListSearcher<Check>::Visit(PlayerMapType &m)
{
- for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
if(itr->getSource()->InSamePhase(i_phaseMask))
if( i_check(itr->getSource()))
i_objects.push_back(itr->getSource());
@@ -572,7 +571,7 @@ void Trinity::PlayerSearcher<Check>::Visit(PlayerMapType &m)
if(i_object)
return;
- for(PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
+ for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
{
if(!itr->getSource()->InSamePhase(i_phaseMask))
continue;
@@ -630,7 +629,7 @@ void MaNGOS::LocalizedPacketListDo<Builder>::operator()( Player* p )
else
data_list = &i_data_cache[cache_idx];
- for(size_t i = 0; i < data_list->size(); ++i)
+ for (size_t i = 0; i < data_list->size(); ++i)
p->SendDirectMessage((*data_list)[i]);
}
diff --git a/src/game/Group.cpp b/src/game/Group.cpp
index 8a02afa25d2..c7a18d638f0 100644
--- a/src/game/Group.cpp
+++ b/src/game/Group.cpp
@@ -71,8 +71,8 @@ Group::~Group()
// it is undefined whether objectmgr (which stores the groups) or instancesavemgr
// will be unloaded first so we must be prepared for both cases
// this may unload some instance saves
- for(uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i)
- for(BoundInstancesMap::iterator itr2 = m_boundInstances[i].begin(); itr2 != m_boundInstances[i].end(); ++itr2)
+ for (uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i)
+ for (BoundInstancesMap::iterator itr2 = m_boundInstances[i].begin(); itr2 != m_boundInstances[i].end(); ++itr2)
itr2->second.save->RemoveGroup(this);
// Sub group counters clean up
@@ -156,7 +156,7 @@ bool Group::LoadGroupFromDB(const uint64 &leaderGuid, QueryResult *result, bool
m_looterGuid = MAKE_NEW_GUID((*result)[3].GetUInt32(), 0, HIGHGUID_PLAYER);
m_lootThreshold = (ItemQualities)(*result)[4].GetUInt16();
- for(int i=0; i<TARGETICONCOUNT; ++i)
+ for (int i=0; i<TARGETICONCOUNT; ++i)
m_targetIcons[i] = (*result)[5+i].GetUInt64();
if(!external) delete result;
@@ -208,7 +208,7 @@ void Group::ConvertToRaid()
SendUpdate();
// update quest related GO states (quest activity dependent from raid membership)
- for(member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
+ for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
if(Player* player = objmgr.GetPlayer(citr->guid))
player->UpdateForQuestWorldObjects();
}
@@ -252,7 +252,7 @@ uint32 Group::RemoveInvite(Player *player)
void Group::RemoveAllInvites()
{
- for(InvitesList::iterator itr=m_invitees.begin(); itr!=m_invitees.end(); ++itr)
+ for (InvitesList::iterator itr=m_invitees.begin(); itr!=m_invitees.end(); ++itr)
(*itr)->SetGroupInvite(NULL);
m_invitees.clear();
@@ -260,7 +260,7 @@ void Group::RemoveAllInvites()
Player* Group::GetInvited(const uint64& guid) const
{
- for(InvitesList::const_iterator itr = m_invitees.begin(); itr != m_invitees.end(); ++itr)
+ for (InvitesList::const_iterator itr = m_invitees.begin(); itr != m_invitees.end(); ++itr)
{
if((*itr)->GetGUID() == guid)
return (*itr);
@@ -270,7 +270,7 @@ Player* Group::GetInvited(const uint64& guid) const
Player* Group::GetInvited(const std::string& name) const
{
- for(InvitesList::const_iterator itr = m_invitees.begin(); itr != m_invitees.end(); ++itr)
+ for (InvitesList::const_iterator itr = m_invitees.begin(); itr != m_invitees.end(); ++itr)
{
if((*itr)->GetName() == name)
return (*itr);
@@ -383,7 +383,7 @@ void Group::Disband(bool hideDestroy)
{
Player *player;
- for(member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
+ for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
{
player = objmgr.GetPlayer(citr->guid);
if(!player)
@@ -486,7 +486,7 @@ void Group::SendLootRoll(const uint64& SourceGuid, const uint64& TargetGuid, uin
data << uint8(RollType); // 0: "Need for: [item name]" 0: "You have selected need for [item name] 1: need roll 2: greed roll
data << uint8(0); // 2.4.0
- for( Roll::PlayerVote::const_iterator itr=r.playerVote.begin(); itr!=r.playerVote.end(); ++itr)
+ for (Roll::PlayerVote::const_iterator itr=r.playerVote.begin(); itr!=r.playerVote.end(); ++itr)
{
Player *p = objmgr.GetPlayer(itr->first);
if(!p || !p->GetSession())
@@ -509,7 +509,7 @@ void Group::SendLootRollWon(const uint64& SourceGuid, const uint64& TargetGuid,
data << uint8(RollNumber); // rollnumber realted to SMSG_LOOT_ROLL
data << uint8(RollType); // Rolltype related to SMSG_LOOT_ROLL
- for( Roll::PlayerVote::const_iterator itr=r.playerVote.begin(); itr!=r.playerVote.end(); ++itr)
+ for (Roll::PlayerVote::const_iterator itr=r.playerVote.begin(); itr!=r.playerVote.end(); ++itr)
{
Player *p = objmgr.GetPlayer(itr->first);
if(!p || !p->GetSession())
@@ -529,7 +529,7 @@ void Group::SendLootAllPassed(uint32 NumberOfPlayers, const Roll &r)
data << uint32(r.itemRandomPropId); // Item random property ID
data << uint32(r.itemRandomSuffix); // Item random suffix ID
- for( Roll::PlayerVote::const_iterator itr=r.playerVote.begin(); itr!=r.playerVote.end(); ++itr)
+ for (Roll::PlayerVote::const_iterator itr=r.playerVote.begin(); itr!=r.playerVote.end(); ++itr)
{
Player *p = objmgr.GetPlayer(itr->first);
if(!p || !p->GetSession())
@@ -564,7 +564,7 @@ void Group::GroupLoot(const uint64& playerGUID, Loot *loot, Creature *creature)
Roll* r=new Roll(newitemGUID,*i);
//a vector is filled with only near party members
- for(GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *member = itr->getSource();
if(!member || !member->GetSession())
@@ -603,7 +603,7 @@ void Group::NeedBeforeGreed(const uint64& playerGUID, Loot *loot, Creature *crea
Group *group = player->GetGroup();
uint8 itemSlot = 0;
- for(std::vector<LootItem>::iterator i=loot->items.begin(); i != loot->items.end(); ++i, ++itemSlot)
+ for (std::vector<LootItem>::iterator i=loot->items.begin(); i != loot->items.end(); ++i, ++itemSlot)
{
item = objmgr.GetItemPrototype(i->itemid);
@@ -613,7 +613,7 @@ void Group::NeedBeforeGreed(const uint64& playerGUID, Loot *loot, Creature *crea
uint64 newitemGUID = MAKE_NEW_GUID(objmgr.GenerateLowGuid(HIGHGUID_ITEM),0,HIGHGUID_ITEM);
Roll* r=new Roll(newitemGUID,*i);
- for(GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *playerToRoll = itr->getSource();
if(!playerToRoll || !playerToRoll->GetSession())
@@ -663,7 +663,7 @@ void Group::MasterLoot(const uint64& playerGUID, Loot* /*loot*/, Creature *creat
WorldPacket data(SMSG_LOOT_MASTER_LIST, 330);
data << (uint8)GetMembersCount();
- for(GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *looter = itr->getSource();
if (!looter->IsInWorld())
@@ -678,7 +678,7 @@ void Group::MasterLoot(const uint64& playerGUID, Loot* /*loot*/, Creature *creat
data.put<uint8>(0,real_count);
- for(GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *looter = itr->getSource();
if (looter->IsWithinDist(creature,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE),false))
@@ -762,7 +762,7 @@ void Group::CountTheRoll(Rolls::iterator rollI, uint32 NumberOfPlayers)
uint64 maxguid = (*roll->playerVote.begin()).first;
Player *player;
- for( Roll::PlayerVote::const_iterator itr=roll->playerVote.begin(); itr!=roll->playerVote.end(); ++itr)
+ for (Roll::PlayerVote::const_iterator itr=roll->playerVote.begin(); itr!=roll->playerVote.end(); ++itr)
{
if (itr->second != NEED)
continue;
@@ -864,7 +864,7 @@ void Group::SetTargetIcon(uint8 id, uint64 guid)
// clean other icons
if( guid != 0 )
- for(int i=0; i<TARGETICONCOUNT; ++i)
+ for (int i=0; i<TARGETICONCOUNT; ++i)
if( m_targetIcons[i] == guid )
SetTargetIcon(i, 0);
@@ -879,7 +879,7 @@ void Group::SetTargetIcon(uint8 id, uint64 guid)
void Group::GetDataForXPAtKill(Unit const* victim, uint32& count,uint32& sum_level, Player* & member_with_max_level, Player* & not_gray_member_with_max_level)
{
- for(GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* member = itr->getSource();
if(!member || !member->isAlive()) // only for alive
@@ -908,7 +908,7 @@ void Group::SendTargetIconList(WorldSession *session)
WorldPacket data(MSG_RAID_TARGET_UPDATE, (1+TARGETICONCOUNT*9));
data << (uint8)1;
- for(int i=0; i<TARGETICONCOUNT; ++i)
+ for (int i=0; i<TARGETICONCOUNT; ++i)
{
if(m_targetIcons[i] == 0)
continue;
@@ -924,7 +924,7 @@ void Group::SendUpdate()
{
Player *player;
- for(member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
+ for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
{
player = objmgr.GetPlayer(citr->guid);
if(!player || !player->GetSession() || player->GetGroup() != this )
@@ -937,7 +937,7 @@ void Group::SendUpdate()
data << (uint8)(citr->assistant?0x01:0); // 0x2 main assist, 0x4 main tank
data << uint64(0x50000000FFFFFFFELL); // related to voice chat?
data << uint32(GetMembersCount()-1);
- for(member_citerator citr2 = m_memberSlots.begin(); citr2 != m_memberSlots.end(); ++citr2)
+ for (member_citerator citr2 = m_memberSlots.begin(); citr2 != m_memberSlots.end(); ++citr2)
{
if(citr->guid == citr2->guid)
continue;
@@ -974,7 +974,7 @@ void Group::UpdatePlayerOutOfRange(Player* pPlayer)
WorldPacket data;
pPlayer->GetSession()->BuildPartyMemberStatsChangedPacket(pPlayer, &data);
- for(GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
player = itr->getSource();
if (player && player != pPlayer && !pPlayer->isVisibleFor(player))
@@ -984,7 +984,7 @@ void Group::UpdatePlayerOutOfRange(Player* pPlayer)
void Group::BroadcastPacket(WorldPacket *packet, bool ignorePlayersInBGRaid, int group, uint64 ignore)
{
- for(GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *pl = itr->getSource();
if(!pl || (ignore != 0 && pl->GetGUID() == ignore) || (ignorePlayersInBGRaid && pl->GetGroup() != this) )
@@ -997,7 +997,7 @@ void Group::BroadcastPacket(WorldPacket *packet, bool ignorePlayersInBGRaid, int
void Group::BroadcastReadyCheck(WorldPacket *packet)
{
- for(GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *pl = itr->getSource();
if(pl && pl->GetSession())
@@ -1008,7 +1008,7 @@ void Group::BroadcastReadyCheck(WorldPacket *packet)
void Group::OfflineReadyCheck()
{
- for(member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
+ for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
{
Player *pl = objmgr.GetPlayer(citr->guid);
if (!pl || !pl->GetSession())
@@ -1083,7 +1083,7 @@ bool Group::_addMember(const uint64 &guid, const char* name, bool isAssistant, u
if(!isRaidGroup()) // reset targetIcons for non-raid-groups
{
- for(int i=0; i<TARGETICONCOUNT; ++i)
+ for (int i=0; i<TARGETICONCOUNT; ++i)
m_targetIcons[i] = 0;
}
@@ -1162,9 +1162,9 @@ void Group::_setLeader(const uint64 &guid)
Player *player = objmgr.GetPlayer(slot->guid);
if(player)
{
- for(uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i)
+ for (uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i)
{
- for(BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end();)
+ for (BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end(); )
{
if(itr->second.perm)
{
@@ -1347,7 +1347,7 @@ void Group::UpdateLooterGuid( Creature* creature, bool ifneed )
// search next after current
if(guid_itr != m_memberSlots.end())
{
- for(member_citerator itr = guid_itr; itr != m_memberSlots.end(); ++itr)
+ for (member_citerator itr = guid_itr; itr != m_memberSlots.end(); ++itr)
{
if(Player* pl = ObjectAccessor::FindPlayer(itr->guid))
{
@@ -1368,7 +1368,7 @@ void Group::UpdateLooterGuid( Creature* creature, bool ifneed )
}
// search from start
- for(member_citerator itr = m_memberSlots.begin(); itr != guid_itr; ++itr)
+ for (member_citerator itr = m_memberSlots.begin(); itr != guid_itr; ++itr)
{
if(Player* pl = ObjectAccessor::FindPlayer(itr->guid))
{
@@ -1411,7 +1411,7 @@ uint32 Group::CanJoinBattleGroundQueue(BattleGroundTypeId bgTypeId, BattleGround
uint32 team = reference->GetTeam();
// check every member of the group to be able to join
- for(GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *member = itr->getSource();
// offline member? don't let join
@@ -1454,7 +1454,7 @@ void Group::SetDifficulty(uint8 difficulty)
m_difficulty = difficulty;
if(!isBGGroup()) CharacterDatabase.PExecute("UPDATE groups SET difficulty = %u WHERE leaderGuid ='%u'", m_difficulty, GUID_LOPART(m_leaderGuid));
- for(GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *player = itr->getSource();
if(!player->GetSession() || player->getLevel() < LEVELREQUIREMENT_HEROIC)
@@ -1466,11 +1466,11 @@ void Group::SetDifficulty(uint8 difficulty)
bool Group::InCombatToInstance(uint32 instanceId)
{
- for(GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *pPlayer = itr->getSource();
if(pPlayer && pPlayer->getAttackers().size() && pPlayer->GetInstanceId() == instanceId && (pPlayer->GetMap()->IsRaid() || pPlayer->GetMap()->IsHeroic()))
- for(std::set<Unit*>::const_iterator i = pPlayer->getAttackers().begin(); i!=pPlayer->getAttackers().end(); ++i)
+ for (std::set<Unit*>::const_iterator i = pPlayer->getAttackers().begin(); i!=pPlayer->getAttackers().end(); ++i)
if((*i) && (*i)->GetTypeId() == TYPEID_UNIT && ((Creature*)(*i))->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_INSTANCE_BIND)
return true;
}
@@ -1487,7 +1487,7 @@ void Group::ResetInstances(uint8 method, Player* SendMsgTo)
// we assume that when the difficulty changes, all instances that can be reset will be
uint8 dif = GetDifficulty();
- for(BoundInstancesMap::iterator itr = m_boundInstances[dif].begin(); itr != m_boundInstances[dif].end();)
+ for (BoundInstancesMap::iterator itr = m_boundInstances[dif].begin(); itr != m_boundInstances[dif].end(); )
{
InstanceSave *p = itr->second.save;
const MapEntry *entry = sMapStore.LookupEntry(itr->first);
@@ -1611,7 +1611,7 @@ void Group::BroadcastGroupUpdate(void)
{
// FG: HACK: force flags update on group leave - for values update hack
// -- not very efficient but safe
- for(member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
+ for (member_citerator citr = m_memberSlots.begin(); citr != m_memberSlots.end(); ++citr)
{
Player *pp = objmgr.GetPlayer(citr->guid);
diff --git a/src/game/Group.h b/src/game/Group.h
index d09ef616897..e38d39ecd7b 100644
--- a/src/game/Group.h
+++ b/src/game/Group.h
@@ -189,7 +189,7 @@ class TRINITY_DLL_SPEC Group
bool IsLeader(const uint64& guid) const { return (GetLeaderGUID() == guid); }
uint64 GetMemberGUID(const std::string& name)
{
- for(member_citerator itr = m_memberSlots.begin(); itr != m_memberSlots.end(); ++itr)
+ for (member_citerator itr = m_memberSlots.begin(); itr != m_memberSlots.end(); ++itr)
{
if(itr->name == name)
{
@@ -364,7 +364,7 @@ class TRINITY_DLL_SPEC Group
member_citerator _getMemberCSlot(uint64 Guid) const
{
- for(member_citerator itr = m_memberSlots.begin(); itr != m_memberSlots.end(); ++itr)
+ for (member_citerator itr = m_memberSlots.begin(); itr != m_memberSlots.end(); ++itr)
{
if (itr->guid == Guid)
return itr;
@@ -374,7 +374,7 @@ class TRINITY_DLL_SPEC Group
member_witerator _getMemberWSlot(uint64 Guid)
{
- for(member_witerator itr = m_memberSlots.begin(); itr != m_memberSlots.end(); ++itr)
+ for (member_witerator itr = m_memberSlots.begin(); itr != m_memberSlots.end(); ++itr)
{
if (itr->guid == Guid)
return itr;
diff --git a/src/game/GroupHandler.cpp b/src/game/GroupHandler.cpp
index 2746c6c7772..fab192bbedc 100644
--- a/src/game/GroupHandler.cpp
+++ b/src/game/GroupHandler.cpp
@@ -702,7 +702,7 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player *player, WorldPacke
{
const uint64& auramask = player->GetAuraUpdateMaskForRaid();
*data << uint64(auramask);
- for(uint32 i = 0; i < MAX_AURAS; ++i)
+ for (uint32 i = 0; i < MAX_AURAS; ++i)
{
if(auramask & (uint64(1) << i))
{
@@ -784,7 +784,7 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player *player, WorldPacke
{
const uint64& auramask = pet->GetAuraUpdateMaskForRaid();
*data << uint64(auramask);
- for(uint32 i = 0; i < MAX_AURAS; ++i)
+ for (uint32 i = 0; i < MAX_AURAS; ++i)
{
if(auramask & (uint64(1) << i))
{
@@ -844,7 +844,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode( WorldPacket &recv_data )
uint64 auramask = 0;
size_t maskPos = data.wpos();
data << (uint64) auramask; // placeholder
- for(uint8 i = 0; i < MAX_AURAS; ++i)
+ for (uint8 i = 0; i < MAX_AURAS; ++i)
{
if(Aura * pAura = player->GetVisibleAura(i))
{
@@ -870,7 +870,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode( WorldPacket &recv_data )
uint64 petauramask = 0;
size_t petMaskPos = data.wpos();
data << (uint64) petauramask; // placeholder
- for(uint8 i = 0; i < MAX_AURAS; ++i)
+ for (uint8 i = 0; i < MAX_AURAS; ++i)
{
if(Aura * pAura = pet->GetVisibleAura(i))
{
diff --git a/src/game/GuardAI.cpp b/src/game/GuardAI.cpp
index a821939910a..4a3a6c991b0 100644
--- a/src/game/GuardAI.cpp
+++ b/src/game/GuardAI.cpp
@@ -136,4 +136,3 @@ void GuardAI::JustDied(Unit *killer)
m_creature->SendZoneUnderAttackMessage(pkiller);
}
-
diff --git a/src/game/Guild.cpp b/src/game/Guild.cpp
index 92faebccad5..99f79b1738d 100644
--- a/src/game/Guild.cpp
+++ b/src/game/Guild.cpp
@@ -344,7 +344,7 @@ bool Guild::LoadRanksFromDB(uint32 GuildId)
sLog.outError("Guild %u has broken `guild_rank` data, repairing...",GuildId);
CharacterDatabase.BeginTransaction();
CharacterDatabase.PExecute("DELETE FROM guild_rank WHERE guildid='%u'", GuildId);
- for(size_t i = 0; i < m_Ranks.size(); ++i)
+ for (size_t i = 0; i < m_Ranks.size(); ++i)
{
std::string name = m_Ranks[i].Name;
uint32 rights = m_Ranks[i].Rights;
@@ -1698,7 +1698,7 @@ void Guild::AppendDisplayGuildBankSlot( WorldPacket& data, GuildBankTab const *t
data << (uint32) pItem->GetItemRandomPropertyId(); // random item property id +8
if (pItem->GetItemRandomPropertyId())
data << (uint32) pItem->GetItemSuffixFactor(); // SuffixFactor +4
-
+
data << uint32(pItem->GetCount()); // +12 // ITEM_FIELD_STACK_COUNT
data << uint32(0); // +16 // Unknown value
data << uint8(abs(pItem->GetSpellCharges())); // spell charges
@@ -1720,7 +1720,7 @@ Item* Guild::StoreItem(uint8 tabId, GuildItemPosCountVec const& dest, Item* pIte
Item* lastItem = pItem;
- for(GuildItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end(); )
+ for (GuildItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end(); )
{
uint8 slot = itr->Slot;
uint32 count = itr->Count;
@@ -1838,7 +1838,7 @@ uint8 Guild::_CanStoreItem_InSpecificSlot( uint8 tab, uint8 slot, GuildItemPosCo
uint8 Guild::_CanStoreItem_InTab( uint8 tab, GuildItemPosCountVec &dest, uint32& count, bool merge, Item* pSrcItem, uint8 skip_slot ) const
{
- for(uint32 j = 0; j < GUILD_BANK_MAX_SLOTS; j++)
+ for (uint32 j = 0; j < GUILD_BANK_MAX_SLOTS; j++)
{
// skip specific slot already processed in first called _CanStoreItem_InSpecificSlot
if (j == skip_slot)
@@ -2095,7 +2095,6 @@ void Guild::SwapItems(Player * pl, uint8 BankTab, uint8 BankTabSlot, uint8 BankT
DisplayGuildBankContentUpdate(BankTabDst,BankTabSlotDst);
}
-
void Guild::MoveFromBankToChar( Player * pl, uint8 BankTab, uint8 BankTabSlot, uint8 PlayerBag, uint8 PlayerSlot, uint32 SplitedAmount)
{
Item *pItemBank = GetItem(BankTab, BankTabSlot);
@@ -2243,7 +2242,6 @@ void Guild::MoveFromBankToChar( Player * pl, uint8 BankTab, uint8 BankTabSlot, u
DisplayGuildBankContentUpdate(BankTab,BankTabSlot);
}
-
void Guild::MoveFromCharToBank( Player * pl, uint8 PlayerBag, uint8 PlayerSlot, uint8 BankTab, uint8 BankTabSlot, uint32 SplitedAmount )
{
Item *pItemBank = GetItem(BankTab, BankTabSlot);
diff --git a/src/game/Guild.h b/src/game/Guild.h
index 8df8d01d264..f3626942bfc 100644
--- a/src/game/Guild.h
+++ b/src/game/Guild.h
@@ -268,7 +268,7 @@ struct RankInfo
{
RankInfo(const std::string& _name, uint32 _rights, uint32 _money) : Name(_name), Rights(_rights), BankMoneyPerDay(_money)
{
- for(uint8 i = 0; i < GUILD_BANK_MAX_TABS; ++i)
+ for (uint8 i = 0; i < GUILD_BANK_MAX_TABS; ++i)
{
TabRight[i] = 0;
TabSlotPerDay[i] = 0;
@@ -301,12 +301,10 @@ class Guild
std::string const& GetMOTD() const { return MOTD; }
std::string const& GetGINFO() const { return GINFO; }
-
uint32 GetCreatedYear() const { return m_CreatedYear; }
uint32 GetCreatedMonth() const { return m_CreatedMonth; }
uint32 GetCreatedDay() const { return m_CreatedDay; }
-
uint32 GetEmblemStyle() const { return m_EmblemStyle; }
uint32 GetEmblemColor() const { return m_EmblemColor; }
uint32 GetBorderStyle() const { return m_BorderStyle; }
@@ -342,7 +340,7 @@ class Guild
template<class Do>
void BroadcastWorker(Do& _do, Player* except = NULL)
{
- for(MemberList::iterator itr = members.begin(); itr != members.end(); ++itr)
+ for (MemberList::iterator itr = members.begin(); itr != members.end(); ++itr)
if(Player *player = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(itr->first, 0, HIGHGUID_PLAYER)))
if(player != except)
_do(player);
@@ -367,7 +365,7 @@ class Guild
}
MemberSlot* GetMemberSlot(const std::string& name, uint64& guid)
{
- for(MemberList::iterator itr = members.begin(); itr != members.end(); ++itr)
+ for (MemberList::iterator itr = members.begin(); itr != members.end(); ++itr)
{
if(itr->second.Name == name)
{
diff --git a/src/game/GuildHandler.cpp b/src/game/GuildHandler.cpp
index c11ad11766b..3f5e7fb7cb7 100644
--- a/src/game/GuildHandler.cpp
+++ b/src/game/GuildHandler.cpp
@@ -324,7 +324,7 @@ void WorldSession::HandleGuildPromoteOpcode(WorldPacket& recvPacket)
data << plName;
data << guild->GetRankName(newRankId);
guild->BroadcastPacket(&data);
-
+
guild->ChangeRank(plGuid, newRankId);
// Put record into guildlog
guild->LogGuildEvent(GUILD_EVENT_LOG_PROMOTE_PLAYER, GetPlayer()->GetGUIDLow(), GUID_LOPART(plGuid), newRankId);
@@ -893,7 +893,7 @@ void WorldSession::HandleGuildPermissions( WorldPacket& /* recv_data */ )
data << uint32(pGuild->GetMemberMoneyWithdrawRem(GetPlayer()->GetGUIDLow()));
data << uint8(pGuild->GetPurchasedTabs()); // tabs count
// why sending all info when not all tabs are purchased???
- for(int i = 0; i < GUILD_BANK_MAX_TABS; ++i)
+ for (int i = 0; i < GUILD_BANK_MAX_TABS; ++i)
{
data << uint32(pGuild->GetBankRights(rankId, uint8(i)));
data << uint32(pGuild->GetMemberSlotWithdrawRem(GetPlayer()->GetGUIDLow(), uint8(i)));
diff --git a/src/game/HomeMovementGenerator.h b/src/game/HomeMovementGenerator.h
index 964b5c3e801..00e92ac9e76 100644
--- a/src/game/HomeMovementGenerator.h
+++ b/src/game/HomeMovementGenerator.h
@@ -47,7 +47,7 @@ class TRINITY_DLL_SPEC HomeMovementGenerator<Creature>
MovementGeneratorType GetMovementGeneratorType() { return HOME_MOTION_TYPE; }
bool GetDestination(float& x, float& y, float& z) const { i_destinationHolder.GetDestination(x,y,z); return true; }
-
+
private:
void _setTargetLocation(Creature &);
DestinationHolder< Traveller<Creature> > i_destinationHolder;
diff --git a/src/game/IdleMovementGenerator.cpp b/src/game/IdleMovementGenerator.cpp
index 7c68e3c09f5..9d6d4252352 100644
--- a/src/game/IdleMovementGenerator.cpp
+++ b/src/game/IdleMovementGenerator.cpp
@@ -49,7 +49,7 @@ void RotateMovementGenerator::Initialize(Unit& owner)
owner.addUnitState(UNIT_STAT_ROTATING);
- owner.AttackStop();
+ owner.AttackStop();
}
bool RotateMovementGenerator::Update(Unit& owner, const uint32& diff)
diff --git a/src/game/InstanceData.cpp b/src/game/InstanceData.cpp
index 1398038d724..b798c884312 100644
--- a/src/game/InstanceData.cpp
+++ b/src/game/InstanceData.cpp
@@ -47,7 +47,7 @@ void InstanceData::HandleGameObject(uint64 GUID, bool open, GameObject *go)
bool InstanceData::IsEncounterInProgress() const
{
- for(std::vector<BossInfo>::const_iterator itr = bosses.begin(); itr != bosses.end(); ++itr)
+ for (std::vector<BossInfo>::const_iterator itr = bosses.begin(); itr != bosses.end(); ++itr)
if(itr->state == IN_PROGRESS)
return true;
@@ -105,7 +105,7 @@ void InstanceData::UpdateDoorState(GameObject *door)
return;
bool open = true;
- for(DoorInfoMap::iterator itr = lower; itr != upper; ++itr)
+ for (DoorInfoMap::iterator itr = lower; itr != upper; ++itr)
{
if(itr->second.type == DOOR_TYPE_ROOM)
{
@@ -136,7 +136,7 @@ void InstanceData::AddDoor(GameObject *door, bool add)
if(lower == upper)
return;
- for(DoorInfoMap::iterator itr = lower; itr != upper; ++itr)
+ for (DoorInfoMap::iterator itr = lower; itr != upper; ++itr)
{
if(add)
{
@@ -201,19 +201,19 @@ bool InstanceData::SetBossState(uint32 id, EncounterState state)
return false;
if(state == DONE)
- for(MinionSet::iterator i = bossInfo->minion.begin(); i != bossInfo->minion.end(); ++i)
+ for (MinionSet::iterator i = bossInfo->minion.begin(); i != bossInfo->minion.end(); ++i)
if((*i)->isWorldBoss() && (*i)->isAlive())
return false;
bossInfo->state = state;
SaveToDB();
}
-
- for(uint32 type = 0; type < MAX_DOOR_TYPES; ++type)
- for(DoorSet::iterator i = bossInfo->door[type].begin(); i != bossInfo->door[type].end(); ++i)
+
+ for (uint32 type = 0; type < MAX_DOOR_TYPES; ++type)
+ for (DoorSet::iterator i = bossInfo->door[type].begin(); i != bossInfo->door[type].end(); ++i)
UpdateDoorState(*i);
- for(MinionSet::iterator i = bossInfo->minion.begin(); i != bossInfo->minion.end(); ++i)
+ for (MinionSet::iterator i = bossInfo->minion.begin(); i != bossInfo->minion.end(); ++i)
UpdateMinionState(*i, state);
return true;
@@ -227,7 +227,7 @@ std::string InstanceData::LoadBossState(const char * data)
std::istringstream loadStream(data);
uint32 buff;
uint32 bossId = 0;
- for(std::vector<BossInfo>::iterator i = bosses.begin(); i != bosses.end(); ++i, ++bossId)
+ for (std::vector<BossInfo>::iterator i = bosses.begin(); i != bosses.end(); ++i, ++bossId)
{
loadStream >> buff;
if(buff < TO_BE_DECIDED)
@@ -239,10 +239,10 @@ std::string InstanceData::LoadBossState(const char * data)
std::string InstanceData::GetBossSaveData()
{
std::ostringstream saveStream;
- for(std::vector<BossInfo>::iterator i = bosses.begin(); i != bosses.end(); ++i)
+ for (std::vector<BossInfo>::iterator i = bosses.begin(); i != bosses.end(); ++i)
saveStream << (uint32)i->state << " ";
return saveStream.str();
-}
+}
void InstanceData::DoUseDoorOrButton(uint64 uiGuid, uint32 uiWithRestoreTime, bool bUseAlternativeState)
{
@@ -287,7 +287,7 @@ void InstanceData::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData)
if (!lPlayers.isEmpty())
{
- for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr)
{
if (Player* pPlayer = itr->getSource())
pPlayer->SendUpdateWorldState(uiStateId, uiStateData);
diff --git a/src/game/InstanceSaveMgr.cpp b/src/game/InstanceSaveMgr.cpp
index 90714356fc1..667cd289c77 100644
--- a/src/game/InstanceSaveMgr.cpp
+++ b/src/game/InstanceSaveMgr.cpp
@@ -57,13 +57,13 @@ InstanceSaveManager::~InstanceSaveManager()
for (InstanceSaveHashMap::iterator itr = m_instanceSaveById.begin(); itr != m_instanceSaveById.end(); ++itr)
{
InstanceSave *save = itr->second;
- for(InstanceSave::PlayerListType::iterator itr2 = save->m_playerList.begin(), next = itr2; itr2 != save->m_playerList.end(); itr2 = next)
+ for (InstanceSave::PlayerListType::iterator itr2 = save->m_playerList.begin(), next = itr2; itr2 != save->m_playerList.end(); itr2 = next)
{
++next;
(*itr2)->UnbindInstance(save->GetMapId(), save->GetDifficulty(), true);
}
save->m_playerList.clear();
- for(InstanceSave::GroupListType::iterator itr2 = save->m_groupList.begin(), next = itr2; itr2 != save->m_groupList.end(); itr2 = next)
+ for (InstanceSave::GroupListType::iterator itr2 = save->m_groupList.begin(), next = itr2; itr2 != save->m_groupList.end(); itr2 = next)
{
++next;
(*itr2)->UnbindInstance(save->GetMapId(), save->GetDifficulty(), true);
@@ -233,7 +233,7 @@ void InstanceSaveManager::_DelHelper(DatabaseType &db, const char *fields, const
{
Field *fields = result->Fetch();
std::ostringstream ss;
- for(size_t i = 0; i < fieldTokens.size(); i++)
+ for (size_t i = 0; i < fieldTokens.size(); i++)
{
std::string fieldValue = fields[i].GetCppString();
db.escape_string(fieldValue);
@@ -440,7 +440,7 @@ void InstanceSaveManager::LoadResetTimes()
}
// schedule the reset times
- for(ResetTimeMapType::iterator itr = InstResetTime.begin(); itr != InstResetTime.end(); ++itr)
+ for (ResetTimeMapType::iterator itr = InstResetTime.begin(); itr != InstResetTime.end(); ++itr)
if(itr->second.second > now)
ScheduleReset(true, itr->second.second, InstResetEvent(0, itr->second.first, itr->first));
}
@@ -479,7 +479,7 @@ void InstanceSaveManager::LoadResetTimes()
// calculate new global reset times for expired instances and those that have never been reset yet
// add the global reset times to the priority queue
- for(uint32 i = 0; i < sInstanceTemplate.MaxEntry; i++)
+ for (uint32 i = 0; i < sInstanceTemplate.MaxEntry; i++)
{
InstanceTemplate const* temp = objmgr.GetInstanceTemplate(i);
if(!temp) continue;
@@ -512,7 +512,7 @@ void InstanceSaveManager::LoadResetTimes()
// schedule the global reset/warning
uint8 type = 1;
static int tim[4] = {3600, 900, 300, 60};
- for(; type < 4; type++)
+ for (; type < 4; type++)
if(t - tim[type-1] > now) break;
ScheduleReset(true, t - tim[type-1], InstResetEvent(type, i));
}
@@ -527,12 +527,12 @@ void InstanceSaveManager::ScheduleReset(bool add, time_t time, InstResetEvent ev
ResetTimeQueue::iterator itr;
std::pair<ResetTimeQueue::iterator, ResetTimeQueue::iterator> range;
range = m_resetTimeQueue.equal_range(time);
- for(itr = range.first; itr != range.second; ++itr)
+ for (itr = range.first; itr != range.second; ++itr)
if(itr->second == event) { m_resetTimeQueue.erase(itr); return; }
// in case the reset time changed (should happen very rarely), we search the whole queue
if(itr == range.second)
{
- for(itr = m_resetTimeQueue.begin(); itr != m_resetTimeQueue.end(); ++itr)
+ for (itr = m_resetTimeQueue.begin(); itr != m_resetTimeQueue.end(); ++itr)
if(itr->second == event) { m_resetTimeQueue.erase(itr); return; }
if(itr == m_resetTimeQueue.end())
sLog.outError("InstanceSaveManager::ScheduleReset: cannot cancel the reset, the event(%d,%d,%d) was not found!", event.type, event.mapid, event.instanceId);
@@ -627,7 +627,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, bool warn, uint32 timeLe
}
// remove all binds to instances of the given map
- for(InstanceSaveHashMap::iterator itr = m_instanceSaveById.begin(); itr != m_instanceSaveById.end();)
+ for (InstanceSaveHashMap::iterator itr = m_instanceSaveById.begin(); itr != m_instanceSaveById.end(); )
{
if(itr->second->GetMapId() == mapid)
_ResetSave(itr);
@@ -656,7 +656,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, bool warn, uint32 timeLe
MapInstanced::InstancedMaps &instMaps = ((MapInstanced*)map)->GetInstancedMaps();
MapInstanced::InstancedMaps::iterator mitr;
- for(mitr = instMaps.begin(); mitr != instMaps.end(); ++mitr)
+ for (mitr = instMaps.begin(); mitr != instMaps.end(); ++mitr)
{
Map *map2 = mitr->second;
if(!map2->IsDungeon()) continue;
@@ -670,7 +670,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, bool warn, uint32 timeLe
uint32 InstanceSaveManager::GetNumBoundPlayersTotal()
{
uint32 ret = 0;
- for(InstanceSaveHashMap::iterator itr = m_instanceSaveById.begin(); itr != m_instanceSaveById.end(); ++itr)
+ for (InstanceSaveHashMap::iterator itr = m_instanceSaveById.begin(); itr != m_instanceSaveById.end(); ++itr)
ret += itr->second->GetPlayerCount();
return ret;
}
@@ -678,7 +678,7 @@ uint32 InstanceSaveManager::GetNumBoundPlayersTotal()
uint32 InstanceSaveManager::GetNumBoundGroupsTotal()
{
uint32 ret = 0;
- for(InstanceSaveHashMap::iterator itr = m_instanceSaveById.begin(); itr != m_instanceSaveById.end(); ++itr)
+ for (InstanceSaveHashMap::iterator itr = m_instanceSaveById.begin(); itr != m_instanceSaveById.end(); ++itr)
ret += itr->second->GetGroupCount();
return ret;
}
diff --git a/src/game/Item.cpp b/src/game/Item.cpp
index 2d39b016623..137d90acafd 100644
--- a/src/game/Item.cpp
+++ b/src/game/Item.cpp
@@ -45,7 +45,7 @@ void AddItemsSetItem(Player*player,Item *item)
ItemSetEffect *eff = NULL;
- for(size_t x = 0; x < player->ItemSetEff.size(); ++x)
+ for (size_t x = 0; x < player->ItemSetEff.size(); ++x)
{
if(player->ItemSetEff[x] && player->ItemSetEff[x]->setid == setid)
{
@@ -61,7 +61,7 @@ void AddItemsSetItem(Player*player,Item *item)
eff->setid = setid;
size_t x = 0;
- for(; x < player->ItemSetEff.size(); x++)
+ for (; x < player->ItemSetEff.size(); x++)
if(!player->ItemSetEff[x])
break;
@@ -73,7 +73,7 @@ void AddItemsSetItem(Player*player,Item *item)
++eff->item_count;
- for(uint32 x=0;x<8;x++)
+ for (uint32 x=0; x<8; x++)
{
if(!set->spells [x])
continue;
@@ -82,7 +82,7 @@ void AddItemsSetItem(Player*player,Item *item)
continue;
uint32 z=0;
- for(;z<8;z++)
+ for (; z<8; z++)
if(eff->spells[z] && eff->spells[z]->Id==set->spells[x])
break;
@@ -90,7 +90,7 @@ void AddItemsSetItem(Player*player,Item *item)
continue;
//new spell
- for(uint32 y=0;y<8;y++)
+ for (uint32 y=0; y<8; y++)
{
if(!eff->spells[y]) // free slot
{
@@ -124,7 +124,7 @@ void RemoveItemsSetItem(Player*player,ItemPrototype const *proto)
ItemSetEffect *eff = NULL;
size_t setindex = 0;
- for(;setindex < player->ItemSetEff.size(); setindex++)
+ for (; setindex < player->ItemSetEff.size(); setindex++)
{
if(player->ItemSetEff[setindex] && player->ItemSetEff[setindex]->setid == setid)
{
@@ -139,7 +139,7 @@ void RemoveItemsSetItem(Player*player,ItemPrototype const *proto)
--eff->item_count;
- for(uint32 x=0;x<8;x++)
+ for (uint32 x=0; x<8; x++)
{
if(!set->spells[x])
continue;
@@ -148,7 +148,7 @@ void RemoveItemsSetItem(Player*player,ItemPrototype const *proto)
if(set->items_to_triggerspell[x] <= eff->item_count)
continue;
- for(uint32 z=0;z<8;z++)
+ for (uint32 z=0; z<8; z++)
{
if(eff->spells[z] && eff->spells[z]->Id==set->spells[x])
{
@@ -267,7 +267,7 @@ bool Item::Create( uint32 guidlow, uint32 itemid, Player const* owner)
SetUInt32Value(ITEM_FIELD_MAXDURABILITY, itemProto->MaxDurability);
SetUInt32Value(ITEM_FIELD_DURABILITY, itemProto->MaxDurability);
- for(uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
+ for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
SetSpellCharges(i,itemProto->Spells[i].SpellCharges);
SetUInt32Value(ITEM_FIELD_FLAGS, itemProto->Flags);
@@ -286,7 +286,7 @@ void Item::UpdateDuration(Player* owner, uint32 diff)
if (GetUInt32Value(ITEM_FIELD_DURATION)<=diff)
{
Script->ItemExpire(owner, GetProto());
- owner->DestroyItem(GetBagSlot(), GetSlot(), true);
+ owner->DestroyItem(GetBagSlot(), GetSlot(), true);
return;
}
@@ -304,7 +304,7 @@ void Item::SaveToDB()
CharacterDatabase.PExecute( "DELETE FROM item_instance WHERE guid = '%u'", guid );
std::ostringstream ss;
ss << "INSERT INTO item_instance (guid,owner_guid,data) VALUES (" << guid << "," << GUID_LOPART(GetOwnerGUID()) << ",'";
- for(uint16 i = 0; i < m_valuesCount; ++i )
+ for (uint16 i = 0; i < m_valuesCount; ++i )
ss << GetUInt32Value(i) << " ";
ss << "' )";
CharacterDatabase.Execute( ss.str().c_str() );
@@ -313,7 +313,7 @@ void Item::SaveToDB()
{
std::ostringstream ss;
ss << "UPDATE item_instance SET data = '";
- for(uint16 i = 0; i < m_valuesCount; ++i )
+ for (uint16 i = 0; i < m_valuesCount; ++i )
ss << GetUInt32Value(i) << " ";
ss << "', owner_guid = '" << GUID_LOPART(GetOwnerGUID()) << "' WHERE guid = '" << guid << "'";
@@ -424,7 +424,7 @@ bool Item::LoadFromDB(uint32 guid, uint64 owner_guid, QueryResult *result)
{
std::ostringstream ss;
ss << "UPDATE item_instance SET data = '";
- for(uint16 i = 0; i < m_valuesCount; ++i )
+ for (uint16 i = 0; i < m_valuesCount; ++i )
ss << GetUInt32Value(i) << " ";
ss << "', owner_guid = '" << GUID_LOPART(GetOwnerGUID()) << "' WHERE guid = '" << guid << "'";
@@ -592,7 +592,7 @@ void Item::SetItemRandomProperties(int32 randomPropId)
SetInt32Value(ITEM_FIELD_RANDOM_PROPERTIES_ID,item_rand->ID);
SetState(ITEM_CHANGED);
}
- for(uint32 i = PROP_ENCHANTMENT_SLOT_2; i < PROP_ENCHANTMENT_SLOT_2 + 3; ++i)
+ for (uint32 i = PROP_ENCHANTMENT_SLOT_2; i < PROP_ENCHANTMENT_SLOT_2 + 3; ++i)
SetEnchantment(EnchantmentSlot(i),item_rand->enchant_id[i - PROP_ENCHANTMENT_SLOT_2],0,0);
}
}
@@ -609,7 +609,7 @@ void Item::SetItemRandomProperties(int32 randomPropId)
SetState(ITEM_CHANGED);
}
- for(uint32 i = PROP_ENCHANTMENT_SLOT_0; i < PROP_ENCHANTMENT_SLOT_0 + 3; ++i)
+ for (uint32 i = PROP_ENCHANTMENT_SLOT_0; i < PROP_ENCHANTMENT_SLOT_0 + 3; ++i)
SetEnchantment(EnchantmentSlot(i),item_rand->enchant_id[i - PROP_ENCHANTMENT_SLOT_0],0,0);
}
}
@@ -736,7 +736,7 @@ bool Item::CanBeTraded(bool mail) const
bool Item::IsBoundByEnchant() const
{
// Check all enchants for soulbound
- for(uint32 enchant_slot = PERM_ENCHANTMENT_SLOT; enchant_slot < MAX_ENCHANTMENT_SLOT; ++enchant_slot)
+ for (uint32 enchant_slot = PERM_ENCHANTMENT_SLOT; enchant_slot < MAX_ENCHANTMENT_SLOT; ++enchant_slot)
{
uint32 enchant_id = GetEnchantmentId(EnchantmentSlot(enchant_slot));
if(!enchant_id)
@@ -798,7 +798,7 @@ bool Item::IsTargetValidForItemUse(Unit* pUnitTarget)
if (!pUnitTarget)
return false;
- for(ItemRequiredTargetMap::const_iterator itr = bounds.first; itr != bounds.second; ++itr)
+ for (ItemRequiredTargetMap::const_iterator itr = bounds.first; itr != bounds.second; ++itr)
if(itr->second.IsFitToRequirements(pUnitTarget))
return true;
@@ -840,7 +840,7 @@ void Item::ClearEnchantment(EnchantmentSlot slot)
if(!GetEnchantmentId(slot))
return;
- for(uint8 x = 0; x < 3; ++x)
+ for (uint8 x = 0; x < 3; ++x)
SetUInt32Value(ITEM_FIELD_ENCHANTMENT_1_1 + slot*MAX_ENCHANTMENT_OFFSET + x, 0);
SetState(ITEM_CHANGED);
}
@@ -848,7 +848,7 @@ void Item::ClearEnchantment(EnchantmentSlot slot)
bool Item::GemsFitSockets() const
{
bool fits = true;
- for(uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+MAX_GEM_SOCKETS; ++enchant_slot)
+ for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+MAX_GEM_SOCKETS; ++enchant_slot)
{
uint8 SocketColor = GetProto()->Socket[enchant_slot-SOCK_ENCHANTMENT_SLOT].Color;
@@ -888,7 +888,7 @@ bool Item::GemsFitSockets() const
uint8 Item::GetGemCountWithID(uint32 GemID) const
{
uint8 count = 0;
- for(uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+MAX_GEM_SOCKETS; ++enchant_slot)
+ for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+MAX_GEM_SOCKETS; ++enchant_slot)
{
uint32 enchant_id = GetEnchantmentId(EnchantmentSlot(enchant_slot));
if(!enchant_id)
@@ -907,7 +907,7 @@ uint8 Item::GetGemCountWithID(uint32 GemID) const
uint8 Item::GetGemCountWithLimitCategory(uint32 limitCategory) const
{
uint8 count = 0;
- for(uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+MAX_GEM_SOCKETS; ++enchant_slot)
+ for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+MAX_GEM_SOCKETS; ++enchant_slot)
{
uint32 enchant_id = GetEnchantmentId(EnchantmentSlot(enchant_slot));
if(!enchant_id)
diff --git a/src/game/ItemEnchantmentMgr.cpp b/src/game/ItemEnchantmentMgr.cpp
index b40a398a782..58c7744c0de 100644
--- a/src/game/ItemEnchantmentMgr.cpp
+++ b/src/game/ItemEnchantmentMgr.cpp
@@ -103,7 +103,7 @@ uint32 GetItemEnchantMod(uint32 entry)
double dRoll = rand_chance();
float fCount = 0;
- for(EnchStoreList::const_iterator ench_iter = tab->second.begin(); ench_iter != tab->second.end(); ++ench_iter)
+ for (EnchStoreList::const_iterator ench_iter = tab->second.begin(); ench_iter != tab->second.end(); ++ench_iter)
{
fCount += ench_iter->chance;
@@ -114,7 +114,7 @@ uint32 GetItemEnchantMod(uint32 entry)
dRoll = (irand(0, (int)floor(fCount * 100) + 1)) / 100;
fCount = 0;
- for(EnchStoreList::const_iterator ench_iter = tab->second.begin(); ench_iter != tab->second.end(); ++ench_iter)
+ for (EnchStoreList::const_iterator ench_iter = tab->second.begin(); ench_iter != tab->second.end(); ++ench_iter)
{
fCount += ench_iter->chance;
diff --git a/src/game/ItemHandler.cpp b/src/game/ItemHandler.cpp
index 129766b35f0..ad9b1a7de4b 100644
--- a/src/game/ItemHandler.cpp
+++ b/src/game/ItemHandler.cpp
@@ -337,14 +337,14 @@ void WorldSession::HandleItemQuerySingleOpcode( WorldPacket & recv_data )
data << int32(pProto->Stackable);
data << pProto->ContainerSlots;
data << pProto->StatsCount; // item stats count
- for(uint32 i = 0; i < pProto->StatsCount; ++i)
+ for (uint32 i = 0; i < pProto->StatsCount; ++i)
{
data << pProto->ItemStat[i].ItemStatType;
data << pProto->ItemStat[i].ItemStatValue;
}
data << pProto->ScalingStatDistribution; // scaling stats distribution
data << pProto->ScalingStatValue; // some kind of flags used to determine stat values column
- for(int i = 0; i < MAX_ITEM_PROTO_DAMAGES; ++i)
+ for (int i = 0; i < MAX_ITEM_PROTO_DAMAGES; ++i)
{
data << pProto->Damage[i].DamageMin;
data << pProto->Damage[i].DamageMax;
@@ -364,7 +364,7 @@ void WorldSession::HandleItemQuerySingleOpcode( WorldPacket & recv_data )
data << pProto->AmmoType;
data << pProto->RangedModRange;
- for(int s = 0; s < MAX_ITEM_PROTO_SPELLS; ++s)
+ for (int s = 0; s < MAX_ITEM_PROTO_SPELLS; ++s)
{
// send DBC data for cooldowns in same way as it used in Spell::SendSpellCooldown
// use `item_template` or if not set then only use spell cooldowns
@@ -418,7 +418,7 @@ void WorldSession::HandleItemQuerySingleOpcode( WorldPacket & recv_data )
data << pProto->Map; // Added in 1.12.x & 2.0.1 client branch
data << pProto->BagFamily;
data << pProto->TotemCategory;
- for(int s = 0; s < MAX_ITEM_PROTO_SOCKETS; ++s)
+ for (int s = 0; s < MAX_ITEM_PROTO_SOCKETS; ++s)
{
data << pProto->Socket[s].Color;
data << pProto->Socket[s].Content;
@@ -656,7 +656,7 @@ void WorldSession::HandleBuyItemInSlotOpcode( WorldPacket & recv_data )
bag = INVENTORY_SLOT_BAG_0;
else
{
- for (int i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END;++i)
+ for (int i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i)
{
if (Bag *pBag = (Bag*)_player->GetItemByPos(INVENTORY_SLOT_BAG_0,i))
{
@@ -737,7 +737,7 @@ void WorldSession::SendListInventory( uint64 vendorguid )
float discountMod = _player->GetReputationPriceDiscount(pCreature);
- for(int i = 0; i < numitems; ++i )
+ for (int i = 0; i < numitems; ++i )
{
if(VendorItem const* crItem = vItems->GetItem(i))
{
@@ -1123,7 +1123,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
if(!item_guid)
return;
- for(int i = 0; i < MAX_GEM_SOCKETS; ++i)
+ for (int i = 0; i < MAX_GEM_SOCKETS; ++i)
recv_data >> gem_guids[i];
//cheat -> tried to socket same gem multiple times
@@ -1143,14 +1143,14 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
uint8 slot = itemTarget->IsEquipped() ? itemTarget->GetSlot() : uint8(NULL_SLOT);
Item *Gems[MAX_GEM_SOCKETS];
- for(int i = 0; i < MAX_GEM_SOCKETS; ++i)
+ for (int i = 0; i < MAX_GEM_SOCKETS; ++i)
Gems[i] = gem_guids[i] ? _player->GetItemByGuid(gem_guids[i]) : NULL;
GemPropertiesEntry const *GemProps[MAX_GEM_SOCKETS];
- for(int i = 0; i < MAX_GEM_SOCKETS; ++i) //get geminfo from dbc storage
+ for (int i = 0; i < MAX_GEM_SOCKETS; ++i) //get geminfo from dbc storage
GemProps[i] = (Gems[i]) ? sGemPropertiesStore.LookupEntry(Gems[i]->GetProto()->GemProperties) : NULL;
- for(int i = 0; i < MAX_GEM_SOCKETS; ++i) //check for hack maybe
+ for (int i = 0; i < MAX_GEM_SOCKETS; ++i) //check for hack maybe
{
if (!GemProps[i])
continue;
@@ -1180,14 +1180,14 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
uint32 GemEnchants[MAX_GEM_SOCKETS];
uint32 OldEnchants[MAX_GEM_SOCKETS];
- for(int i = 0; i < MAX_GEM_SOCKETS; ++i) //get new and old enchantments
+ for (int i = 0; i < MAX_GEM_SOCKETS; ++i) //get new and old enchantments
{
GemEnchants[i] = (GemProps[i]) ? GemProps[i]->spellitemenchantement : 0;
OldEnchants[i] = itemTarget->GetEnchantmentId(EnchantmentSlot(SOCK_ENCHANTMENT_SLOT+i));
}
// check unique-equipped conditions
- for(int i = 0; i < MAX_GEM_SOCKETS; ++i)
+ for (int i = 0; i < MAX_GEM_SOCKETS; ++i)
{
if(!Gems[i])
continue;
@@ -1284,10 +1284,10 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
//if a meta gem is being equipped, all information has to be written to the item before testing if the conditions for the gem are met
//remove ALL enchants
- for(uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+MAX_GEM_SOCKETS; ++enchant_slot)
+ for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+MAX_GEM_SOCKETS; ++enchant_slot)
_player->ApplyEnchantment(itemTarget,EnchantmentSlot(enchant_slot),false);
- for(int i = 0; i < MAX_GEM_SOCKETS; ++i)
+ for (int i = 0; i < MAX_GEM_SOCKETS; ++i)
{
if(GemEnchants[i])
{
@@ -1297,7 +1297,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
}
}
- for(uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+MAX_GEM_SOCKETS; ++enchant_slot)
+ for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+MAX_GEM_SOCKETS; ++enchant_slot)
_player->ApplyEnchantment(itemTarget,EnchantmentSlot(enchant_slot),true);
bool SocketBonusToBeActivated = itemTarget->GemsFitSockets();//current socketbonus state
diff --git a/src/game/LFGHandler.cpp b/src/game/LFGHandler.cpp
index ae0baf1b15b..1a44b1b68ff 100644
--- a/src/game/LFGHandler.cpp
+++ b/src/game/LFGHandler.cpp
@@ -34,7 +34,7 @@ static void AttemptJoin(Player* _player)
//TODO: Guard Player Map
HashMapHolder<Player>::MapType const& players = ObjectAccessor::Instance().GetPlayers();
- for(HashMapHolder<Player>::MapType::const_iterator iter = players.begin(); iter != players.end(); ++iter)
+ for (HashMapHolder<Player>::MapType::const_iterator iter = players.begin(); iter != players.end(); ++iter)
{
Player *plr = iter->second;
@@ -94,7 +94,7 @@ static void AttemptAddMore(Player* _player)
//TODO: Guard Player map
HashMapHolder<Player>::MapType const& players = ObjectAccessor::Instance().GetPlayers();
- for(HashMapHolder<Player>::MapType::const_iterator iter = players.begin(); iter != players.end(); ++iter)
+ for (HashMapHolder<Player>::MapType::const_iterator iter = players.begin(); iter != players.end(); ++iter)
{
Player *plr = iter->second;
@@ -188,7 +188,7 @@ void WorldSession::HandleLfgClearOpcode( WorldPacket & /*recv_data */ )
// empty packet
sLog.outDebug("CMSG_CLEAR_LOOKING_FOR_GROUP");
- for(int i = 0; i < MAX_LOOKING_FOR_GROUP_SLOT; ++i)
+ for (int i = 0; i < MAX_LOOKING_FOR_GROUP_SLOT; ++i)
_player->m_lookingForGroup.slots[i].Clear();
if( sWorld.getConfig(CONFIG_RESTRICTED_LFG_CHANNEL) && _player->GetSession()->GetSecurity() == SEC_PLAYER )
@@ -305,7 +305,7 @@ void WorldSession::SendLfgResult(uint32 type, uint32 entry, uint8 lfg_type)
//TODO: Guard Player map
HashMapHolder<Player>::MapType const& players = ObjectAccessor::Instance().GetPlayers();
- for(HashMapHolder<Player>::MapType::const_iterator iter = players.begin(); iter != players.end(); ++iter)
+ for (HashMapHolder<Player>::MapType::const_iterator iter = players.begin(); iter != players.end(); ++iter)
{
Player *plr = iter->second;
@@ -331,7 +331,7 @@ void WorldSession::SendLfgResult(uint32 type, uint32 entry, uint8 lfg_type)
data << uint8(plr->getClass());
data << uint8(plr->getRace());
- for(int i = 0; i < 3; ++i)
+ for (int i = 0; i < 3; ++i)
data << uint8(0); // spent talents count in specific tab
data << uint32(0); // resistances1
@@ -379,7 +379,7 @@ void WorldSession::SendLfgResult(uint32 type, uint32 entry, uint8 lfg_type)
if(flags & 0x80)
{
- for(uint8 j = 0; j < MAX_LOOKING_FOR_GROUP_SLOT; ++j)
+ for (uint8 j = 0; j < MAX_LOOKING_FOR_GROUP_SLOT; ++j)
{
data << uint32(plr->m_lookingForGroup.slots[j].entry | (plr->m_lookingForGroup.slots[j].type << 24));
}
diff --git a/src/game/Language.h b/src/game/Language.h
index e38d58f109e..432b456f1e1 100644
--- a/src/game/Language.h
+++ b/src/game/Language.h
@@ -878,7 +878,6 @@ enum TrinityStrings
LANG_WORLD_CLOSED = 7523,
LANG_WORLD_OPENED = 7524,
-
// Use for not-in-offcial-sources patches
// 10000-10999
// opvp hp
diff --git a/src/game/Level0.cpp b/src/game/Level0.cpp
index 890e8a9c3c9..cdfa3517bfa 100644
--- a/src/game/Level0.cpp
+++ b/src/game/Level0.cpp
@@ -78,7 +78,7 @@ bool ChatHandler::HandleStartCommand(const char* /*args*/)
SetSentErrorMessage(true);
return false;
}
-
+
if((chr->isDead()) || (chr->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST)))
{
// if player is dead and stuck, send ghost to graveyard
@@ -168,7 +168,7 @@ bool ChatHandler::HandleGMListIngameCommand(const char* /*args*/)
HashMapHolder<Player>::MapType &m = HashMapHolder<Player>::GetContainer();
HashMapHolder<Player>::MapType::const_iterator itr = m.begin();
- for(; itr != m.end(); ++itr)
+ for (; itr != m.end(); ++itr)
{
AccountTypes itr_sec = itr->second->GetSession()->GetSecurity();
if ((itr->second->isGameMaster() || (itr_sec > SEC_PLAYER && itr_sec <= sWorld.getConfig(CONFIG_GM_LEVEL_IN_GM_LIST))) &&
diff --git a/src/game/Level1.cpp b/src/game/Level1.cpp
index 160d65cd5cf..826503d03b8 100644
--- a/src/game/Level1.cpp
+++ b/src/game/Level1.cpp
@@ -297,7 +297,7 @@ std::string ChatHandler::PGetParseString(int32 entry, ...)
bool ChatHandler::HandleGMTicketListCommand(const char* args)
{
SendSysMessage(LANG_COMMAND_TICKETSHOWLIST);
- for(GmTicketList::iterator itr = objmgr.m_GMTicketList.begin(); itr != objmgr.m_GMTicketList.end(); ++itr)
+ for (GmTicketList::iterator itr = objmgr.m_GMTicketList.begin(); itr != objmgr.m_GMTicketList.end(); ++itr)
{
if((*itr)->closed != 0)
continue;
@@ -316,11 +316,10 @@ bool ChatHandler::HandleGMTicketListCommand(const char* args)
return true;
}
-
bool ChatHandler::HandleGMTicketListOnlineCommand(const char* args)
{
SendSysMessage(LANG_COMMAND_TICKETSHOWONLINELIST);
- for(GmTicketList::iterator itr = objmgr.m_GMTicketList.begin(); itr != objmgr.m_GMTicketList.end(); ++itr)
+ for (GmTicketList::iterator itr = objmgr.m_GMTicketList.begin(); itr != objmgr.m_GMTicketList.end(); ++itr)
{
if((*itr)->closed != 0 || !objmgr.GetPlayer((*itr)->playerGuid))
continue;
@@ -343,7 +342,7 @@ bool ChatHandler::HandleGMTicketListOnlineCommand(const char* args)
bool ChatHandler::HandleGMTicketListClosedCommand(const char* args)
{
SendSysMessage(LANG_COMMAND_TICKETSHOWCLOSEDLIST);
- for(GmTicketList::iterator itr = objmgr.m_GMTicketList.begin(); itr != objmgr.m_GMTicketList.end(); ++itr)
+ for (GmTicketList::iterator itr = objmgr.m_GMTicketList.begin(); itr != objmgr.m_GMTicketList.end(); ++itr)
{
if((*itr)->closed == 0)
continue;
@@ -409,7 +408,7 @@ bool ChatHandler::HandleGMTicketGetByNameCommand(const char* args)
SendSysMessage(LANG_NO_PLAYERS_FOUND);
return true;
}
-
+
GM_Ticket *ticket = objmgr.GetGMTicketByPlayer(plr->GetGUID());
if(!ticket)
{
@@ -682,8 +681,6 @@ bool ChatHandler::HandleGMVisibleCommand(const char* args)
return false;
}
-
-
bool ChatHandler::HandleGPSCommand(const char* args)
{
WorldObject *obj = NULL;
@@ -909,7 +906,6 @@ bool ChatHandler::HandleGonameCommand(const char* args)
return false;
}
-
if (target)
{
// check online security
@@ -1094,7 +1090,7 @@ bool ChatHandler::HandleModifyKnownTitlesCommand(const char* args)
uint64 titles2 = titles;
- for(uint32 i = 1; i < sCharTitlesStore.GetNumRows(); ++i)
+ for (uint32 i = 1; i < sCharTitlesStore.GetNumRows(); ++i)
if(CharTitlesEntry const* tEntry = sCharTitlesStore.LookupEntry(i))
titles2 &= ~(uint64(1) << tEntry->bit_index);
@@ -2289,7 +2285,7 @@ bool ChatHandler::HandleLookupAreaCommand(const char* args)
if (!Utf8FitTo (name, wnamepart))
{
loc = 0;
- for(; loc < MAX_LOCALE; ++loc)
+ for (; loc < MAX_LOCALE; ++loc)
{
if (loc==GetSessionDbcLocale ())
continue;
@@ -2352,7 +2348,7 @@ bool ChatHandler::HandleLookupTeleCommand(const char * args)
std::ostringstream reply;
GameTeleMap const & teleMap = objmgr.GetGameTeleMap();
- for(GameTeleMap::const_iterator itr = teleMap.begin(); itr != teleMap.end(); ++itr)
+ for (GameTeleMap::const_iterator itr = teleMap.begin(); itr != teleMap.end(); ++itr)
{
GameTele const* tele = &itr->second;
@@ -2582,7 +2578,7 @@ bool ChatHandler::HandleTeleGroupCommand(const char * args)
return false;
}
- for(GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *pl = itr->getSource();
@@ -2657,7 +2653,7 @@ bool ChatHandler::HandleGroupgoCommand(const char* args)
return false;
}
- for(GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *pl = itr->getSource();
diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp
index b6cf14402c6..51677bb11ac 100644
--- a/src/game/Level2.cpp
+++ b/src/game/Level2.cpp
@@ -57,7 +57,7 @@ bool ChatHandler::HandleMuteCommand(const char* args)
std::string mutereasonstr = "No reason";
if(mutereason != NULL)
mutereasonstr = mutereason;
-
+
Player* target;
uint64 target_guid;
std::string target_name;
@@ -68,10 +68,8 @@ bool ChatHandler::HandleMuteCommand(const char* args)
// find only player from same account if any
if(!target)
- {
if(WorldSession* session = sWorld.FindSession(account_id))
target = session->GetPlayer();
- }
uint32 notspeaktime = (uint32) atoi(delayStr);
@@ -109,10 +107,8 @@ bool ChatHandler::HandleUnmuteCommand(const char* args)
// find only player from same account if any
if(!target)
- {
if(WorldSession* session = sWorld.FindSession(account_id))
target = session->GetPlayer();
- }
// must have strong lesser security level
if(HasLowerSecurity (target,target_guid,true))
@@ -345,10 +341,8 @@ bool ChatHandler::HandleGoCreatureCommand(const char* args)
SetSentErrorMessage(true);
return false;
}
- if( result->GetRowCount() > 1 )
- {
+ if (result->GetRowCount() > 1)
SendSysMessage(LANG_COMMAND_GOCREATMULTIPLE);
- }
Field *fields = result->Fetch();
float x = fields[0].GetFloat();
@@ -1966,7 +1960,6 @@ bool ChatHandler::HandleDeMorphCommand(const char* /*args*/)
if(!target)
target = m_session->GetPlayer();
-
// check online security
else if (target->GetTypeId() == TYPEID_PLAYER && HasLowerSecurity((Player*)target, 0))
return false;
@@ -2074,7 +2067,7 @@ bool ChatHandler::HandleKickPlayerCommand(const char *args)
}
std::string nameLink = playerLink(name);
-
+
if(sWorld.KickPlayer(name))
{
if(sWorld.getConfig(CONFIG_SHOW_KICK_IN_WORLD) == 1)
@@ -2463,7 +2456,7 @@ bool ChatHandler::HandleWpEventCommand(const char* args)
char* arg_id = strtok(NULL, " ");
uint32 id = 0;
-
+
if(show == "add")
{
if(arg_id)
@@ -2581,7 +2574,7 @@ bool ChatHandler::HandleWpEventCommand(const char* args)
SendSysMessage("|cffff33ffERROR: No argument present.|r");
return true;
}
-
+
std::string arg_string = arg_2;
if( (arg_string != "setid") && (arg_string != "delay") && (arg_string != "command")
@@ -2850,7 +2843,6 @@ bool ChatHandler::HandleWpModifyCommand(const char* args)
return true;
} // move
-
const char *text = arg_str;
if( text == 0 )
@@ -2872,7 +2864,6 @@ bool ChatHandler::HandleWpModifyCommand(const char* args)
return true;
}
-
bool ChatHandler::HandleWpShowCommand(const char* args)
{
sLog.outDebug("DEBUG: HandleWpShowCommand");
@@ -3291,7 +3282,7 @@ bool ChatHandler::HandleCharacterReputationCommand(const char* args)
LocaleConstant loc = GetSessionDbcLocale();
FactionStateList const& targetFSL = target->GetReputationMgr().GetStateList();
- for(FactionStateList::const_iterator itr = targetFSL.begin(); itr != targetFSL.end(); ++itr)
+ for (FactionStateList::const_iterator itr = targetFSL.begin(); itr != targetFSL.end(); ++itr)
{
FactionEntry const *factionEntry = sFactionStore.LookupEntry(itr->second.ID);
char const* factionName = factionEntry ? factionEntry->name[loc] : "#Not found#";
@@ -3412,7 +3403,7 @@ bool ChatHandler::HandleLookupEventCommand(const char* args)
GameEventMgr::GameEventDataMap const& events = gameeventmgr.GetEventMap();
GameEventMgr::ActiveEvents const& activeEvents = gameeventmgr.GetActiveEventList();
- for(uint32 id = 0; id < events.size(); ++id )
+ for (uint32 id = 0; id < events.size(); ++id )
{
GameEventData const& eventData = events[id];
@@ -3449,7 +3440,7 @@ bool ChatHandler::HandleEventActiveListCommand(const char* args)
char const* active = GetTrinityString(LANG_ACTIVE);
- for(GameEventMgr::ActiveEvents::const_iterator itr = activeEvents.begin(); itr != activeEvents.end(); ++itr )
+ for (GameEventMgr::ActiveEvents::const_iterator itr = activeEvents.begin(); itr != activeEvents.end(); ++itr )
{
uint32 event_id = *itr;
GameEventData const& eventData = events[event_id];
@@ -3650,7 +3641,7 @@ void ChatHandler::HandleLearnSkillRecipesHelper(Player* player,uint32 skill_id)
}
bool ChatHandler::HandleLearnAllCraftsCommand(const char* /*args*/)
-{
+{
for (uint32 i = 0; i < sSkillLineStore.GetNumRows(); ++i)
{
@@ -3693,7 +3684,6 @@ bool ChatHandler::HandleLearnAllRecipesCommand(const char* args)
// converting string that we try to find to lower case
wstrToLower( wnamepart );
-
std::string name;
@@ -3717,7 +3707,7 @@ bool ChatHandler::HandleLearnAllRecipesCommand(const char* args)
if (!Utf8FitTo(name, wnamepart))
{
loc = 0;
- for(; loc < MAX_LOCALE; ++loc)
+ for (; loc < MAX_LOCALE; ++loc)
{
if(loc==GetSessionDbcLocale())
continue;
@@ -3946,7 +3936,7 @@ bool ChatHandler::HandleCreatePetCommand(const char* args)
if(!pet)
return false;
-
+
if(!pet->CreateBaseAtCreature(creatureTarget))
{
delete pet;
@@ -4151,7 +4141,7 @@ bool ChatHandler::HandleTempGameObjectCommand(const char* args)
if( spawntime )
spawntm = atoi((char*)spawntime);
-
+
float x = chr->GetPositionX();
float y = chr->GetPositionY();
float z = chr->GetPositionZ();
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp
index 21f3c995dce..47346daba61 100644
--- a/src/game/Level3.cpp
+++ b/src/game/Level3.cpp
@@ -2418,7 +2418,7 @@ bool ChatHandler::HandleLearnAllMyTalentsCommand(const char* /*args*/)
// search highest talent rank
uint32 spellId = 0;
- for(int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank)
+ for (int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank)
{
if(talentInfo->RankID[rank] != 0)
{
@@ -2494,7 +2494,7 @@ bool ChatHandler::HandleLearnAllMyPetTalentsCommand(const char* /*args*/)
// search highest talent rank
uint32 spellid = 0;
- for(int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank)
+ for (int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank)
{
if(talentInfo->RankID[rank]!=0)
{
@@ -2521,7 +2521,7 @@ bool ChatHandler::HandleLearnAllMyPetTalentsCommand(const char* /*args*/)
bool ChatHandler::HandleLearnAllLangCommand(const char* /*args*/)
{
// skipping UNIVERSAL language (0)
- for(uint8 i = 1; i < LANGUAGES_COUNT; ++i)
+ for (uint8 i = 1; i < LANGUAGES_COUNT; ++i)
m_session->GetPlayer()->learnSpell(lang_description[i].spell_id,false);
SendSysMessage(LANG_COMMAND_LEARN_ALL_LANG);
@@ -2679,7 +2679,7 @@ bool ChatHandler::HandleAddItemCommand(const char* args)
// remove binding (let GM give it to another player later)
if(pl==plTarget)
- for(ItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end(); ++itr)
+ for (ItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end(); ++itr)
if(Item* item1 = pl->GetItemByPos(itr->pos))
item1->SetBinding( false );
@@ -3303,7 +3303,7 @@ bool ChatHandler::HandleLookupItemSetCommand(const char* args)
if (!Utf8FitTo(name, wnamepart))
{
loc = 0;
- for(; loc < MAX_LOCALE; ++loc)
+ for (; loc < MAX_LOCALE; ++loc)
{
if(loc==GetSessionDbcLocale())
continue;
@@ -3368,7 +3368,7 @@ bool ChatHandler::HandleLookupSkillCommand(const char* args)
if (!Utf8FitTo(name, wnamepart))
{
loc = 0;
- for(; loc < MAX_LOCALE; ++loc)
+ for (; loc < MAX_LOCALE; ++loc)
{
if(loc==GetSessionDbcLocale())
continue;
@@ -3447,7 +3447,7 @@ bool ChatHandler::HandleLookupSpellCommand(const char* args)
if (!Utf8FitTo(name, wnamepart))
{
loc = 0;
- for(; loc < MAX_LOCALE; ++loc)
+ for (; loc < MAX_LOCALE; ++loc)
{
if(loc==GetSessionDbcLocale())
continue;
@@ -3662,7 +3662,7 @@ bool ChatHandler::HandleLookupCreatureCommand(const char* args)
if(!found)
found = true;
-
+
continue;
}
}
@@ -3729,7 +3729,7 @@ bool ChatHandler::HandleLookupObjectCommand(const char* args)
PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, id, id, name.c_str());
else
PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, id, name.c_str());
-
+
if(!found)
found = true;
@@ -3795,7 +3795,7 @@ bool ChatHandler::HandleLookupFactionCommand(const char* args)
if (!Utf8FitTo(name, wnamepart))
{
loc = 0;
- for(; loc < MAX_LOCALE; ++loc)
+ for (; loc < MAX_LOCALE; ++loc)
{
if(loc==GetSessionDbcLocale())
continue;
@@ -3885,7 +3885,7 @@ bool ChatHandler::HandleLookupTaxiNodeCommand(const char * args)
if (!Utf8FitTo(name, wnamepart))
{
loc = 0;
- for(; loc < MAX_LOCALE; ++loc)
+ for (; loc < MAX_LOCALE; ++loc)
{
if(loc==GetSessionDbcLocale())
continue;
@@ -3936,7 +3936,7 @@ bool ChatHandler::HandleLookupMapCommand(const char* args)
bool found = false;
// search in Map.dbc
- for(uint32 id = 0; id < sMapStore.GetNumRows(); id++)
+ for (uint32 id = 0; id < sMapStore.GetNumRows(); id++)
{
MapEntry const* MapInfo = sMapStore.LookupEntry(id);
if(MapInfo)
@@ -3950,7 +3950,7 @@ bool ChatHandler::HandleLookupMapCommand(const char* args)
if(!Utf8FitTo(name, wnamepart))
{
loc = LOCALE_enUS;
- for(; loc < MAX_LOCALE; loc++)
+ for (; loc < MAX_LOCALE; loc++)
{
if(m_session && loc == m_session->GetSessionDbcLocale())
continue;
@@ -4370,7 +4370,7 @@ bool ChatHandler::HandleAuraCommand(const char* args)
uint8 eff_mask=0;
if(spellInfo)
{
- for(uint32 i = 0;i<3;++i)
+ for (uint32 i = 0; i<3; ++i)
{
uint8 eff = spellInfo->Effect[i];
if (eff>=TOTAL_SPELL_EFFECTS)
@@ -5381,7 +5381,7 @@ bool ChatHandler::HandleResetAllCommand(const char * args)
CharacterDatabase.PExecute("UPDATE characters SET at_login = at_login | '%u' WHERE (at_login & '%u') = '0'",atLogin,atLogin);
HashMapHolder<Player>::MapType const& plist = ObjectAccessor::Instance().GetPlayers();
- for(HashMapHolder<Player>::MapType::const_iterator itr = plist.begin(); itr != plist.end(); ++itr)
+ for (HashMapHolder<Player>::MapType::const_iterator itr = plist.begin(); itr != plist.end(); ++itr)
itr->second->SetAtLoginFlag(atLogin);
return true;
@@ -5615,7 +5615,7 @@ bool ChatHandler::HandleQuestRemove(const char* args)
}
// remove all quest entries for 'entry' from quest log
- for(uint8 slot = 0; slot < MAX_QUEST_LOG_SIZE; ++slot )
+ for (uint8 slot = 0; slot < MAX_QUEST_LOG_SIZE; ++slot )
{
uint32 quest = player->GetQuestSlotQuestId(slot);
if(quest==entry)
@@ -5666,7 +5666,7 @@ bool ChatHandler::HandleQuestComplete(const char* args)
}
// Add quest items for quests that require items
- for(uint8 x = 0; x < QUEST_OBJECTIVES_COUNT; ++x)
+ for (uint8 x = 0; x < QUEST_OBJECTIVES_COUNT; ++x)
{
uint32 id = pQuest->ReqItemId[x];
uint32 count = pQuest->ReqItemCount[x];
@@ -5685,25 +5685,25 @@ bool ChatHandler::HandleQuestComplete(const char* args)
}
// All creature/GO slain/casted (not required, but otherwise it will display "Creature slain 0/10")
- for(uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
+ for (uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
{
uint32 creature = pQuest->ReqCreatureOrGOId[i];
uint32 creaturecount = pQuest->ReqCreatureOrGOCount[i];
if(uint32 spell_id = pQuest->ReqSpell[i])
{
- for(uint16 z = 0; z < creaturecount; ++z)
+ for (uint16 z = 0; z < creaturecount; ++z)
player->CastedCreatureOrGO(creature,0,spell_id);
}
else if(creature > 0)
{
if(CreatureInfo const* cInfo = objmgr.GetCreatureTemplate(creature))
- for(uint16 z = 0; z < creaturecount; ++z)
+ for (uint16 z = 0; z < creaturecount; ++z)
player->KilledMonster(cInfo,0);
}
else if(creature < 0)
{
- for(uint16 z = 0; z < creaturecount; ++z)
+ for (uint16 z = 0; z < creaturecount; ++z)
player->CastedCreatureOrGO(creature,0,0);
}
}
@@ -6419,7 +6419,7 @@ bool ChatHandler::HandleMovegensCommand(const char* /*args*/)
PSendSysMessage(LANG_MOVEGENS_LIST,(unit->GetTypeId()==TYPEID_PLAYER ? "Player" : "Creature" ),unit->GetGUIDLow());
MotionMaster* mm = unit->GetMotionMaster();
- for(uint8 i = 0; i < MAX_MOTION_SLOT; ++i)
+ for (uint8 i = 0; i < MAX_MOTION_SLOT; ++i)
{
MovementGenerator* mg = mm->GetMotionSlot(i);
if(!mg)
@@ -6791,10 +6791,10 @@ bool ChatHandler::HandleInstanceListBindsCommand(const char* /*args*/)
Player* player = getSelectedPlayer();
if (!player) player = m_session->GetPlayer();
uint32 counter = 0;
- for(uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i)
+ for (uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i)
{
Player::BoundInstancesMap &binds = player->GetBoundInstances(i);
- for(Player::BoundInstancesMap::const_iterator itr = binds.begin(); itr != binds.end(); ++itr)
+ for (Player::BoundInstancesMap::const_iterator itr = binds.begin(); itr != binds.end(); ++itr)
{
InstanceSave *save = itr->second.save;
std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL));
@@ -6807,10 +6807,10 @@ bool ChatHandler::HandleInstanceListBindsCommand(const char* /*args*/)
Group *group = player->GetGroup();
if(group)
{
- for(uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i)
+ for (uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i)
{
Group::BoundInstancesMap &binds = group->GetBoundInstances(i);
- for(Group::BoundInstancesMap::const_iterator itr = binds.begin(); itr != binds.end(); ++itr)
+ for (Group::BoundInstancesMap::const_iterator itr = binds.begin(); itr != binds.end(); ++itr)
{
InstanceSave *save = itr->second.save;
std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL));
@@ -6835,10 +6835,10 @@ bool ChatHandler::HandleInstanceUnbindCommand(const char* args)
Player* player = getSelectedPlayer();
if (!player) player = m_session->GetPlayer();
uint32 counter = 0;
- for(uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i)
+ for (uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i)
{
Player::BoundInstancesMap &binds = player->GetBoundInstances(i);
- for(Player::BoundInstancesMap::iterator itr = binds.begin(); itr != binds.end();)
+ for (Player::BoundInstancesMap::iterator itr = binds.begin(); itr != binds.end(); )
{
if(itr->first != player->GetMapId())
{
@@ -7102,7 +7102,7 @@ bool ChatHandler::HandleSendItemsCommand(const char* args)
// fill mail
MailItemsInfo mi; // item list preparing
- for(ItemPairs::const_iterator itr = items.begin(); itr != items.end(); ++itr)
+ for (ItemPairs::const_iterator itr = items.begin(); itr != items.end(); ++itr)
{
if(Item* item = Item::CreateItem(itr->first,itr->second,m_session ? m_session->GetPlayer() : 0))
{
diff --git a/src/game/LootHandler.cpp b/src/game/LootHandler.cpp
index e4ee8bffc6f..de464cf050e 100644
--- a/src/game/LootHandler.cpp
+++ b/src/game/LootHandler.cpp
@@ -217,7 +217,7 @@ void WorldSession::HandleLootMoneyOpcode( WorldPacket & /*recv_data*/ )
Group *group = player->GetGroup();
std::vector<Player*> playersNear;
- for(GroupReference *itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* playerGroup = itr->getSource();
if(!playerGroup)
@@ -511,7 +511,6 @@ void WorldSession::HandleLootMasterGiveOpcode( WorldPacket & recv_data )
item.count=0;
item.is_looted=true;
-
pLoot->NotifyItemRemoved(slotid);
--pLoot->unlootedCount;
}
diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp
index df11d909dd0..29c19a4eecf 100644
--- a/src/game/LootMgr.cpp
+++ b/src/game/LootMgr.cpp
@@ -50,7 +50,6 @@ LootStore LootTemplates_Reference( "reference_loot_template", "reference i
LootStore LootTemplates_Skinning( "skinning_loot_template", "creature skinning id", true);
LootStore LootTemplates_Spell( "spell_loot_template", "spell id (random item creating)",false);
-
class LootTemplate::LootGroup // A set of loot definitions for items (refs are not allowed)
{
public:
@@ -128,7 +127,6 @@ void LootStore::LoadLootTable()
continue; // error already printed to log/console.
}
-
if(!PlayerCondition::IsValid(condition,cond_value1, cond_value2))
{
sLog.outErrorDb("... in table '%s' entry %u item %u", GetName(), entry, item);
@@ -212,20 +210,20 @@ void LootStore::LoadAndCollectLootIds(LootIdSet& ids_set)
{
LoadLootTable();
- for(LootTemplateMap::const_iterator tab = m_LootTemplates.begin(); tab != m_LootTemplates.end(); ++tab)
+ for (LootTemplateMap::const_iterator tab = m_LootTemplates.begin(); tab != m_LootTemplates.end(); ++tab)
ids_set.insert(tab->first);
}
void LootStore::CheckLootRefs(LootIdSet* ref_set) const
{
- for(LootTemplateMap::const_iterator ltItr = m_LootTemplates.begin(); ltItr != m_LootTemplates.end(); ++ltItr)
+ for (LootTemplateMap::const_iterator ltItr = m_LootTemplates.begin(); ltItr != m_LootTemplates.end(); ++ltItr)
ltItr->second->CheckLootRefs(m_LootTemplates,ref_set);
}
void LootStore::ReportUnusedIds(LootIdSet const& ids_set) const
{
// all still listed ids isn't referenced
- for(LootIdSet::const_iterator itr = ids_set.begin(); itr != ids_set.end(); ++itr)
+ for (LootIdSet::const_iterator itr = ids_set.begin(); itr != ids_set.end(); ++itr)
sLog.outErrorDb("Table '%s' entry %d isn't %s and not referenced from loot, and then useless.", GetName(), *itr,GetEntryName());
}
@@ -412,7 +410,7 @@ void Loot::FillLoot(uint32 loot_id, LootStore const& store, Player* loot_owner,
Group * pGroup=loot_owner->GetGroup();
if(!personal && pGroup)
{
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
if(Player* pl = itr->getSource())
FillNotNormalLootFor(pl);
}
@@ -442,7 +440,7 @@ QuestItemList* Loot::FillFFALoot(Player* player)
{
QuestItemList *ql = new QuestItemList();
- for(uint8 i = 0; i < items.size(); ++i)
+ for (uint8 i = 0; i < items.size(); ++i)
{
LootItem &item = items[i];
if(!item.is_looted && item.freeforall && item.AllowedForPlayer(player) )
@@ -466,7 +464,7 @@ QuestItemList* Loot::FillQuestLoot(Player* player)
if (items.size() == MAX_NR_LOOT_ITEMS) return NULL;
QuestItemList *ql = new QuestItemList();
- for(uint8 i = 0; i < quest_items.size(); ++i)
+ for (uint8 i = 0; i < quest_items.size(); ++i)
{
LootItem &item = quest_items[i];
if(!item.is_looted && item.AllowedForPlayer(player) )
@@ -500,7 +498,7 @@ QuestItemList* Loot::FillNonQuestNonFFAConditionalLoot(Player* player)
{
QuestItemList *ql = new QuestItemList();
- for(uint8 i = 0; i < items.size(); ++i)
+ for (uint8 i = 0; i < items.size(); ++i)
{
LootItem &item = items[i];
if(!item.is_looted && !item.freeforall && item.conditionId && item.AllowedForPlayer(player))
@@ -530,7 +528,7 @@ void Loot::NotifyItemRemoved(uint8 lootIndex)
// notify all players that are looting this that the item was removed
// convert the index to the slot the player sees
std::set<uint64>::iterator i_next;
- for(std::set<uint64>::iterator i = PlayersLooting.begin(); i != PlayersLooting.end(); i = i_next)
+ for (std::set<uint64>::iterator i = PlayersLooting.begin(); i != PlayersLooting.end(); i = i_next)
{
i_next = i;
++i_next;
@@ -545,7 +543,7 @@ void Loot::NotifyMoneyRemoved()
{
// notify all players that are looting this that the money was removed
std::set<uint64>::iterator i_next;
- for(std::set<uint64>::iterator i = PlayersLooting.begin(); i != PlayersLooting.end(); i = i_next)
+ for (std::set<uint64>::iterator i = PlayersLooting.begin(); i != PlayersLooting.end(); i = i_next)
{
i_next = i;
++i_next;
@@ -564,7 +562,7 @@ void Loot::NotifyQuestItemRemoved(uint8 questIndex)
// bit inefficient but isn't called often
std::set<uint64>::iterator i_next;
- for(std::set<uint64>::iterator i = PlayersLooting.begin(); i != PlayersLooting.end(); i = i_next)
+ for (std::set<uint64>::iterator i = PlayersLooting.begin(); i != PlayersLooting.end(); i = i_next)
{
i_next = i;
++i_next;
@@ -629,7 +627,7 @@ LootItem* Loot::LootItemInSlot(uint32 lootSlot, Player* player, QuestItem **qite
QuestItemMap::const_iterator itr = PlayerFFAItems.find(player->GetGUIDLow());
if (itr != PlayerFFAItems.end())
{
- for(QuestItemList::const_iterator iter=itr->second->begin(); iter!= itr->second->end(); ++iter)
+ for (QuestItemList::const_iterator iter=itr->second->begin(); iter!= itr->second->end(); ++iter)
if(iter->index==lootSlot)
{
QuestItem *ffaitem2 = (QuestItem*)&(*iter);
@@ -645,7 +643,7 @@ LootItem* Loot::LootItemInSlot(uint32 lootSlot, Player* player, QuestItem **qite
QuestItemMap::const_iterator itr = PlayerNonQuestNonFFAConditionalItems.find(player->GetGUIDLow());
if (itr != PlayerNonQuestNonFFAConditionalItems.end())
{
- for(QuestItemList::const_iterator iter=itr->second->begin(); iter!= itr->second->end(); ++iter)
+ for (QuestItemList::const_iterator iter=itr->second->begin(); iter!= itr->second->end(); ++iter)
{
if(iter->index==lootSlot)
{
@@ -1059,7 +1057,7 @@ void LootTemplate::Verify(LootStore const& lootstore, uint32 id) const
void LootTemplate::CheckLootRefs(LootTemplateMap const& store, LootIdSet* ref_set) const
{
- for(LootStoreItemList::const_iterator ieItr = Entries.begin(); ieItr != Entries.end(); ++ieItr)
+ for (LootStoreItemList::const_iterator ieItr = Entries.begin(); ieItr != Entries.end(); ++ieItr)
{
if(ieItr->mincountOrRef < 0)
{
@@ -1070,7 +1068,7 @@ void LootTemplate::CheckLootRefs(LootTemplateMap const& store, LootIdSet* ref_se
}
}
- for(LootGroups::const_iterator grItr = Groups.begin(); grItr != Groups.end(); ++grItr)
+ for (LootGroups::const_iterator grItr = Groups.begin(); grItr != Groups.end(); ++grItr)
grItr->CheckLootRefs(store,ref_set);
}
@@ -1080,7 +1078,7 @@ void LoadLootTemplates_Creature()
LootTemplates_Creature.LoadAndCollectLootIds(ids_set);
// remove real entries and check existence loot
- for(uint32 i = 1; i < sCreatureStorage.MaxEntry; ++i )
+ for (uint32 i = 1; i < sCreatureStorage.MaxEntry; ++i )
{
if(CreatureInfo const* cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(i))
{
@@ -1093,7 +1091,7 @@ void LoadLootTemplates_Creature()
}
}
}
- for(LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr)
+ for (LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr)
ids_set.erase(*itr);
// output error for any still listed (not referenced from appropriate table) ids
@@ -1106,7 +1104,7 @@ void LoadLootTemplates_Disenchant()
LootTemplates_Disenchant.LoadAndCollectLootIds(ids_set);
// remove real entries and check existence loot
- for(uint32 i = 1; i < sItemStorage.MaxEntry; ++i )
+ for (uint32 i = 1; i < sItemStorage.MaxEntry; ++i )
{
if(ItemPrototype const* proto = sItemStorage.LookupEntry<ItemPrototype>(i))
{
@@ -1119,7 +1117,7 @@ void LoadLootTemplates_Disenchant()
}
}
}
- for(LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr)
+ for (LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr)
ids_set.erase(*itr);
// output error for any still listed (not referenced from appropriate table) ids
LootTemplates_Disenchant.ReportUnusedIds(ids_set);
@@ -1131,7 +1129,7 @@ void LoadLootTemplates_Fishing()
LootTemplates_Fishing.LoadAndCollectLootIds(ids_set);
// remove real entries and check existence loot
- for(uint32 i = 1; i < sAreaStore.GetNumRows(); ++i )
+ for (uint32 i = 1; i < sAreaStore.GetNumRows(); ++i )
{
if(AreaTableEntry const* areaEntry = sAreaStore.LookupEntry(i))
if(ids_set.count(areaEntry->ID))
@@ -1148,7 +1146,7 @@ void LoadLootTemplates_Gameobject()
LootTemplates_Gameobject.LoadAndCollectLootIds(ids_set);
// remove real entries and check existence loot
- for(uint32 i = 1; i < sGOStorage.MaxEntry; ++i )
+ for (uint32 i = 1; i < sGOStorage.MaxEntry; ++i )
{
if(GameObjectInfo const* gInfo = sGOStorage.LookupEntry<GameObjectInfo>(i))
{
@@ -1161,7 +1159,7 @@ void LoadLootTemplates_Gameobject()
}
}
}
- for(LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr)
+ for (LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr)
ids_set.erase(*itr);
// output error for any still listed (not referenced from appropriate table) ids
@@ -1174,7 +1172,7 @@ void LoadLootTemplates_Item()
LootTemplates_Item.LoadAndCollectLootIds(ids_set);
// remove real entries and check existence loot
- for(uint32 i = 1; i < sItemStorage.MaxEntry; ++i )
+ for (uint32 i = 1; i < sItemStorage.MaxEntry; ++i )
if(ItemPrototype const* proto = sItemStorage.LookupEntry<ItemPrototype>(i))
if(ids_set.count(proto->ItemId))
ids_set.erase(proto->ItemId);
@@ -1189,7 +1187,7 @@ void LoadLootTemplates_Milling()
LootTemplates_Milling.LoadAndCollectLootIds(ids_set);
// remove real entries and check existence loot
- for(uint32 i = 1; i < sItemStorage.MaxEntry; ++i )
+ for (uint32 i = 1; i < sItemStorage.MaxEntry; ++i )
{
ItemPrototype const* proto = sItemStorage.LookupEntry<ItemPrototype>(i);
if(!proto)
@@ -1212,7 +1210,7 @@ void LoadLootTemplates_Pickpocketing()
LootTemplates_Pickpocketing.LoadAndCollectLootIds(ids_set);
// remove real entries and check existence loot
- for(uint32 i = 1; i < sCreatureStorage.MaxEntry; ++i )
+ for (uint32 i = 1; i < sCreatureStorage.MaxEntry; ++i )
{
if(CreatureInfo const* cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(i))
{
@@ -1225,7 +1223,7 @@ void LoadLootTemplates_Pickpocketing()
}
}
}
- for(LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr)
+ for (LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr)
ids_set.erase(*itr);
// output error for any still listed (not referenced from appropriate table) ids
@@ -1238,7 +1236,7 @@ void LoadLootTemplates_Prospecting()
LootTemplates_Prospecting.LoadAndCollectLootIds(ids_set);
// remove real entries and check existence loot
- for(uint32 i = 1; i < sItemStorage.MaxEntry; ++i )
+ for (uint32 i = 1; i < sItemStorage.MaxEntry; ++i )
{
ItemPrototype const* proto = sItemStorage.LookupEntry<ItemPrototype>(i);
if(!proto)
@@ -1262,7 +1260,7 @@ void LoadLootTemplates_QuestMail()
// remove real entries and check existence loot
ObjectMgr::QuestMap const& questMap = objmgr.GetQuestTemplates();
- for(ObjectMgr::QuestMap::const_iterator itr = questMap.begin(); itr != questMap.end(); ++itr )
+ for (ObjectMgr::QuestMap::const_iterator itr = questMap.begin(); itr != questMap.end(); ++itr )
{
if(!itr->second->GetRewMailTemplateId())
continue;
@@ -1285,7 +1283,7 @@ void LoadLootTemplates_Skinning()
LootTemplates_Skinning.LoadAndCollectLootIds(ids_set);
// remove real entries and check existence loot
- for(uint32 i = 1; i < sCreatureStorage.MaxEntry; ++i )
+ for (uint32 i = 1; i < sCreatureStorage.MaxEntry; ++i )
{
if(CreatureInfo const* cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(i))
{
@@ -1298,7 +1296,7 @@ void LoadLootTemplates_Skinning()
}
}
}
- for(LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr)
+ for (LootIdSet::const_iterator itr = ids_setUsed.begin(); itr != ids_setUsed.end(); ++itr)
ids_set.erase(*itr);
// output error for any still listed (not referenced from appropriate table) ids
@@ -1311,7 +1309,7 @@ void LoadLootTemplates_Spell()
LootTemplates_Spell.LoadAndCollectLootIds(ids_set);
// remove real entries and check existence loot
- for(uint32 spell_id = 1; spell_id < sSpellStore.GetNumRows(); ++spell_id)
+ for (uint32 spell_id = 1; spell_id < sSpellStore.GetNumRows(); ++spell_id)
{
SpellEntry const* spellInfo = sSpellStore.LookupEntry (spell_id);
if(!spellInfo)
diff --git a/src/game/Mail.cpp b/src/game/Mail.cpp
index c50b16104f2..16f337136ea 100644
--- a/src/game/Mail.cpp
+++ b/src/game/Mail.cpp
@@ -85,7 +85,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data )
if(items_count)
{
- for(uint8 i = 0; i < items_count; ++i)
+ for (uint8 i = 0; i < items_count; ++i)
{
uint8 item_slot;
uint64 item_guid;
@@ -178,7 +178,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data )
if (items_count)
{
- for(MailItemMap::iterator mailItemIter = mi.begin(); mailItemIter != mi.end(); ++mailItemIter)
+ for (MailItemMap::iterator mailItemIter = mi.begin(); mailItemIter != mi.end(); ++mailItemIter)
{
MailItem& mailItem = mailItemIter->second;
@@ -238,7 +238,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data )
{
if (items_count > 0)
{
- for(MailItemMap::iterator mailItemIter = mi.begin(); mailItemIter != mi.end(); ++mailItemIter)
+ for (MailItemMap::iterator mailItemIter = mi.begin(); mailItemIter != mi.end(); ++mailItemIter)
{
MailItem& mailItem = mailItemIter->second;
if(!mailItem.item)
@@ -365,7 +365,7 @@ void WorldSession::HandleMailReturnToSender(WorldPacket & recv_data )
if(m->HasItems())
{
- for(std::vector<MailItemInfo>::iterator itr2 = m->items.begin(); itr2 != m->items.end(); ++itr2)
+ for (std::vector<MailItemInfo>::iterator itr2 = m->items.begin(); itr2 != m->items.end(); ++itr2)
{
Item *item = pl->GetMItem(itr2->item_guid);
if(item)
@@ -422,7 +422,7 @@ void WorldSession::SendReturnToSender(uint8 messageType, uint32 sender_acc, uint
// set owner to new receiver (to prevent delete item with sender char deleting)
CharacterDatabase.BeginTransaction();
- for(MailItemMap::iterator mailItemIter = mi->begin(); mailItemIter != mi->end(); ++mailItemIter)
+ for (MailItemMap::iterator mailItemIter = mi->begin(); mailItemIter != mi->end(); ++mailItemIter)
{
MailItem& mailItem = mailItemIter->second;
mailItem.item->SaveToDB(); // item not in inventory and can be save standalone
@@ -590,7 +590,7 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data )
data << uint8(0); // mail's count
time_t cur_time = time(NULL);
- for(PlayerMails::iterator itr = pl->GetmailBegin(); itr != pl->GetmailEnd(); ++itr)
+ for (PlayerMails::iterator itr = pl->GetmailBegin(); itr != pl->GetmailEnd(); ++itr)
{
// skip deleted or not delivered (deliver delay not expired) mails
if ((*itr)->state == MAIL_STATE_DELETED || cur_time < (*itr)->deliver_time)
@@ -642,7 +642,7 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data )
data << (uint8) item_count; // client limit is 0x10
- for(uint8 i = 0; i < item_count; ++i)
+ for (uint8 i = 0; i < item_count; ++i)
{
Item *item = pl->GetMItem((*itr)->items[i].item_guid);
// item index (0-6?)
@@ -651,7 +651,7 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data )
data << (uint32) (item ? item->GetGUIDLow() : 0);
// entry
data << (uint32) (item ? item->GetEntry() : 0);
- for(uint8 j = 0; j < MAX_INSPECTED_ENCHANTMENT_SLOT; ++j)
+ for (uint8 j = 0; j < MAX_INSPECTED_ENCHANTMENT_SLOT; ++j)
{
// unsure
data << (uint32) (item ? item->GetEnchantmentCharges((EnchantmentSlot)j) : 0);
@@ -771,7 +771,7 @@ void WorldSession::HandleQueryNextMailTime(WorldPacket & /*recv_data*/ )
uint32 count = 0;
time_t now = time(NULL);
- for(PlayerMails::iterator itr = _player->GetmailBegin(); itr != _player->GetmailEnd(); ++itr)
+ for (PlayerMails::iterator itr = _player->GetmailBegin(); itr != _player->GetmailEnd(); ++itr)
{
Mail *m = (*itr);
// must be not checked yet
@@ -872,7 +872,7 @@ void WorldSession::SendMailTo(Player* receiver, uint8 messageType, uint8 station
if(mi)
{
- for(MailItemMap::iterator mailItemIter = mi->begin(); mailItemIter != mi->end(); ++mailItemIter)
+ for (MailItemMap::iterator mailItemIter = mi->begin(); mailItemIter != mi->end(); ++mailItemIter)
{
MailItem& mailItem = mailItemIter->second;
if(mailItem.item)
@@ -894,7 +894,7 @@ void WorldSession::SendMailTo(Player* receiver, uint8 messageType, uint8 station
if(mi)
{
- for(MailItemMap::const_iterator mailItemIter = mi->begin(); mailItemIter != mi->end(); ++mailItemIter)
+ for (MailItemMap::const_iterator mailItemIter = mi->begin(); mailItemIter != mi->end(); ++mailItemIter)
{
MailItem const& mailItem = mailItemIter->second;
CharacterDatabase.PExecute("INSERT INTO mail_items (mail_id,item_guid,item_template,receiver) VALUES ('%u', '%u', '%u','%u')", mailId, mailItem.item_guidlow, mailItem.item_template,receiver_guidlow);
diff --git a/src/game/Mail.h b/src/game/Mail.h
index 8cbe46e6396..8107f879e6a 100644
--- a/src/game/Mail.h
+++ b/src/game/Mail.h
@@ -126,7 +126,7 @@ class MailItemsInfo
void deleteIncludedItems(bool inDB = false)
{
- for(MailItemMap::iterator mailItemIter = begin(); mailItemIter != end(); ++mailItemIter)
+ for (MailItemMap::iterator mailItemIter = begin(); mailItemIter != end(); ++mailItemIter)
{
MailItem& mailItem = mailItemIter->second;
mailItem.deleteItem(inDB);
@@ -165,7 +165,7 @@ struct Mail
void AddAllItems(MailItemsInfo& pMailItemsInfo)
{
- for(MailItemMap::iterator mailItemIter = pMailItemsInfo.begin(); mailItemIter != pMailItemsInfo.end(); ++mailItemIter)
+ for (MailItemMap::iterator mailItemIter = pMailItemsInfo.begin(); mailItemIter != pMailItemsInfo.end(); ++mailItemIter)
{
MailItem& mailItem = mailItemIter->second;
AddItem(mailItem.item_guidlow, mailItem.item_template);
@@ -174,7 +174,7 @@ struct Mail
bool RemoveItem(uint32 item_guid)
{
- for(std::vector<MailItemInfo>::iterator itr = items.begin(); itr != items.end(); ++itr)
+ for (std::vector<MailItemInfo>::iterator itr = items.begin(); itr != items.end(); ++itr)
{
if(itr->item_guid == item_guid)
{
diff --git a/src/game/Map.cpp b/src/game/Map.cpp
index 2f8c4d0e152..2c9030a4608 100644
--- a/src/game/Map.cpp
+++ b/src/game/Map.cpp
@@ -217,20 +217,20 @@ Map::Map(uint32 id, time_t expiry, uint32 InstanceId, uint8 SpawnMode, Map* _par
{
m_notifyTimer.SetInterval(IN_MILISECONDS/2);
- for(unsigned int idx=0; idx < MAX_NUMBER_OF_GRIDS; ++idx)
+ for (unsigned int idx=0; idx < MAX_NUMBER_OF_GRIDS; ++idx)
{
- for(unsigned int j=0; j < MAX_NUMBER_OF_GRIDS; ++j)
+ for (unsigned int j=0; j < MAX_NUMBER_OF_GRIDS; ++j)
{
//z code
GridMaps[idx][j] =NULL;
setNGrid(NULL, idx, j);
}
}
-
+
//lets initialize visibility distance for map
Map::InitVisibilityDistance();
}
-
+
void Map::InitVisibilityDistance()
{
//init visibility for continents
@@ -501,43 +501,43 @@ Map::Add(T *obj)
void Map::MessageBroadcast(Player *player, WorldPacket *msg, bool to_self)
{
CellPair p = MaNGOS::ComputeCellPair(player->GetPositionX(), player->GetPositionY());
-
+
if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP )
{
sLog.outError("Map::MessageBroadcast: Player (GUID: %u) have invalid coordinates X:%f Y:%f grid cell [%u:%u]", player->GetGUIDLow(), player->GetPositionX(), player->GetPositionY(), p.x_coord, p.y_coord);
return;
}
-
+
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
-
+
if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) )
return;
-
+
MaNGOS::MessageDeliverer post_man(*player, msg, to_self);
TypeContainerVisitor<MaNGOS::MessageDeliverer, WorldTypeMapContainer > message(post_man);
CellLock<ReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, message, *this, *player, GetVisibilityDistance());
}
-
+
void Map::MessageBroadcast(WorldObject *obj, WorldPacket *msg)
{
CellPair p = MaNGOS::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
-
+
if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP )
{
sLog.outError("Map::MessageBroadcast: Object (GUID: %u TypeId: %u) have invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUIDLow(), obj->GetTypeId(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
return;
}
-
+
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
-
+
if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) )
return;
-
+
//TODO: currently on continents when Visibility.Distance.InFlight > Visibility.Distance.Continents
//we have alot of blinking mobs because monster move packet send is broken...
MaNGOS::ObjectMessageDeliverer post_man(*obj,msg);
@@ -549,43 +549,43 @@ void Map::MessageBroadcast(WorldObject *obj, WorldPacket *msg)
void Map::MessageDistBroadcast(Player *player, WorldPacket *msg, float dist, bool to_self, bool own_team_only)
{
CellPair p = MaNGOS::ComputeCellPair(player->GetPositionX(), player->GetPositionY());
-
+
if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP )
{
sLog.outError("Map::MessageBroadcast: Player (GUID: %u) have invalid coordinates X:%f Y:%f grid cell [%u:%u]", player->GetGUIDLow(), player->GetPositionX(), player->GetPositionY(), p.x_coord, p.y_coord);
return;
}
-
+
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
-
+
if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) )
return;
-
+
MaNGOS::MessageDistDeliverer post_man(*player, msg, dist, to_self, own_team_only);
TypeContainerVisitor<MaNGOS::MessageDistDeliverer , WorldTypeMapContainer > message(post_man);
CellLock<ReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, message, *this, *player, dist);
}
-
+
void Map::MessageDistBroadcast(WorldObject *obj, WorldPacket *msg, float dist)
{
CellPair p = MaNGOS::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
-
+
if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP )
{
sLog.outError("Map::MessageBroadcast: Object (GUID: %u TypeId: %u) have invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUIDLow(), obj->GetTypeId(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
return;
}
-
+
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
-
+
if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) )
return;
-
+
MaNGOS::ObjectMessageDistDeliverer post_man(*obj, msg, dist);
TypeContainerVisitor<MaNGOS::ObjectMessageDistDeliverer, WorldTypeMapContainer > message(post_man);
CellLock<ReadGuard> cell_lock(cell, p);
@@ -603,7 +603,7 @@ void Map::RelocationNotify()
i_notifyLock = true;
//Notify
- for(std::vector<Unit*>::iterator iter = i_unitsToNotify.begin(); iter != i_unitsToNotify.end(); ++iter)
+ for (std::vector<Unit*>::iterator iter = i_unitsToNotify.begin(); iter != i_unitsToNotify.end(); ++iter)
{
Unit *unit = *iter;
if(!unit)
@@ -639,7 +639,7 @@ void Map::RelocationNotify()
VisitAll(unit->GetPositionX(), unit->GetPositionY(), GetVisibilityDistance() + dist, notifier);
}
}
- for(std::vector<Unit*>::iterator iter = i_unitsToNotify.begin(); iter != i_unitsToNotify.end(); ++iter)
+ for (std::vector<Unit*>::iterator iter = i_unitsToNotify.begin(); iter != i_unitsToNotify.end(); ++iter)
if(*iter)
(*iter)->m_Notified = false;
i_unitsToNotify.clear();
@@ -697,7 +697,7 @@ void Map::RemoveUnitFromNotify(Unit *unit)
void Map::Update(const uint32 &t_diff)
{
/// update players at tick
- for(m_mapRefIter = m_mapRefManager.begin(); m_mapRefIter != m_mapRefManager.end(); ++m_mapRefIter)
+ for (m_mapRefIter = m_mapRefManager.begin(); m_mapRefIter != m_mapRefManager.end(); ++m_mapRefIter)
{
Player* plr = m_mapRefIter->getSource();
if(plr && plr->IsInWorld())
@@ -722,7 +722,7 @@ void Map::Update(const uint32 &t_diff)
// the player iterator is stored in the map object
// to make sure calls to Map::Remove don't invalidate it
- for(m_mapRefIter = m_mapRefManager.begin(); m_mapRefIter != m_mapRefManager.end(); ++m_mapRefIter)
+ for (m_mapRefIter = m_mapRefManager.begin(); m_mapRefIter != m_mapRefManager.end(); ++m_mapRefIter)
{
Player* plr = m_mapRefIter->getSource();
@@ -742,9 +742,9 @@ void Map::Update(const uint32 &t_diff)
CellArea area = Cell::CalculateCellArea(*plr, GetVisibilityDistance());
area.ResizeBorders(begin_cell, end_cell);
- for(uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; ++x)
+ for (uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; ++x)
{
- for(uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; ++y)
+ for (uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; ++y)
{
// marked cells are those that have been visited
// don't visit the same cell twice
@@ -770,7 +770,7 @@ void Map::Update(const uint32 &t_diff)
// non-player active objects
if(!m_activeNonPlayers.empty())
{
- for(m_activeNonPlayersIter = m_activeNonPlayers.begin(); m_activeNonPlayersIter != m_activeNonPlayers.end(); )
+ for (m_activeNonPlayersIter = m_activeNonPlayers.begin(); m_activeNonPlayersIter != m_activeNonPlayers.end(); )
{
// skip not in world
WorldObject* obj = *m_activeNonPlayersIter;
@@ -794,9 +794,9 @@ void Map::Update(const uint32 &t_diff)
begin_cell << 1; begin_cell -= 1; // upper left
end_cell >> 1; end_cell += 1; // lower right
- for(uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; ++x)
+ for (uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; ++x)
{
- for(uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; ++y)
+ for (uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; ++y)
{
// marked cells are those that have been visited
// don't visit the same cell twice
@@ -974,7 +974,7 @@ Map::CreatureRelocation(Creature *creature, float x, float y, float z, float ang
if(creature->IsVehicle())
{
- for(SeatMap::iterator itr = creature->GetVehicleKit()->m_Seats.begin(); itr != creature->GetVehicleKit()->m_Seats.end(); ++itr)
+ for (SeatMap::iterator itr = creature->GetVehicleKit()->m_Seats.begin(); itr != creature->GetVehicleKit()->m_Seats.end(); ++itr)
if(Unit *passenger = itr->second.passenger)
{
if(passenger->GetTypeId() == TYPEID_PLAYER)
@@ -1204,7 +1204,7 @@ void Map::RemoveAllPlayers()
{
if(HavePlayers())
{
- for(MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
+ for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
{
Player* plr = itr->getSource();
if(!plr->IsBeingTeleportedFar())
@@ -2118,10 +2118,10 @@ void Map::UpdateObjectVisibility( WorldObject* obj, Cell cell, CellPair cellpair
void Map::UpdatePlayerVisibility( Player* player, Cell cell, CellPair cellpair )
{
cell.data.Part.reserved = ALL_DISTRICT;
-
+
MaNGOS::PlayerNotifier pl_notifier(*player);
TypeContainerVisitor<MaNGOS::PlayerNotifier, WorldTypeMapContainer > player_notifier(pl_notifier);
-
+
CellLock<ReadGuard> cell_lock(cell, cellpair);
cell_lock->Visit(cell_lock, player_notifier, *this, *player, GetVisibilityDistance());
}
@@ -2129,7 +2129,7 @@ void Map::UpdatePlayerVisibility( Player* player, Cell cell, CellPair cellpair )
void Map::UpdateObjectsVisibilityFor( Player* player, Cell cell, CellPair cellpair )
{
MaNGOS::VisibleNotifier notifier(*player);
-
+
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
TypeContainerVisitor<MaNGOS::VisibleNotifier, WorldTypeMapContainer > world_notifier(notifier);
@@ -2137,34 +2137,34 @@ void Map::UpdateObjectsVisibilityFor( Player* player, Cell cell, CellPair cellpa
CellLock<GridReadGuard> cell_lock(cell, cellpair);
cell_lock->Visit(cell_lock, world_notifier, *this, *player, GetVisibilityDistance());
cell_lock->Visit(cell_lock, grid_notifier, *this, *player, GetVisibilityDistance());
-
+
// send data
notifier.Notify();
}
-
+
void Map::PlayerRelocationNotify( Player* player, Cell cell, CellPair cellpair )
{
CellLock<ReadGuard> cell_lock(cell, cellpair);
MaNGOS::PlayerRelocationNotifier relocationNotifier(*player);
cell.data.Part.reserved = ALL_DISTRICT;
-
+
TypeContainerVisitor<MaNGOS::PlayerRelocationNotifier, GridTypeMapContainer > p2grid_relocation(relocationNotifier);
TypeContainerVisitor<MaNGOS::PlayerRelocationNotifier, WorldTypeMapContainer > p2world_relocation(relocationNotifier);
-
+
cell_lock->Visit(cell_lock, p2grid_relocation, *this, *player, MAX_CREATURE_ATTACK_RADIUS);
cell_lock->Visit(cell_lock, p2world_relocation, *this, *player, MAX_CREATURE_ATTACK_RADIUS);
}
-
+
void Map::CreatureRelocationNotify(Creature *creature, Cell cell, CellPair cellpair)
{
CellLock<ReadGuard> cell_lock(cell, cellpair);
MaNGOS::CreatureRelocationNotifier relocationNotifier(*creature);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); // not trigger load unloaded grids at notifier call
-
+
TypeContainerVisitor<MaNGOS::CreatureRelocationNotifier, WorldTypeMapContainer > c2world_relocation(relocationNotifier);
TypeContainerVisitor<MaNGOS::CreatureRelocationNotifier, GridTypeMapContainer > c2grid_relocation(relocationNotifier);
-
+
cell_lock->Visit(cell_lock, c2world_relocation, *this, *creature, MAX_CREATURE_ATTACK_RADIUS);
cell_lock->Visit(cell_lock, c2grid_relocation, *this, *creature, MAX_CREATURE_ATTACK_RADIUS);
}
@@ -2188,7 +2188,7 @@ void Map::SendInitSelf( Player * player )
// build other passengers at transport also (they always visible and marked as visible and will not send at visibility update at add to map
if(Transport* transport = player->GetTransport())
{
- for(Transport::PlayerSet::const_iterator itr = transport->GetPassengers().begin();itr!=transport->GetPassengers().end();++itr)
+ for (Transport::PlayerSet::const_iterator itr = transport->GetPassengers().begin(); itr!=transport->GetPassengers().end(); ++itr)
{
if(player!=(*itr) && player->HaveAtClient(*itr))
{
@@ -2364,7 +2364,7 @@ void Map::RemoveAllObjectsInRemoveList()
uint32 Map::GetPlayersCountExceptGMs() const
{
uint32 count = 0;
- for(MapRefManager::const_iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
+ for (MapRefManager::const_iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
if(!itr->getSource()->isGameMaster())
++count;
return count;
@@ -2372,7 +2372,7 @@ uint32 Map::GetPlayersCountExceptGMs() const
void Map::SendToPlayers(WorldPacket const* data) const
{
- for(MapRefManager::const_iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
+ for (MapRefManager::const_iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
itr->getSource()->GetSession()->SendPacket(data);
}
@@ -2380,20 +2380,20 @@ bool Map::ActiveObjectsNearGrid(uint32 x, uint32 y) const
{
ASSERT(x < MAX_NUMBER_OF_GRIDS);
ASSERT(y < MAX_NUMBER_OF_GRIDS);
-
+
CellPair cell_min(x*MAX_NUMBER_OF_CELLS, y*MAX_NUMBER_OF_CELLS);
CellPair cell_max(cell_min.x_coord + MAX_NUMBER_OF_CELLS, cell_min.y_coord+MAX_NUMBER_OF_CELLS);
-
+
//we must find visible range in cells so we unload only non-visible cells...
float viewDist = GetVisibilityDistance();
int cell_range = (int)ceilf(viewDist / SIZE_OF_GRID_CELL) + 1;
-
+
cell_min << cell_range;
cell_min -= cell_range;
cell_max >> cell_range;
cell_max += cell_range;
- for(MapRefManager::const_iterator iter = m_mapRefManager.begin(); iter != m_mapRefManager.end(); ++iter)
+ for (MapRefManager::const_iterator iter = m_mapRefManager.begin(); iter != m_mapRefManager.end(); ++iter)
{
Player* plr = iter->getSource();
@@ -2403,7 +2403,7 @@ bool Map::ActiveObjectsNearGrid(uint32 x, uint32 y) const
return true;
}
- for(ActiveNonPlayers::const_iterator iter = m_activeNonPlayers.begin(); iter != m_activeNonPlayers.end(); ++iter)
+ for (ActiveNonPlayers::const_iterator iter = m_activeNonPlayers.begin(); iter != m_activeNonPlayers.end(); ++iter)
{
WorldObject* obj = *iter;
@@ -2707,7 +2707,7 @@ bool InstanceMap::Reset(uint8 method)
if(method == INSTANCE_RESET_ALL)
{
// notify the players to leave the instance so it can be reset
- for(MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
+ for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
itr->getSource()->SendResetFailedNotify(GetId());
}
else
@@ -2715,7 +2715,7 @@ bool InstanceMap::Reset(uint8 method)
if(method == INSTANCE_RESET_GLOBAL)
{
// set the homebind timer for players inside (1 minute)
- for(MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
+ for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
itr->getSource()->m_InstanceValid = false;
}
@@ -2749,7 +2749,7 @@ void InstanceMap::PermBindAllPlayers(Player *player)
Group *group = player->GetGroup();
// group members outside the instance group don't get bound
- for(MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
+ for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
{
Player* plr = itr->getSource();
// players inside an instance cannot be bound to other instances
@@ -2781,7 +2781,7 @@ void InstanceMap::UnloadAll()
void InstanceMap::SendResetWarnings(uint32 timeLeft) const
{
- for(MapRefManager::const_iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
+ for (MapRefManager::const_iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
itr->getSource()->SendInstanceResetWarning(GetId(), itr->getSource()->GetDifficulty(), timeLeft);
}
@@ -2870,7 +2870,7 @@ void BattleGroundMap::RemoveAllPlayers()
{
if(HavePlayers())
{
- for(MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
+ for (MapRefManager::iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr)
{
Player* plr = itr->getSource();
if(!plr->IsBeingTeleportedFar())
diff --git a/src/game/Map.h b/src/game/Map.h
index a8d94d350e7..5bd7e4d4c30 100644
--- a/src/game/Map.h
+++ b/src/game/Map.h
@@ -52,7 +52,6 @@ struct ScriptInfo;
struct ScriptAction;
struct Position;
-
typedef ACE_RW_Thread_Mutex GridRWLock;
template<class MUTEX, class LOCK_TYPE>
@@ -289,7 +288,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
void MessageDistBroadcast(Player *, WorldPacket *, float dist, bool to_self, bool own_team_only = false);
void MessageDistBroadcast(WorldObject *, WorldPacket *, float dist);
*/
-
+
float GetVisibilityDistance() const { return m_VisibleDistance; }
//function for setting up visibility distance for maps on per-type/per-Id basis
virtual void InitVisibilityDistance();
@@ -517,7 +516,6 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
ActiveNonPlayers m_activeNonPlayers;
ActiveNonPlayers::iterator m_activeNonPlayersIter;
-
private:
time_t i_gridExpiry;
diff --git a/src/game/MapManager.cpp b/src/game/MapManager.cpp
index 0da5b19eb93..55d20c3f762 100644
--- a/src/game/MapManager.cpp
+++ b/src/game/MapManager.cpp
@@ -50,10 +50,10 @@ MapManager::MapManager() : i_gridCleanUpDelay(sWorld.getConfig(CONFIG_INTERVAL_G
MapManager::~MapManager()
{
- for(MapMapType::iterator iter=i_maps.begin(); iter != i_maps.end(); ++iter)
+ for (MapMapType::iterator iter=i_maps.begin(); iter != i_maps.end(); ++iter)
delete iter->second;
- for(TransportSet::iterator i = m_Transports.begin(); i != m_Transports.end(); ++i)
+ for (TransportSet::iterator i = m_Transports.begin(); i != m_Transports.end(); ++i)
delete *i;
Map::DeleteStateMachine();
@@ -66,7 +66,7 @@ MapManager::Initialize()
// debugging code, should be deleted some day
{
- for(int i=0;i<MAX_GRID_STATE; i++)
+ for (int i=0; i<MAX_GRID_STATE; i++)
{
i_GridStates[i] = si_GridStates[i];
}
@@ -78,7 +78,7 @@ MapManager::Initialize()
void MapManager::InitializeVisibilityDistanceInfo()
{
- for(MapMapType::iterator iter=i_maps.begin(); iter != i_maps.end(); ++iter)
+ for (MapMapType::iterator iter=i_maps.begin(); iter != i_maps.end(); ++iter)
(*iter).second->InitVisibilityDistance();
}
@@ -86,7 +86,7 @@ void MapManager::InitializeVisibilityDistanceInfo()
void MapManager::checkAndCorrectGridStatesArray()
{
bool ok = true;
- for(int i=0;i<MAX_GRID_STATE; i++)
+ for (int i=0; i<MAX_GRID_STATE; i++)
{
if(i_GridStates[i] != si_GridStates[i])
{
@@ -262,14 +262,14 @@ MapManager::Update(uint32 diff)
MapMapType::iterator iter;
std::vector<Map*> update_queue(i_maps.size());
int omp_set_num_threads(sWorld.getConfig(CONFIG_NUMTHREADS));
- for(iter = i_maps.begin(), i=0;iter != i_maps.end(); ++iter, i++)
+ for (iter = i_maps.begin(), i=0; iter != i_maps.end(); ++iter, i++)
update_queue[i]=iter->second;
/*
gomp in gcc <4.4 version cannot parallelise loops using random access iterators
so until gcc 4.4 isnt standard, we need the update_queue workaround
*/
#pragma omp parallel for schedule(dynamic) private(i) shared(update_queue)
- for(int32 i = 0; i < i_maps.size(); ++i)
+ for (int32 i = 0; i < i_maps.size(); ++i)
{
checkAndCorrectGridStatesArray(); // debugging code, should be deleted some day
update_queue[i]->Update(i_timer.GetCurrent());
@@ -277,14 +277,14 @@ MapManager::Update(uint32 diff)
// sLog.outError("This is thread %d out of %d threads,updating map %u",omp_get_thread_num(),omp_get_num_threads(),iter->second->GetId());
}
#else
- for(MapMapType::iterator iter=i_maps.begin(); iter != i_maps.end(); ++iter)
+ for (MapMapType::iterator iter=i_maps.begin(); iter != i_maps.end(); ++iter)
{
iter->second->Update(i_timer.GetCurrent());
sWorld.RecordTimeDiff("UpdateMap %u", iter->second->GetId());
}
#endif
- for(MapMapType::iterator iter = i_maps.begin(); iter != i_maps.end(); ++iter)
+ for (MapMapType::iterator iter = i_maps.begin(); iter != i_maps.end(); ++iter)
iter->second->DelayedUpdate(i_timer.GetCurrent());
ObjectAccessor::Instance().Update(i_timer.GetCurrent());
@@ -302,13 +302,13 @@ void MapManager::DoDelayedMovesAndRemoves()
int i =0;
std::vector<Map*> update_queue(i_maps.size());
MapMapType::iterator iter;
- for(iter = i_maps.begin();iter != i_maps.end(); ++iter, i++)
+ for (iter = i_maps.begin(); iter != i_maps.end(); ++iter, i++)
update_queue[i] = iter->second;
omp_set_num_threads(sWorld.getConfig(CONFIG_NUMTHREADS));
-
+
#pragma omp parallel for schedule(dynamic) private(i) shared(update_queue)
- for(i=0;i<i_maps.size();i++)
+ for (i=0; i<i_maps.size(); i++)
update_queue[i]->DoDelayedMovesAndRemoves();
*/
}
@@ -332,7 +332,7 @@ bool MapManager::IsValidMAP(uint32 mapid)
void MapManager::UnloadAll()
{
- for(MapMapType::iterator iter=i_maps.begin(); iter != i_maps.end(); ++iter)
+ for (MapMapType::iterator iter=i_maps.begin(); iter != i_maps.end(); ++iter)
iter->second->UnloadAll();
while(!i_maps.empty())
@@ -357,12 +357,12 @@ void MapManager::InitMaxInstanceId()
uint32 MapManager::GetNumInstances()
{
uint32 ret = 0;
- for(MapMapType::iterator itr = i_maps.begin(); itr != i_maps.end(); ++itr)
+ for (MapMapType::iterator itr = i_maps.begin(); itr != i_maps.end(); ++itr)
{
Map *map = itr->second;
if(!map->Instanceable()) continue;
MapInstanced::InstancedMaps &maps = ((MapInstanced *)map)->GetInstancedMaps();
- for(MapInstanced::InstancedMaps::iterator mitr = maps.begin(); mitr != maps.end(); ++mitr)
+ for (MapInstanced::InstancedMaps::iterator mitr = maps.begin(); mitr != maps.end(); ++mitr)
if(mitr->second->IsDungeon()) ret++;
}
return ret;
@@ -371,12 +371,12 @@ uint32 MapManager::GetNumInstances()
uint32 MapManager::GetNumPlayersInInstances()
{
uint32 ret = 0;
- for(MapMapType::iterator itr = i_maps.begin(); itr != i_maps.end(); ++itr)
+ for (MapMapType::iterator itr = i_maps.begin(); itr != i_maps.end(); ++itr)
{
Map *map = itr->second;
if(!map->Instanceable()) continue;
MapInstanced::InstancedMaps &maps = ((MapInstanced *)map)->GetInstancedMaps();
- for(MapInstanced::InstancedMaps::iterator mitr = maps.begin(); mitr != maps.end(); ++mitr)
+ for (MapInstanced::InstancedMaps::iterator mitr = maps.begin(); mitr != maps.end(); ++mitr)
if(mitr->second->IsDungeon())
ret += ((InstanceMap*)mitr->second)->GetPlayers().getSize();
}
diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp
index 56070f27e19..e568deae695 100644
--- a/src/game/MiscHandler.cpp
+++ b/src/game/MiscHandler.cpp
@@ -169,7 +169,7 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
if(zones_count > 10)
return; // can't be received from real client or broken packet
- for(uint32 i = 0; i < zones_count; ++i)
+ for (uint32 i = 0; i < zones_count; ++i)
{
uint32 temp;
recv_data >> temp; // zone id, 0 if zone is unknown...
@@ -185,7 +185,7 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
sLog.outDebug("Minlvl %u, maxlvl %u, name %s, guild %s, racemask %u, classmask %u, zones %u, strings %u", level_min, level_max, player_name.c_str(), guild_name.c_str(), racemask, classmask, zones_count, str_count);
std::wstring str[4]; // 4 is client limit
- for(uint32 i = 0; i < str_count; ++i)
+ for (uint32 i = 0; i < str_count; ++i)
{
std::string temp;
recv_data >> temp; // user entered string, it used as universal search pattern(guild+player name)?
@@ -221,7 +221,7 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
//TODO: Guard Player map
HashMapHolder<Player>::MapType& m = ObjectAccessor::Instance().GetPlayers();
- for(HashMapHolder<Player>::MapType::const_iterator itr = m.begin(); itr != m.end(); ++itr)
+ for (HashMapHolder<Player>::MapType::const_iterator itr = m.begin(); itr != m.end(); ++itr)
{
if (security == SEC_PLAYER)
{
@@ -260,7 +260,7 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
uint32 pzoneid = itr->second->GetZoneId();
bool z_show = true;
- for(uint32 i = 0; i < zones_count; ++i)
+ for (uint32 i = 0; i < zones_count; ++i)
{
if(zoneids[i] == pzoneid)
{
@@ -296,7 +296,7 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
aname = areaEntry->area_name[GetSessionDbcLocale()];
bool s_show = true;
- for(uint32 i = 0; i < str_count; ++i)
+ for (uint32 i = 0; i < str_count; ++i)
{
if (!str[i].empty())
{
@@ -1177,8 +1177,8 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recv_data)
return;
uint32 talent_points = 0x47;
- uint32 guid_size = plr->GetPackGUID().wpos();
- WorldPacket data(SMSG_INSPECT_TALENT, guid_size+4+talent_points);
+ uint32 guid_size = plr->GetPackGUID().wpos();
+ WorldPacket data(SMSG_INSPECT_TALENT, guid_size+4+talent_points);
data.append(plr->GetPackGUID());
if(sWorld.getConfig(CONFIG_TALENTS_INSPECTING) || _player->isGameMaster())
diff --git a/src/game/MotionMaster.cpp b/src/game/MotionMaster.cpp
index e32fffaa8ac..626440f8d1e 100644
--- a/src/game/MotionMaster.cpp
+++ b/src/game/MotionMaster.cpp
@@ -530,11 +530,11 @@ void MotionMaster::MoveRotate(uint32 time, RotateDirection direction)
void MotionMaster::propagateSpeedChange()
{
/*Impl::container_type::iterator it = Impl::c.begin();
- for ( ;it != end(); ++it)
+ for (; it != end(); ++it)
{
(*it)->unitSpeedChanged();
}*/
- for(int i = 0; i <= i_top; ++i)
+ for (int i = 0; i <= i_top; ++i)
{
if(Impl[i])
Impl[i]->unitSpeedChanged();
@@ -585,7 +585,7 @@ bool MotionMaster::GetDestination(float &x, float &y, float &z)
{
if(empty())
return false;
-
+
return top()->GetDestination(x,y,z);
}
diff --git a/src/game/MotionMaster.h b/src/game/MotionMaster.h
index c6755bfa167..8923950fe7e 100644
--- a/src/game/MotionMaster.h
+++ b/src/game/MotionMaster.h
@@ -98,7 +98,7 @@ class TRINITY_DLL_SPEC MotionMaster //: private std::stack<MovementGenerator *>
explicit MotionMaster(Unit *unit) : i_owner(unit), m_expList(NULL), m_cleanFlag(MMCF_NONE), i_top(-1)
{
- for(uint8 i = 0; i < MAX_MOTION_SLOT; ++i)
+ for (uint8 i = 0; i < MAX_MOTION_SLOT; ++i)
{
Impl[i] = NULL;
needInit[i] = true;
diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp
index e3cc490adb4..e29fde825c3 100644
--- a/src/game/MovementHandler.cpp
+++ b/src/game/MovementHandler.cpp
@@ -486,7 +486,7 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data)
else
{
sLog.outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is " UI64FMTD " and should be " UI64FMTD, guid, _player->m_mover->GetGUID());
- GetPlayer()->SetMover(GetPlayer());
+ GetPlayer()->SetMover(GetPlayer());
}
}
diff --git a/src/game/NPCHandler.cpp b/src/game/NPCHandler.cpp
index 4e15fd77595..57f9391176c 100644
--- a/src/game/NPCHandler.cpp
+++ b/src/game/NPCHandler.cpp
@@ -154,7 +154,7 @@ void WorldSession::SendTrainerList( uint64 guid, const std::string& strTitle )
bool can_learn_primary_prof = GetPlayer()->GetFreePrimaryProfessionPoints() > 0;
uint32 count = 0;
- for(TrainerSpellMap::const_iterator itr = trainer_spells->spellList.begin(); itr != trainer_spells->spellList.end(); ++itr)
+ for (TrainerSpellMap::const_iterator itr = trainer_spells->spellList.begin(); itr != trainer_spells->spellList.end(); ++itr)
{
TrainerSpell const* tSpell = &itr->second;
diff --git a/src/game/Object.cpp b/src/game/Object.cpp
index 6c892ff1d5d..6d46834fea2 100644
--- a/src/game/Object.cpp
+++ b/src/game/Object.cpp
@@ -353,7 +353,7 @@ void Object::_BuildMovementUpdate(ByteBuffer * data, uint16 flags) const
uint32 poscount = uint32(path.Size());
*data << uint32(poscount); // points count
- for(uint32 i = 0; i < poscount; ++i)
+ for (uint32 i = 0; i < poscount; ++i)
{
*data << path.GetNodes()[i].x;
*data << path.GetNodes()[i].y;
@@ -527,7 +527,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
// 2 specialized loops for speed optimization in non-unit case
if(isType(TYPEMASK_UNIT)) // unit (creature/player) case
{
- for( uint16 index = 0; index < m_valuesCount; ++index )
+ for (uint16 index = 0; index < m_valuesCount; ++index )
{
if( updateMask->GetBit( index ) )
{
@@ -639,7 +639,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
}
else
*data << m_uint32Values[ index ];
- }
+ }
else
{
// send in current format (float as float, uint32 as uint32)
@@ -650,7 +650,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
}
else if(isType(TYPEMASK_GAMEOBJECT)) // gameobject case
{
- for( uint16 index = 0; index < m_valuesCount; ++index )
+ for (uint16 index = 0; index < m_valuesCount; ++index )
{
if( updateMask->GetBit( index ) )
{
@@ -691,7 +691,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
}
else // other objects case (no special index checks)
{
- for( uint16 index = 0; index < m_valuesCount; ++index )
+ for (uint16 index = 0; index < m_valuesCount; ++index )
{
if( updateMask->GetBit( index ) )
{
@@ -752,7 +752,7 @@ void Object::_SetUpdateBits(UpdateMask *updateMask, Player* /*target*/) const
uint32 *value = m_uint32Values;
uint32 *mirror = m_uint32Values_mirror;
- for(uint16 index = 0; index < m_valuesCount; ++index, ++value, ++mirror)
+ for (uint16 index = 0; index < m_valuesCount; ++index, ++value, ++mirror)
{
if(*mirror != *value)
updateMask->SetBit(index);
@@ -763,7 +763,7 @@ void Object::_SetCreateBits(UpdateMask *updateMask, Player* /*target*/) const
{
uint32 *value = m_uint32Values;
- for(uint16 index = 0; index < m_valuesCount; ++index, ++value)
+ for (uint16 index = 0; index < m_valuesCount; ++index, ++value)
{
if(*value)
updateMask->SetBit(index);
@@ -1551,7 +1551,7 @@ void WorldObject::MonsterYellToZone(int32 textId, uint32 language, uint64 Target
uint32 zoneid = GetZoneId();
Map::PlayerList const& pList = GetMap()->GetPlayers();
- for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
if(itr->getSource()->GetZoneId()==zoneid)
say_do(itr->getSource());
}
@@ -1783,7 +1783,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
{
// Remove Demonic Sacrifice auras (known pet)
Unit::AuraEffectList const& auraClassScripts = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
- for(Unit::AuraEffectList::const_iterator itr = auraClassScripts.begin();itr!=auraClassScripts.end();)
+ for (Unit::AuraEffectList::const_iterator itr = auraClassScripts.begin(); itr!=auraClassScripts.end(); )
{
if((*itr)->GetMiscValue()==2228)
{
@@ -1864,7 +1864,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
{
// Remove Demonic Sacrifice auras (known pet)
Unit::AuraEffectList const& auraClassScripts = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
- for(Unit::AuraEffectList::const_iterator itr = auraClassScripts.begin();itr!=auraClassScripts.end();)
+ for (Unit::AuraEffectList::const_iterator itr = auraClassScripts.begin(); itr!=auraClassScripts.end(); )
{
if((*itr)->GetMiscValue()==2228)
{
@@ -2238,7 +2238,7 @@ void WorldObject::DestroyForNearbyPlayers()
Trinity::AnyUnitInObjectRangeCheck check(this, GetMap()->GetVisibilityDistance());
Trinity::UnitListSearcher<Trinity::AnyUnitInObjectRangeCheck> searcher(this, targets, check);
VisitNearbyWorldObject(GetMap()->GetVisibilityDistance(), searcher);
- for(std::list<Unit*>::const_iterator iter = targets.begin(); iter != targets.end(); ++iter)
+ for (std::list<Unit*>::const_iterator iter = targets.begin(); iter != targets.end(); ++iter)
{
Player *plr = dynamic_cast<Player*>(*iter);
if(!plr)
@@ -2252,8 +2252,8 @@ void WorldObject::DestroyForNearbyPlayers()
if(isType(TYPEMASK_UNIT) && ((Unit*)this)->GetCharmerGUID() == plr->GetGUID()) // TODO: this is for puppet
continue;
-
- DestroyForPlayer(plr);
- plr->m_clientGUIDs.erase(GetGUID());
+
+ DestroyForPlayer(plr);
+ plr->m_clientGUIDs.erase(GetGUID());
}
}
diff --git a/src/game/ObjectAccessor.cpp b/src/game/ObjectAccessor.cpp
index 7a12b4784e4..9eaf674eaeb 100644
--- a/src/game/ObjectAccessor.cpp
+++ b/src/game/ObjectAccessor.cpp
@@ -48,7 +48,7 @@ INSTANTIATE_CLASS_MUTEX(ObjectAccessor, ACE_Thread_Mutex);
ObjectAccessor::ObjectAccessor() {}
ObjectAccessor::~ObjectAccessor()
{
- for(Player2CorpsesMapType::const_iterator itr = i_player2corpse.begin(); itr != i_player2corpse.end(); ++itr)
+ for (Player2CorpsesMapType::const_iterator itr = i_player2corpse.begin(); itr != i_player2corpse.end(); ++itr)
delete itr->second;
}
@@ -164,7 +164,7 @@ ObjectAccessor::FindPlayerByName(const char *name)
//TODO: Player Guard
HashMapHolder<Player>::MapType& m = HashMapHolder<Player>::GetContainer();
HashMapHolder<Player>::MapType::iterator iter = m.begin();
- for(; iter != m.end(); ++iter)
+ for (; iter != m.end(); ++iter)
if(iter->second->IsInWorld() && ( ::strcmp(name, iter->second->GetName()) == 0 ))
return iter->second;
return NULL;
@@ -176,7 +176,7 @@ ObjectAccessor::SaveAllPlayers()
Guard guard(*HashMapHolder<Player*>::GetLock());
HashMapHolder<Player>::MapType& m = HashMapHolder<Player>::GetContainer();
HashMapHolder<Player>::MapType::iterator itr = m.begin();
- for(; itr != m.end(); ++itr)
+ for (; itr != m.end(); ++itr)
itr->second->SaveToDB();
}
@@ -187,7 +187,7 @@ ObjectAccessor::UpdateObject(Object* obj, Player* exceptPlayer)
obj->BuildUpdate(update_players);
WorldPacket packet;
- for(UpdateDataMapType::iterator iter = update_players.begin(); iter != update_players.end(); ++iter)
+ for (UpdateDataMapType::iterator iter = update_players.begin(); iter != update_players.end(); ++iter)
{
if(iter->first == exceptPlayer)
continue;
@@ -303,7 +303,7 @@ void
ObjectAccessor::AddCorpsesToGrid(GridPair const& gridpair,GridType& grid,Map* map)
{
Guard guard(i_corpseGuard);
- for(Player2CorpsesMapType::iterator iter = i_player2corpse.begin(); iter != i_player2corpse.end(); ++iter)
+ for (Player2CorpsesMapType::iterator iter = i_player2corpse.begin(); iter != i_player2corpse.end(); ++iter)
if(iter->second->GetGrid() == gridpair)
{
// verify, if the corpse in our instance (add only corpses which are)
@@ -407,7 +407,7 @@ ObjectAccessor::Update(uint32 diff)
}
WorldPacket packet; // here we allocate a std::vector with a size of 0x10000
- for(UpdateDataMapType::iterator iter = update_players.begin(); iter != update_players.end(); ++iter)
+ for (UpdateDataMapType::iterator iter = update_players.begin(); iter != update_players.end(); ++iter)
{
iter->second.BuildPacket(&packet);
iter->first->GetSession()->SendPacket(&packet);
@@ -418,13 +418,13 @@ ObjectAccessor::Update(uint32 diff)
void
ObjectAccessor::WorldObjectChangeAccumulator::Visit(PlayerMapType &m)
{
- for(PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
+ for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
BuildPacket(iter->getSource());
if (!iter->getSource()->GetSharedVisionList().empty())
{
SharedVisionList::const_iterator it = iter->getSource()->GetSharedVisionList().begin();
- for ( ; it != iter->getSource()->GetSharedVisionList().end(); ++it)
+ for (; it != iter->getSource()->GetSharedVisionList().end(); ++it)
BuildPacket(*it);
}
}
@@ -433,12 +433,12 @@ ObjectAccessor::WorldObjectChangeAccumulator::Visit(PlayerMapType &m)
void
ObjectAccessor::WorldObjectChangeAccumulator::Visit(CreatureMapType &m)
{
- for(CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
+ for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
if (!iter->getSource()->GetSharedVisionList().empty())
{
SharedVisionList::const_iterator it = iter->getSource()->GetSharedVisionList().begin();
- for ( ; it != iter->getSource()->GetSharedVisionList().end(); ++it)
+ for (; it != iter->getSource()->GetSharedVisionList().end(); ++it)
BuildPacket(*it);
}
}
@@ -447,7 +447,7 @@ ObjectAccessor::WorldObjectChangeAccumulator::Visit(CreatureMapType &m)
void
ObjectAccessor::WorldObjectChangeAccumulator::Visit(DynamicObjectMapType &m)
{
- for(DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
+ for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
uint64 guid = iter->getSource()->GetCasterGUID();
if(IS_PLAYER_GUID(guid))
diff --git a/src/game/ObjectAccessor.h b/src/game/ObjectAccessor.h
index 655b44b98f2..67ef5efef89 100644
--- a/src/game/ObjectAccessor.h
+++ b/src/game/ObjectAccessor.h
@@ -133,7 +133,6 @@ class MANGOS_DLL_DECL ObjectAccessor : public MaNGOS::Singleton<ObjectAccessor,
return GetObjectInWorld(guid, ((Unit*)NULL));
}
-
template<class T> static T* GetObjectInWorld(uint32 mapid, float x, float y, uint64 guid, T* /*fake*/)
{
T* obj = HashMapHolder<T>::Find(guid);
diff --git a/src/game/ObjectGridLoader.cpp b/src/game/ObjectGridLoader.cpp
index 6a11fe44f86..9a8d89d1120 100644
--- a/src/game/ObjectGridLoader.cpp
+++ b/src/game/ObjectGridLoader.cpp
@@ -54,7 +54,7 @@ ObjectGridRespawnMover::Visit(CreatureMapType &m)
// creature in unloading grid can have respawn point in another grid
// if it will be unloaded then it will not respawn in original grid until unload/load original grid
// move to respawn point to prevent this case. For player view in respawn grid this will be normal respawn.
- for(CreatureMapType::iterator iter = m.begin(); iter != m.end();)
+ for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); )
{
Creature * c = iter->getSource();
++iter;
@@ -124,7 +124,7 @@ void AddObjectHelper(CellPair &cell, GridRefManager<T> &m, uint32 &count, Map* m
template <class T>
void LoadHelper(CellGuidSet const& guid_set, CellPair &cell, GridRefManager<T> &m, uint32 &count, Map* map)
{
- for(CellGuidSet::const_iterator i_guid = guid_set.begin(); i_guid != guid_set.end(); ++i_guid)
+ for (CellGuidSet::const_iterator i_guid = guid_set.begin(); i_guid != guid_set.end(); ++i_guid)
{
T* obj = new T;
uint32 guid = *i_guid;
@@ -144,7 +144,7 @@ void LoadHelper(CellCorpseSet const& cell_corpses, CellPair &cell, CorpseMapType
if(cell_corpses.empty())
return;
- for(CellCorpseSet::const_iterator itr = cell_corpses.begin(); itr != cell_corpses.end(); ++itr)
+ for (CellCorpseSet::const_iterator itr = cell_corpses.begin(); itr != cell_corpses.end(); ++itr)
{
if(itr->second != map->GetInstanceId())
continue;
@@ -224,10 +224,10 @@ void ObjectGridLoader::LoadN(void)
{
i_gameObjects = 0; i_creatures = 0; i_corpses = 0;
i_cell.data.Part.cell_y = 0;
- for(unsigned int x=0; x < MAX_NUMBER_OF_CELLS; ++x)
+ for (unsigned int x=0; x < MAX_NUMBER_OF_CELLS; ++x)
{
i_cell.data.Part.cell_x = x;
- for(unsigned int y=0; y < MAX_NUMBER_OF_CELLS; ++y)
+ for (unsigned int y=0; y < MAX_NUMBER_OF_CELLS; ++y)
{
i_cell.data.Part.cell_y = y;
GridLoader<Player, AllWorldObjectTypes, AllGridObjectTypes> loader;
@@ -239,9 +239,9 @@ void ObjectGridLoader::LoadN(void)
void ObjectGridUnloader::MoveToRespawnN()
{
- for(unsigned int x=0; x < MAX_NUMBER_OF_CELLS; ++x)
+ for (unsigned int x=0; x < MAX_NUMBER_OF_CELLS; ++x)
{
- for(unsigned int y=0; y < MAX_NUMBER_OF_CELLS; ++y)
+ for (unsigned int y=0; y < MAX_NUMBER_OF_CELLS; ++y)
{
ObjectGridRespawnMover mover;
mover.Move(i_grid(x, y));
@@ -282,7 +282,7 @@ void
ObjectGridStoper::Visit(CreatureMapType &m)
{
// stop any fights at grid de-activation and remove dynobjects created at cast by creatures
- for(CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
+ for (CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
{
iter->getSource()->RemoveAllDynObjects();
if(iter->getSource()->isInCombat())
@@ -304,7 +304,7 @@ ObjectGridCleaner::Stop(GridType &grid)
void
ObjectGridCleaner::Visit(CreatureMapType &m)
{
- for(CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
+ for (CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
iter->getSource()->CleanupsBeforeDelete();
}
@@ -312,7 +312,7 @@ template<class T>
void
ObjectGridCleaner::Visit(GridRefManager<T> &m)
{
- for(typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
+ for (typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
iter->getSource()->RemoveFromWorld();
}
diff --git a/src/game/ObjectGridLoader.h b/src/game/ObjectGridLoader.h
index 768f1f994db..1b047e76653 100644
--- a/src/game/ObjectGridLoader.h
+++ b/src/game/ObjectGridLoader.h
@@ -64,9 +64,9 @@ class TRINITY_DLL_DECL ObjectGridUnloader
void MoveToRespawnN();
void UnloadN()
{
- for(unsigned int x=0; x < MAX_NUMBER_OF_CELLS; ++x)
+ for (unsigned int x=0; x < MAX_NUMBER_OF_CELLS; ++x)
{
- for(unsigned int y=0; y < MAX_NUMBER_OF_CELLS; ++y)
+ for (unsigned int y=0; y < MAX_NUMBER_OF_CELLS; ++y)
{
GridLoader<Player, AllWorldObjectTypes, AllGridObjectTypes> loader;
loader.Unload(i_grid(x, y), *this);
@@ -87,9 +87,9 @@ class TRINITY_DLL_DECL ObjectGridStoper
void StopN()
{
- for(unsigned int x=0; x < MAX_NUMBER_OF_CELLS; ++x)
+ for (unsigned int x=0; x < MAX_NUMBER_OF_CELLS; ++x)
{
- for(unsigned int y=0; y < MAX_NUMBER_OF_CELLS; ++y)
+ for (unsigned int y=0; y < MAX_NUMBER_OF_CELLS; ++y)
{
GridLoader<Player, AllWorldObjectTypes, AllGridObjectTypes> loader;
loader.Stop(i_grid(x, y), *this);
@@ -112,9 +112,9 @@ class TRINITY_DLL_DECL ObjectGridCleaner
void CleanN()
{
- for(unsigned int x=0; x < MAX_NUMBER_OF_CELLS; ++x)
+ for (unsigned int x=0; x < MAX_NUMBER_OF_CELLS; ++x)
{
- for(unsigned int y=0; y < MAX_NUMBER_OF_CELLS; ++y)
+ for (unsigned int y=0; y < MAX_NUMBER_OF_CELLS; ++y)
{
GridLoader<Player, AllWorldObjectTypes, AllGridObjectTypes> loader;
loader.Stop(i_grid(x, y), *this);
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 588722213cb..f8b915c0189 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -67,7 +67,7 @@ bool normalizePlayerName(std::string& name)
return false;
wstr_buf[0] = wcharToUpper(wstr_buf[0]);
- for(size_t i = 1; i < wstr_len; ++i)
+ for (size_t i = 1; i < wstr_len; ++i)
wstr_buf[i] = wcharToLower(wstr_buf[i]);
if(!WStrToUtf8(wstr_buf,wstr_len,name))
@@ -101,7 +101,7 @@ LanguageDesc lang_description[LANGUAGES_COUNT] =
LanguageDesc const* GetLanguageDescByID(uint32 lang)
{
- for(uint8 i = 0; i < LANGUAGES_COUNT; ++i)
+ for (uint8 i = 0; i < LANGUAGES_COUNT; ++i)
{
if(uint32(lang_description[i].lang_id) == lang)
return &lang_description[i];
@@ -184,10 +184,10 @@ ObjectMgr::ObjectMgr()
ObjectMgr::~ObjectMgr()
{
- for( QuestMap::iterator i = mQuestTemplates.begin( ); i != mQuestTemplates.end( ); ++i )
+ for (QuestMap::iterator i = mQuestTemplates.begin( ); i != mQuestTemplates.end( ); ++i )
delete i->second;
- for(PetLevelInfoMap::iterator i = petInfo.begin( ); i != petInfo.end( ); ++i )
+ for (PetLevelInfoMap::iterator i = petInfo.begin( ); i != petInfo.end( ); ++i )
delete[] i->second;
// free only if loaded
@@ -276,7 +276,7 @@ PCachePlayerInfo ObjectMgr::GetPlayerInfoFromCache(uint32 unPlayerGuid) const
Group * ObjectMgr::GetGroupByLeader(const uint64 &guid) const
{
- for(GroupSet::const_iterator itr = mGroupSet.begin(); itr != mGroupSet.end(); ++itr)
+ for (GroupSet::const_iterator itr = mGroupSet.begin(); itr != mGroupSet.end(); ++itr)
if ((*itr)->GetLeaderGUID() == guid)
return *itr;
@@ -294,7 +294,7 @@ Guild * ObjectMgr::GetGuildById(uint32 GuildId) const
Guild * ObjectMgr::GetGuildByName(const std::string& guildname) const
{
- for(GuildMap::const_iterator itr = mGuildMap.begin(); itr != mGuildMap.end(); ++itr)
+ for (GuildMap::const_iterator itr = mGuildMap.begin(); itr != mGuildMap.end(); ++itr)
if (itr->second->GetName() == guildname)
return itr->second;
@@ -312,7 +312,7 @@ std::string ObjectMgr::GetGuildNameById(uint32 GuildId) const
Guild* ObjectMgr::GetGuildByLeader(const uint64 &guid) const
{
- for(GuildMap::const_iterator itr = mGuildMap.begin(); itr != mGuildMap.end(); ++itr)
+ for (GuildMap::const_iterator itr = mGuildMap.begin(); itr != mGuildMap.end(); ++itr)
if (itr->second->GetLeader() == guid)
return itr->second;
@@ -340,7 +340,7 @@ ArenaTeam* ObjectMgr::GetArenaTeamById(uint32 arenateamid) const
ArenaTeam* ObjectMgr::GetArenaTeamByName(const std::string& arenateamname) const
{
- for(ArenaTeamMap::const_iterator itr = mArenaTeamMap.begin(); itr != mArenaTeamMap.end(); ++itr)
+ for (ArenaTeamMap::const_iterator itr = mArenaTeamMap.begin(); itr != mArenaTeamMap.end(); ++itr)
if (itr->second->GetName() == arenateamname)
return itr->second;
@@ -349,7 +349,7 @@ ArenaTeam* ObjectMgr::GetArenaTeamByName(const std::string& arenateamname) const
ArenaTeam* ObjectMgr::GetArenaTeamByCaptain(uint64 const& guid) const
{
- for(ArenaTeamMap::const_iterator itr = mArenaTeamMap.begin(); itr != mArenaTeamMap.end(); ++itr)
+ for (ArenaTeamMap::const_iterator itr = mArenaTeamMap.begin(); itr != mArenaTeamMap.end(); ++itr)
if (itr->second->GetCaptain() == guid)
return itr->second;
@@ -399,7 +399,7 @@ void ObjectMgr::LoadCreatureLocales()
CreatureLocale& data = mCreatureLocaleMap[entry];
- for(uint8 i = 1; i < MAX_LOCALE; ++i)
+ for (uint8 i = 1; i < MAX_LOCALE; ++i)
{
std::string str = fields[1+2*(i-1)].GetCppString();
if(!str.empty())
@@ -467,7 +467,7 @@ void ObjectMgr::LoadNpcOptionLocales()
NpcOptionLocale& data = mNpcOptionLocaleMap[entry];
- for(uint8 i = 1; i < MAX_LOCALE; ++i)
+ for (uint8 i = 1; i < MAX_LOCALE; ++i)
{
std::string str = fields[1+2*(i-1)].GetCppString();
if(!str.empty())
@@ -530,7 +530,7 @@ void ObjectMgr::LoadPointOfInterestLocales()
PointOfInterestLocale& data = mPointOfInterestLocaleMap[entry];
- for(uint8 i = 1; i < MAX_LOCALE; ++i)
+ for (uint8 i = 1; i < MAX_LOCALE; ++i)
{
std::string str = fields[i].GetCppString();
if(str.empty())
@@ -574,7 +574,7 @@ void ObjectMgr::LoadCreatureTemplates()
std::set<uint32> hasHeroicEntries; // already loaded creatures with heroic entry values
// check data correctness
- for(uint32 i = 1; i < sCreatureStorage.MaxEntry; ++i)
+ for (uint32 i = 1; i < sCreatureStorage.MaxEntry; ++i)
{
CreatureInfo const* cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(i);
if (!cInfo)
@@ -737,7 +737,7 @@ void ObjectMgr::LoadCreatureTemplates()
if (!displayScaleEntry)
sLog.outErrorDb("Creature (Entry: %u) not has any existed display id in Modelid1/Modelid2/Modelid3/Modelid4", cInfo->Entry);
- for(int k = 0; k < MAX_KILL_CREDIT; ++k)
+ for (int k = 0; k < MAX_KILL_CREDIT; ++k)
{
if(cInfo->KillCredit[k])
{
@@ -799,7 +799,7 @@ void ObjectMgr::LoadCreatureTemplates()
sLog.outErrorDb("Creature (Entry: %u) has non-existing PetSpellDataId (%u)", cInfo->Entry, cInfo->PetSpellDataId);
}
- for(uint8 j = 0; j < CREATURE_MAX_SPELLS; ++j)
+ for (uint8 j = 0; j < CREATURE_MAX_SPELLS; ++j)
{
if(cInfo->spells[j] && !sSpellStore.LookupEntry(cInfo->spells[j]))
{
@@ -879,7 +879,7 @@ void ObjectMgr::ConvertCreatureAddonAuras(CreatureDataAddon* addon, char const*
const_cast<CreatureDataAddonAura*&>(addon->auras) = new CreatureDataAddonAura[val.size()/2+1];
uint32 i=0;
- for(uint32 j = 0; j < val.size()/2;++j)
+ for (uint32 j = 0; j < val.size()/2; ++j)
{
CreatureDataAddonAura& cAura = const_cast<CreatureDataAddonAura&>(addon->auras[i]);
cAura.spell_id = (uint32)val[2*j+0];
@@ -919,7 +919,7 @@ void ObjectMgr::LoadCreatureAddons(SQLStorage& creatureaddons, char const* entry
sLog.outString();
// check data correctness and convert 'auras'
- for(uint32 i = 1; i < creatureaddons.MaxEntry; ++i)
+ for (uint32 i = 1; i < creatureaddons.MaxEntry; ++i)
{
CreatureDataAddon const* addon = creatureaddons.LookupEntry<CreatureDataAddon>(i);
if(!addon)
@@ -952,7 +952,7 @@ void ObjectMgr::LoadCreatureAddons()
LoadCreatureAddons(sCreatureInfoAddonStorage,"Entry","creature template addons");
// check entry ids
- for(uint32 i = 1; i < sCreatureInfoAddonStorage.MaxEntry; ++i)
+ for (uint32 i = 1; i < sCreatureInfoAddonStorage.MaxEntry; ++i)
if(CreatureDataAddon const* addon = sCreatureInfoAddonStorage.LookupEntry<CreatureDataAddon>(i))
if(!sCreatureStorage.LookupEntry<CreatureInfo>(addon->guidOrEntry))
sLog.outErrorDb("Creature (Entry: %u) does not exist but has a record in `%s`",addon->guidOrEntry, sCreatureInfoAddonStorage.GetTableName());
@@ -960,7 +960,7 @@ void ObjectMgr::LoadCreatureAddons()
LoadCreatureAddons(sCreatureDataAddonStorage,"GUID","creature addons");
// check entry ids
- for(uint32 i = 1; i < sCreatureDataAddonStorage.MaxEntry; ++i)
+ for (uint32 i = 1; i < sCreatureDataAddonStorage.MaxEntry; ++i)
if(CreatureDataAddon const* addon = sCreatureDataAddonStorage.LookupEntry<CreatureDataAddon>(i))
if(mCreatureDataMap.find(addon->guidOrEntry)==mCreatureDataMap.end())
sLog.outErrorDb("Creature (GUID: %u) does not exist but has a record in `creature_addon`",addon->guidOrEntry);
@@ -975,14 +975,14 @@ void ObjectMgr::LoadEquipmentTemplates()
{
sEquipmentStorage.Load();
- for(uint32 i=0; i< sEquipmentStorage.MaxEntry; ++i)
+ for (uint32 i=0; i< sEquipmentStorage.MaxEntry; ++i)
{
EquipmentInfo const* eqInfo = sEquipmentStorage.LookupEntry<EquipmentInfo>(i);
if(!eqInfo)
continue;
- for(uint8 j=0; j<3; j++)
+ for (uint8 j=0; j<3; j++)
{
if(!eqInfo->equipentry[j])
continue;
@@ -1080,7 +1080,7 @@ void ObjectMgr::LoadCreatureModelInfo()
sCreatureModelStorage.Load();
// post processing
- for(uint32 i = 1; i < sCreatureModelStorage.MaxEntry; ++i)
+ for (uint32 i = 1; i < sCreatureModelStorage.MaxEntry; ++i)
{
CreatureModelInfo const *minfo = sCreatureModelStorage.LookupEntry<CreatureModelInfo>(i);
if (!minfo)
@@ -1106,7 +1106,7 @@ void ObjectMgr::LoadCreatureModelInfo()
sLog.outString();
// check if combat_reach is valid
- for(uint32 i = 1; i < sCreatureModelStorage.MaxEntry; ++i)
+ for (uint32 i = 1; i < sCreatureModelStorage.MaxEntry; ++i)
{
CreatureModelInfo const* mInfo = sCreatureModelStorage.LookupEntry<CreatureModelInfo>(i);
if(!mInfo)
@@ -1124,7 +1124,7 @@ bool ObjectMgr::CheckCreatureLinkedRespawn(uint32 guid, uint32 linkedGuid) const
{
const CreatureData* const slave = GetCreatureData(guid);
const CreatureData* const master = GetCreatureData(linkedGuid);
-
+
if(!slave || !master) // they must have a corresponding entry in db
{
sLog.outError("LinkedRespawn: Creature '%u' linking to '%u' which doesn't exist",guid,linkedGuid);
@@ -1132,7 +1132,7 @@ bool ObjectMgr::CheckCreatureLinkedRespawn(uint32 guid, uint32 linkedGuid) const
}
const MapEntry* const map = sMapStore.LookupEntry(master->mapid);
-
+
if(master->mapid != slave->mapid // link only to same map
&& (!map || map->Instanceable())) // or to unistanced world
{
@@ -1233,7 +1233,7 @@ void ObjectMgr::LoadCreatures()
// build single time for check creature data
std::set<uint32> heroicCreatures;
- for(uint32 i = 0; i < sCreatureStorage.MaxEntry; ++i)
+ for (uint32 i = 0; i < sCreatureStorage.MaxEntry; ++i)
if(CreatureInfo const* cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(i))
if(cInfo->HeroicEntry)
heroicCreatures.insert(cInfo->HeroicEntry);
@@ -1384,7 +1384,7 @@ void ObjectMgr::LoadCreatures()
void ObjectMgr::AddCreatureToGrid(uint32 guid, CreatureData const* data)
{
uint8 mask = data->spawnMask;
- for(uint8 i = 0; mask != 0; i++, mask >>= 1)
+ for (uint8 i = 0; mask != 0; i++, mask >>= 1)
{
if(mask & 1)
{
@@ -1400,7 +1400,7 @@ void ObjectMgr::AddCreatureToGrid(uint32 guid, CreatureData const* data)
void ObjectMgr::RemoveCreatureFromGrid(uint32 guid, CreatureData const* data)
{
uint8 mask = data->spawnMask;
- for(uint8 i = 0; mask != 0; i++, mask >>= 1)
+ for (uint8 i = 0; mask != 0; i++, mask >>= 1)
{
if(mask & 1)
{
@@ -1510,7 +1510,7 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 team, uint32 mapId, float x, f
}
}
- return guid;
+ return guid;
}
void ObjectMgr::LoadGameobjects()
@@ -1632,7 +1632,7 @@ void ObjectMgr::LoadGameobjects()
void ObjectMgr::AddGameobjectToGrid(uint32 guid, GameObjectData const* data)
{
uint8 mask = data->spawnMask;
- for(uint8 i = 0; mask != 0; i++, mask >>= 1)
+ for (uint8 i = 0; mask != 0; i++, mask >>= 1)
{
if(mask & 1)
{
@@ -1648,7 +1648,7 @@ void ObjectMgr::AddGameobjectToGrid(uint32 guid, GameObjectData const* data)
void ObjectMgr::RemoveGameobjectFromGrid(uint32 guid, GameObjectData const* data)
{
uint8 mask = data->spawnMask;
- for(uint8 i = 0; mask != 0; i++, mask >>= 1)
+ for (uint8 i = 0; mask != 0; i++, mask >>= 1)
{
if(mask & 1)
{
@@ -1857,7 +1857,7 @@ void ObjectMgr::LoadItemLocales()
ItemLocale& data = mItemLocaleMap[entry];
- for(uint8 i = 1; i < MAX_LOCALE; ++i)
+ for (uint8 i = 1; i < MAX_LOCALE; ++i)
{
std::string str = fields[1+2*(i-1)].GetCppString();
if(!str.empty())
@@ -1910,7 +1910,7 @@ void ObjectMgr::LoadItemPrototypes()
sLog.outString();
// check data correctness
- for(uint32 i = 1; i < sItemStorage.MaxEntry; ++i)
+ for (uint32 i = 1; i < sItemStorage.MaxEntry; ++i)
{
ItemPrototype const* proto = sItemStorage.LookupEntry<ItemPrototype >(i);
ItemEntry const *dbcitem = sItemStore.LookupEntry(i);
@@ -2253,7 +2253,7 @@ void ObjectMgr::LoadItemPrototypes()
if(proto->BagFamily)
{
// check bits
- for(uint32 j = 0; j < sizeof(proto->BagFamily)*8; ++j)
+ for (uint32 j = 0; j < sizeof(proto->BagFamily)*8; ++j)
{
uint32 mask = 1 << j;
if((proto->BagFamily & mask)==0)
@@ -2354,7 +2354,7 @@ void ObjectMgr::LoadItemRequiredTarget()
bool bIsItemSpellValid = false;
- for(uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
+ for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
{
if (SpellEntry const* pSpellInfo = sSpellStore.LookupEntry(pItemProto->Spells[i].SpellId))
{
@@ -2741,8 +2741,8 @@ void ObjectMgr::LoadPlayerInfo()
uint32 max_race = current_race ? current_race + 1 : MAX_RACES;
uint32 min_class = current_class ? current_class : 1;
uint32 max_class = current_class ? current_class + 1 : MAX_CLASSES;
- for(uint32 r = min_race; r < max_race; ++r)
- for(uint32 c = min_class; c < max_class; ++c)
+ for (uint32 r = min_race; r < max_race; ++r)
+ for (uint32 c = min_class; c < max_class; ++c)
playerInfo[r][c].spell.push_back(fields[2].GetUInt32());
}
else
@@ -3121,7 +3121,7 @@ void ObjectMgr::BuildPlayerLevelInfo(uint8 race, uint8 _class, uint8 level, Play
*info = playerInfo[race][_class].levelInfo[sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL)-1];
// if conversion from uint32 to uint8 causes unexpected behaviour, change lvl to uint32
- for(uint8 lvl = sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL)-1; lvl < level; ++lvl)
+ for (uint8 lvl = sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL)-1; lvl < level; ++lvl)
{
switch(_class)
{
@@ -3369,7 +3369,7 @@ void ObjectMgr::LoadGroups()
// clean groups
// TODO: maybe delete from the DB before loading in this case
- for(GroupSet::iterator itr = mGroupSet.begin(); itr != mGroupSet.end();)
+ for (GroupSet::iterator itr = mGroupSet.begin(); itr != mGroupSet.end(); )
{
if((*itr)->GetMembersCount() < 2)
{
@@ -3440,7 +3440,7 @@ void ObjectMgr::LoadGroups()
void ObjectMgr::LoadQuests()
{
// For reload case
- for(QuestMap::const_iterator itr=mQuestTemplates.begin(); itr != mQuestTemplates.end(); ++itr)
+ for (QuestMap::const_iterator itr=mQuestTemplates.begin(); itr != mQuestTemplates.end(); ++itr)
delete itr->second;
mQuestTemplates.clear();
@@ -3538,7 +3538,7 @@ void ObjectMgr::LoadQuests()
if(qinfo->QuestFlags & QUEST_FLAGS_AUTO_REWARDED)
{
// at auto-reward can be rewarded only RewChoiceItemId[0]
- for(uint8 j = 1; j < QUEST_REWARD_CHOICES_COUNT; ++j )
+ for (uint8 j = 1; j < QUEST_REWARD_CHOICES_COUNT; ++j )
{
if(uint32 id = qinfo->RewChoiceItemId[j])
{
@@ -3732,7 +3732,7 @@ void ObjectMgr::LoadQuests()
}
}
- for(uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j )
+ for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j )
{
uint32 id = qinfo->ReqItemId[j];
if(id)
@@ -3761,7 +3761,7 @@ void ObjectMgr::LoadQuests()
}
}
- for(uint8 j = 0; j < QUEST_SOURCE_ITEM_IDS_COUNT; ++j )
+ for (uint8 j = 0; j < QUEST_SOURCE_ITEM_IDS_COUNT; ++j )
{
uint32 id = qinfo->ReqSourceId[j];
if(id)
@@ -3784,7 +3784,7 @@ void ObjectMgr::LoadQuests()
}
}
- for(uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j )
+ for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j )
{
uint32 id = qinfo->ReqSpell[j];
if(id)
@@ -3800,7 +3800,7 @@ void ObjectMgr::LoadQuests()
if(!qinfo->ReqCreatureOrGOId[j])
{
bool found = false;
- for(uint8 k = 0; k < 3; ++k)
+ for (uint8 k = 0; k < 3; ++k)
{
if ((spellInfo->Effect[k] == SPELL_EFFECT_QUEST_COMPLETE && uint32(spellInfo->EffectMiscValue[k]) == qinfo->QuestId) ||
spellInfo->Effect[k] == SPELL_EFFECT_SEND_EVENT)
@@ -3830,7 +3830,7 @@ void ObjectMgr::LoadQuests()
}
}
- for(uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j )
+ for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j )
{
int32 id = qinfo->ReqCreatureOrGOId[j];
if(id < 0 && !sGOStorage.LookupEntry<GameObjectInfo>(-id))
@@ -3868,7 +3868,7 @@ void ObjectMgr::LoadQuests()
}
}
- for(uint8 j = 0; j < QUEST_REWARD_CHOICES_COUNT; ++j )
+ for (uint8 j = 0; j < QUEST_REWARD_CHOICES_COUNT; ++j )
{
uint32 id = qinfo->RewChoiceItemId[j];
if(id)
@@ -3895,7 +3895,7 @@ void ObjectMgr::LoadQuests()
}
}
- for(uint8 j = 0; j < QUEST_REWARDS_COUNT; ++j )
+ for (uint8 j = 0; j < QUEST_REWARDS_COUNT; ++j )
{
uint32 id = qinfo->RewItemId[j];
if(id)
@@ -3922,7 +3922,7 @@ void ObjectMgr::LoadQuests()
}
}
- for(uint8 j = 0; j < QUEST_REPUTATIONS_COUNT; ++j)
+ for (uint8 j = 0; j < QUEST_REPUTATIONS_COUNT; ++j)
{
if(qinfo->RewRepFaction[j])
{
@@ -4064,7 +4064,7 @@ void ObjectMgr::LoadQuests()
if(!spellInfo)
continue;
- for(uint8 j = 0; j < 3; ++j)
+ for (uint8 j = 0; j < 3; ++j)
{
if(spellInfo->Effect[j] != SPELL_EFFECT_QUEST_COMPLETE)
continue;
@@ -4129,7 +4129,7 @@ void ObjectMgr::LoadQuestLocales()
QuestLocale& data = mQuestLocaleMap[entry];
- for(uint8 i = 1; i < MAX_LOCALE; ++i)
+ for (uint8 i = 1; i < MAX_LOCALE; ++i)
{
std::string str = fields[1+10*(i-1)].GetCppString();
if(!str.empty())
@@ -4203,7 +4203,7 @@ void ObjectMgr::LoadQuestLocales()
data.EndText[idx] = str;
}
}
- for(uint8 k = 0; k < 4; ++k)
+ for (uint8 k = 0; k < 4; ++k)
{
str = fields[1+10*(i-1)+6+k].GetCppString();
if(!str.empty())
@@ -4486,7 +4486,7 @@ void ObjectMgr::LoadGameObjectScripts()
LoadScripts(sGameObjectScripts, "gameobject_scripts");
// check ids
- for(ScriptMapMap::const_iterator itr = sGameObjectScripts.begin(); itr != sGameObjectScripts.end(); ++itr)
+ for (ScriptMapMap::const_iterator itr = sGameObjectScripts.begin(); itr != sGameObjectScripts.end(); ++itr)
{
if(!GetGOData(itr->first))
sLog.outErrorDb("Table `gameobject_scripts` has not existing gameobject (GUID: %u) as script id",itr->first);
@@ -4498,7 +4498,7 @@ void ObjectMgr::LoadQuestEndScripts()
LoadScripts(sQuestEndScripts, "quest_end_scripts");
// check ids
- for(ScriptMapMap::const_iterator itr = sQuestEndScripts.begin(); itr != sQuestEndScripts.end(); ++itr)
+ for (ScriptMapMap::const_iterator itr = sQuestEndScripts.begin(); itr != sQuestEndScripts.end(); ++itr)
{
if(!GetQuestTemplate(itr->first))
sLog.outErrorDb("Table `quest_end_scripts` has not existing quest (Id: %u) as script id",itr->first);
@@ -4510,7 +4510,7 @@ void ObjectMgr::LoadQuestStartScripts()
LoadScripts(sQuestStartScripts,"quest_start_scripts");
// check ids
- for(ScriptMapMap::const_iterator itr = sQuestStartScripts.begin(); itr != sQuestStartScripts.end(); ++itr)
+ for (ScriptMapMap::const_iterator itr = sQuestStartScripts.begin(); itr != sQuestStartScripts.end(); ++itr)
{
if(!GetQuestTemplate(itr->first))
sLog.outErrorDb("Table `quest_start_scripts` has not existing quest (Id: %u) as script id",itr->first);
@@ -4522,7 +4522,7 @@ void ObjectMgr::LoadSpellScripts()
LoadScripts(sSpellScripts, "spell_scripts");
// check ids
- for(ScriptMapMap::const_iterator itr = sSpellScripts.begin(); itr != sSpellScripts.end(); ++itr)
+ for (ScriptMapMap::const_iterator itr = sSpellScripts.begin(); itr != sSpellScripts.end(); ++itr)
{
SpellEntry const* spellInfo = sSpellStore.LookupEntry(itr->first);
@@ -4534,7 +4534,7 @@ void ObjectMgr::LoadSpellScripts()
//check for correct spellEffect
bool found = false;
- for(uint8 i=0; i<3; ++i)
+ for (uint8 i=0; i<3; ++i)
{
// skip empty effects
if( !spellInfo->Effect[i] )
@@ -4558,7 +4558,7 @@ void ObjectMgr::LoadEventScripts()
std::set<uint32> evt_scripts;
// Load all possible script entries from gameobjects
- for(uint32 i = 1; i < sGOStorage.MaxEntry; ++i)
+ for (uint32 i = 1; i < sGOStorage.MaxEntry; ++i)
{
GameObjectInfo const * goInfo = sGOStorage.LookupEntry<GameObjectInfo>(i);
if (goInfo)
@@ -4582,12 +4582,12 @@ void ObjectMgr::LoadEventScripts()
}
}
// Load all possible script entries from spells
- for(uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
+ for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
{
SpellEntry const * spell = sSpellStore.LookupEntry(i);
if (spell)
{
- for(uint8 j=0; j<3; ++j)
+ for (uint8 j=0; j<3; ++j)
{
if( spell->Effect[j] == SPELL_EFFECT_SEND_EVENT )
{
@@ -4598,7 +4598,7 @@ void ObjectMgr::LoadEventScripts()
}
}
// Then check if all scripts are in above list of possible script entries
- for(ScriptMapMap::const_iterator itr = sEventScripts.begin(); itr != sEventScripts.end(); ++itr)
+ for (ScriptMapMap::const_iterator itr = sEventScripts.begin(); itr != sEventScripts.end(); ++itr)
{
std::set<uint32>::const_iterator itr2 = evt_scripts.find(itr->first);
if (itr2 == evt_scripts.end())
@@ -4612,7 +4612,7 @@ void ObjectMgr::LoadWaypointScripts()
{
LoadScripts(sWaypointScripts, "waypoint_scripts");
- for(ScriptMapMap::const_iterator itr = sWaypointScripts.begin(); itr != sWaypointScripts.end(); ++itr)
+ for (ScriptMapMap::const_iterator itr = sWaypointScripts.begin(); itr != sWaypointScripts.end(); ++itr)
{
QueryResult *query = WorldDatabase.PQuery("SELECT * FROM waypoint_scripts WHERE id = %u", itr->first);
if(!query || !query->GetRowCount())
@@ -4665,7 +4665,7 @@ void ObjectMgr::LoadPageTexts()
sLog.outString( ">> Loaded %u page texts", sPageTextStore.RecordCount );
sLog.outString();
- for(uint32 i = 1; i < sPageTextStore.MaxEntry; ++i)
+ for (uint32 i = 1; i < sPageTextStore.MaxEntry; ++i)
{
// check data correctness
PageText const* page = sPageTextStore.LookupEntry<PageText>(i);
@@ -4680,7 +4680,7 @@ void ObjectMgr::LoadPageTexts()
// detect circular reference
std::set<uint32> checkedPages;
- for(PageText const* pageItr = page; pageItr; pageItr = sPageTextStore.LookupEntry<PageText>(pageItr->Next_Page))
+ for (PageText const* pageItr = page; pageItr; pageItr = sPageTextStore.LookupEntry<PageText>(pageItr->Next_Page))
{
if(!pageItr->Next_Page)
break;
@@ -4689,7 +4689,7 @@ void ObjectMgr::LoadPageTexts()
{
std::ostringstream ss;
ss<< "The text page(s) ";
- for (std::set<uint32>::iterator itr= checkedPages.begin();itr!=checkedPages.end(); ++itr)
+ for (std::set<uint32>::iterator itr= checkedPages.begin(); itr!=checkedPages.end(); ++itr)
ss << *itr << " ";
ss << "create(s) a circular reference, which can cause the server to freeze. Changing Next_Page of page "
<< pageItr->Page_ID <<" to 0";
@@ -4729,7 +4729,7 @@ void ObjectMgr::LoadPageTextLocales()
PageTextLocale& data = mPageTextLocaleMap[entry];
- for(uint8 i = 1; i < MAX_LOCALE; ++i)
+ for (uint8 i = 1; i < MAX_LOCALE; ++i)
{
std::string str = fields[i].GetCppString();
if(str.empty())
@@ -4767,7 +4767,7 @@ void ObjectMgr::LoadInstanceTemplate()
SQLInstanceLoader loader;
loader.Load(sInstanceTemplate);
- for(uint32 i = 0; i < sInstanceTemplate.MaxEntry; i++)
+ for (uint32 i = 0; i < sInstanceTemplate.MaxEntry; i++)
{
InstanceTemplate* temp = (InstanceTemplate*)GetInstanceTemplate(i);
if(!temp) continue;
@@ -4860,7 +4860,7 @@ void ObjectMgr::LoadGossipText()
gText.Options[i].Language = fields[cic++].GetUInt32();
gText.Options[i].Probability = fields[cic++].GetFloat();
- for(uint8 j=0; j < 3; ++j)
+ for (uint8 j=0; j < 3; ++j)
{
gText.Options[i].Emotes[j]._Delay = fields[cic++].GetUInt32();
gText.Options[i].Emotes[j]._Emote = fields[cic++].GetUInt32();
@@ -4910,9 +4910,9 @@ void ObjectMgr::LoadNpcTextLocales()
NpcTextLocale& data = mNpcTextLocaleMap[entry];
- for(uint8 i=1; i<MAX_LOCALE; ++i)
+ for (uint8 i=1; i<MAX_LOCALE; ++i)
{
- for(uint8 j=0; j<8; ++j)
+ for (uint8 j=0; j<8; ++j)
{
std::string str0 = fields[1+8*2*(i-1)+2*j].GetCppString();
if(!str0.empty())
@@ -5026,7 +5026,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp)
if (m->messageType != MAIL_NORMAL || (m->checked & (MAIL_CHECK_MASK_AUCTION | MAIL_CHECK_MASK_COD_PAYMENT | MAIL_CHECK_MASK_RETURNED)))
{
// mail open and then not returned
- for(std::vector<MailItemInfo>::iterator itr2 = m->items.begin(); itr2 != m->items.end(); ++itr2)
+ for (std::vector<MailItemInfo>::iterator itr2 = m->items.begin(); itr2 != m->items.end(); ++itr2)
CharacterDatabase.PExecute("DELETE FROM item_instance WHERE guid = '%u'", itr2->item_guid);
}
else
@@ -5213,7 +5213,7 @@ uint32 ObjectMgr::GetNearestTaxiNode( float x, float y, float z, uint32 mapid, u
float dist;
uint32 id = 0;
- for(uint32 i = 1; i < sTaxiNodesStore.GetNumRows(); ++i)
+ for (uint32 i = 1; i < sTaxiNodesStore.GetNumRows(); ++i)
{
TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(i);
if(!node || node->map_id != mapid || !node->MountCreatureID[team == ALLIANCE ? 1 : 0] && node->MountCreatureID[0] != 32981) // dk flight
@@ -5321,7 +5321,7 @@ void ObjectMgr::GetTaxiPathNodes( uint32 path, Path &pathnodes, std::vector<uint
pathnodes.Resize(nodeList.size());
mapIds.resize(nodeList.size());
- for(size_t i = 0; i < nodeList.size(); ++i)
+ for (size_t i = 0; i < nodeList.size(); ++i)
{
pathnodes[ i ].x = nodeList[i].x;
pathnodes[ i ].y = nodeList[i].y;
@@ -5340,7 +5340,7 @@ void ObjectMgr::GetTransportPathNodes( uint32 path, TransportPath &pathnodes )
pathnodes.Resize(nodeList.size());
- for(size_t i = 0; i < nodeList.size(); ++i)
+ for (size_t i = 0; i < nodeList.size(); ++i)
{
pathnodes[ i ].mapid = nodeList[i].mapid;
pathnodes[ i ].x = nodeList[i].x;
@@ -5456,7 +5456,7 @@ WorldSafeLocsEntry const *ObjectMgr::GetClosestGraveYard(float x, float y, float
MapEntry const* mapEntry = sMapStore.LookupEntry(MapId);
- for(GraveYardMap::const_iterator itr = graveLow; itr != graveUp; ++itr)
+ for (GraveYardMap::const_iterator itr = graveLow; itr != graveUp; ++itr)
{
GraveYardData const& data = itr->second;
@@ -5539,7 +5539,7 @@ GraveYardData const* ObjectMgr::FindGraveYardData(uint32 id, uint32 zoneId)
GraveYardMap::const_iterator graveLow = mGraveYardMap.lower_bound(zoneId);
GraveYardMap::const_iterator graveUp = mGraveYardMap.upper_bound(zoneId);
- for(GraveYardMap::const_iterator itr = graveLow; itr != graveUp; ++itr)
+ for (GraveYardMap::const_iterator itr = graveLow; itr != graveUp; ++itr)
{
if(itr->second.safeLocId==id)
return &itr->second;
@@ -5584,7 +5584,7 @@ void ObjectMgr::RemoveGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool
GraveYardMap::iterator itr;
- for(itr = graveLow; itr != graveUp; ++itr)
+ for (itr = graveLow; itr != graveUp; ++itr)
{
GraveYardData & data = itr->second;
@@ -5617,7 +5617,6 @@ void ObjectMgr::RemoveGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool
return;
}
-
void ObjectMgr::LoadAreaTriggerTeleports()
{
mAreaTriggers.clear(); // need for reload case
@@ -6100,7 +6099,7 @@ void ObjectMgr::LoadGameObjectLocales()
GameObjectLocale& data = mGameObjectLocaleMap[entry];
- for(uint8 i = 1; i < MAX_LOCALE; ++i)
+ for (uint8 i = 1; i < MAX_LOCALE; ++i)
{
std::string str = fields[i].GetCppString();
if(!str.empty())
@@ -6116,7 +6115,7 @@ void ObjectMgr::LoadGameObjectLocales()
}
}
- for(uint8 i = 1; i < MAX_LOCALE; ++i)
+ for (uint8 i = 1; i < MAX_LOCALE; ++i)
{
std::string str = fields[i+(MAX_LOCALE-1)].GetCppString();
if(!str.empty())
@@ -6220,7 +6219,7 @@ void ObjectMgr::LoadGameobjectInfo()
loader.Load(sGOStorage);
// some checks
- for(uint32 id = 1; id < sGOStorage.MaxEntry; id++)
+ for (uint32 id = 1; id < sGOStorage.MaxEntry; id++)
{
GameObjectInfo const* goInfo = sGOStorage.LookupEntry<GameObjectInfo>(id);
if (!goInfo)
@@ -6826,7 +6825,7 @@ void ObjectMgr::LoadWeatherZoneChances()
WeatherZoneChances& wzc = mWeatherZoneMap[zone_id];
- for(uint8 season = 0; season < WEATHER_SEASONS; ++season)
+ for (uint8 season = 0; season < WEATHER_SEASONS; ++season)
{
wzc.data[season].rainChance = fields[season * (MAX_WEATHER_TYPE-1) + 1].GetUInt32();
wzc.data[season].snowChance = fields[season * (MAX_WEATHER_TYPE-1) + 2].GetUInt32();
@@ -6890,7 +6889,7 @@ void ObjectMgr::DeleteRespawnTimeForInstance(uint32 instance)
{
RespawnTimes::iterator next;
- for(RespawnTimes::iterator itr = mGORespawnTimes.begin(); itr != mGORespawnTimes.end(); itr = next)
+ for (RespawnTimes::iterator itr = mGORespawnTimes.begin(); itr != mGORespawnTimes.end(); itr = next)
{
next = itr;
++next;
@@ -6899,7 +6898,7 @@ void ObjectMgr::DeleteRespawnTimeForInstance(uint32 instance)
mGORespawnTimes.erase(itr);
}
- for(RespawnTimes::iterator itr = mCreatureRespawnTimes.begin(); itr != mCreatureRespawnTimes.end(); itr = next)
+ for (RespawnTimes::iterator itr = mCreatureRespawnTimes.begin(); itr != mCreatureRespawnTimes.end(); itr = next)
{
next = itr;
++next;
@@ -6986,7 +6985,7 @@ void ObjectMgr::LoadGameobjectQuestRelations()
{
LoadQuestRelationsHelper(mGOQuestRelations,"gameobject_questrelation");
- for(QuestRelations::iterator itr = mGOQuestRelations.begin(); itr != mGOQuestRelations.end(); ++itr)
+ for (QuestRelations::iterator itr = mGOQuestRelations.begin(); itr != mGOQuestRelations.end(); ++itr)
{
GameObjectInfo const* goInfo = GetGameObjectInfo(itr->first);
if(!goInfo)
@@ -7000,7 +6999,7 @@ void ObjectMgr::LoadGameobjectInvolvedRelations()
{
LoadQuestRelationsHelper(mGOQuestInvolvedRelations,"gameobject_involvedrelation");
- for(QuestRelations::iterator itr = mGOQuestInvolvedRelations.begin(); itr != mGOQuestInvolvedRelations.end(); ++itr)
+ for (QuestRelations::iterator itr = mGOQuestInvolvedRelations.begin(); itr != mGOQuestInvolvedRelations.end(); ++itr)
{
GameObjectInfo const* goInfo = GetGameObjectInfo(itr->first);
if(!goInfo)
@@ -7014,7 +7013,7 @@ void ObjectMgr::LoadCreatureQuestRelations()
{
LoadQuestRelationsHelper(mCreatureQuestRelations,"creature_questrelation");
- for(QuestRelations::iterator itr = mCreatureQuestRelations.begin(); itr != mCreatureQuestRelations.end(); ++itr)
+ for (QuestRelations::iterator itr = mCreatureQuestRelations.begin(); itr != mCreatureQuestRelations.end(); ++itr)
{
CreatureInfo const* cInfo = GetCreatureTemplate(itr->first);
if(!cInfo)
@@ -7028,7 +7027,7 @@ void ObjectMgr::LoadCreatureInvolvedRelations()
{
LoadQuestRelationsHelper(mCreatureQuestInvolvedRelations,"creature_involvedrelation");
- for(QuestRelations::iterator itr = mCreatureQuestInvolvedRelations.begin(); itr != mCreatureQuestInvolvedRelations.end(); ++itr)
+ for (QuestRelations::iterator itr = mCreatureQuestInvolvedRelations.begin(); itr != mCreatureQuestInvolvedRelations.end(); ++itr)
{
CreatureInfo const* cInfo = GetCreatureTemplate(itr->first);
if(!cInfo)
@@ -7231,7 +7230,7 @@ int ObjectMgr::GetIndexForLocale( LocaleConstant loc )
if(loc==LOCALE_enUS)
return -1;
- for(size_t i=0;i < m_LocalForIndex.size(); ++i)
+ for (size_t i=0; i < m_LocalForIndex.size(); ++i)
if(m_LocalForIndex[i]==loc)
return i;
@@ -7251,7 +7250,7 @@ int ObjectMgr::GetOrNewIndexForLocale( LocaleConstant loc )
if(loc==LOCALE_enUS)
return -1;
- for(size_t i=0;i < m_LocalForIndex.size(); ++i)
+ for (size_t i=0; i < m_LocalForIndex.size(); ++i)
if(m_LocalForIndex[i]==loc)
return i;
@@ -7276,7 +7275,7 @@ void ObjectMgr::LoadGameObjectForQuests()
uint32 count = 0;
// collect GO entries for GO that must activated
- for(uint32 go_entry = 1; go_entry < sGOStorage.MaxEntry; ++go_entry)
+ for (uint32 go_entry = 1; go_entry < sGOStorage.MaxEntry; ++go_entry)
{
bar.step();
GameObjectInfo const* goInfo = sGOStorage.LookupEntry<GameObjectInfo>(go_entry);
@@ -7344,7 +7343,7 @@ bool ObjectMgr::LoadTrinityStrings(DatabaseType& db, char const* table, int32 mi
}
// cleanup affected map part for reloading case
- for(TrinityStringLocaleMap::iterator itr = mTrinityStringLocaleMap.begin(); itr != mTrinityStringLocaleMap.end();)
+ for (TrinityStringLocaleMap::iterator itr = mTrinityStringLocaleMap.begin(); itr != mTrinityStringLocaleMap.end(); )
{
if (itr->first >= start_value && itr->first < end_value)
mTrinityStringLocaleMap.erase(itr++);
@@ -7404,7 +7403,7 @@ bool ObjectMgr::LoadTrinityStrings(DatabaseType& db, char const* table, int32 mi
// 0 -> default, idx in to idx+1
data.Content[0] = fields[1].GetCppString();
- for(uint8 i = 1; i < MAX_LOCALE; ++i)
+ for (uint8 i = 1; i < MAX_LOCALE; ++i)
{
std::string str = fields[i+1].GetCppString();
if (!str.empty())
@@ -7570,7 +7569,7 @@ uint16 ObjectMgr::GetConditionId( ConditionType condition, uint32 value1, uint32
bool ObjectMgr::CheckDeclinedNames( std::wstring mainpart, DeclinedName const& names )
{
- for(uint8 i =0; i < MAX_DECLINED_NAME_CASES; ++i)
+ for (uint8 i =0; i < MAX_DECLINED_NAME_CASES; ++i)
{
std::wstring wname;
if(!Utf8toWStr(names.name[i],wname))
@@ -7627,7 +7626,7 @@ bool PlayerCondition::Meets(Player const * player) const
case CONDITION_AD_COMMISSION_AURA:
{
Unit::AuraMap const& auras = player->GetAuras();
- for(Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
+ for (Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
if((itr->second->GetSpellProto()->Attributes & 0x1000010) && itr->second->GetSpellProto()->SpellVisual[0]==3580)
return true;
return false;
@@ -7901,7 +7900,7 @@ GameTele const* ObjectMgr::GetGameTele(const std::string& name) const
// Alternative first GameTele what contains wnameLow as substring in case no GameTele location found
const GameTele* alt = NULL;
- for(GameTeleMap::const_iterator itr = m_GameTeleMap.begin(); itr != m_GameTeleMap.end(); ++itr)
+ for (GameTeleMap::const_iterator itr = m_GameTeleMap.begin(); itr != m_GameTeleMap.end(); ++itr)
{
if(itr->second.wnameLow == wname)
return &itr->second;
@@ -7916,7 +7915,7 @@ bool ObjectMgr::AddGameTele(GameTele& tele)
{
// find max id
uint32 new_id = 0;
- for(GameTeleMap::const_iterator itr = m_GameTeleMap.begin(); itr != m_GameTeleMap.end(); ++itr)
+ for (GameTeleMap::const_iterator itr = m_GameTeleMap.begin(); itr != m_GameTeleMap.end(); ++itr)
if(itr->first > new_id)
new_id = itr->first;
@@ -7944,7 +7943,7 @@ bool ObjectMgr::DeleteGameTele(const std::string& name)
// converting string that we try to find to lower case
wstrToLower( wname );
- for(GameTeleMap::iterator itr = m_GameTeleMap.begin(); itr != m_GameTeleMap.end(); ++itr)
+ for (GameTeleMap::iterator itr = m_GameTeleMap.begin(); itr != m_GameTeleMap.end(); ++itr)
{
if(itr->second.wnameLow == wname)
{
@@ -8048,7 +8047,7 @@ void ObjectMgr::LoadTrainerSpell()
// calculate learned spell for profession case when stored cast-spell
trainerSpell.learnedSpell = spell;
- for(uint8 i = 0; i <3; ++i)
+ for (uint8 i = 0; i <3; ++i)
{
if(spellinfo->Effect[i] != SPELL_EFFECT_LEARN_SPELL)
continue;
@@ -8388,9 +8387,9 @@ uint32 ObjectMgr::GetScriptId(const char *name)
void ObjectMgr::CheckScripts(ScriptMapMap const& scripts,std::set<int32>& ids)
{
- for(ScriptMapMap::const_iterator itrMM = scripts.begin(); itrMM != scripts.end(); ++itrMM)
+ for (ScriptMapMap::const_iterator itrMM = scripts.begin(); itrMM != scripts.end(); ++itrMM)
{
- for(ScriptMap::const_iterator itrM = itrMM->second.begin(); itrM != itrMM->second.end(); ++itrM)
+ for (ScriptMap::const_iterator itrM = itrMM->second.begin(); itrM != itrMM->second.end(); ++itrM)
{
switch(itrM->second.command)
{
@@ -8413,7 +8412,7 @@ void ObjectMgr::LoadDbScriptStrings()
std::set<int32> ids;
- for(int32 i = MIN_DB_SCRIPT_STRING_ID; i < MAX_DB_SCRIPT_STRING_ID; ++i)
+ for (int32 i = MIN_DB_SCRIPT_STRING_ID; i < MAX_DB_SCRIPT_STRING_ID; ++i)
if(GetTrinityStringLocale(i))
ids.insert(i);
@@ -8425,7 +8424,7 @@ void ObjectMgr::LoadDbScriptStrings()
CheckScripts(sWaypointScripts,ids);
- for(std::set<int32>::const_iterator itr = ids.begin(); itr != ids.end(); ++itr)
+ for (std::set<int32>::const_iterator itr = ids.begin(); itr != ids.end(); ++itr)
sLog.outErrorDb( "Table `db_script_string` has unused string id %u", *itr);
}
@@ -8522,9 +8521,9 @@ uint64 ObjectMgr::GenerateGMTicketId()
void ObjectMgr::LoadGMTickets()
{
m_GMTicketList.clear();
-
+
QueryResult *result = CharacterDatabase.Query( "SELECT guid, playerGuid, name, message, createtime, map, posX, posY, posZ, timestamp, closed, assignedto, comment FROM gm_tickets" );
-
+
if(!result)
{
sLog.outString(" \n>> GM Tickets table is empty, no tickets were loaded.\n" );
@@ -8559,7 +8558,7 @@ void ObjectMgr::LoadGMTickets()
} while( result->NextRow() );
result = CharacterDatabase.PQuery("SELECT MAX(guid) from gm_tickets");
- m_GMticketid = (*result)[0].GetUInt64();
+ m_GMticketid = (*result)[0].GetUInt64();
sLog.outString(">>> %u GM Tickets loaded from the database.", count);
delete result;
@@ -8569,13 +8568,13 @@ void ObjectMgr::AddOrUpdateGMTicket(GM_Ticket &ticket, bool create)
{
if(create)
m_GMTicketList.push_back(&ticket);
-
- _AddOrUpdateGMTicket(ticket);
+
+ _AddOrUpdateGMTicket(ticket);
}
void ObjectMgr::_AddOrUpdateGMTicket(GM_Ticket &ticket)
{
- std::string msg(ticket.message), name(ticket.name), comment(ticket.comment);
+ std::string msg(ticket.message), name(ticket.name), comment(ticket.comment);
CharacterDatabase.escape_string(msg);
CharacterDatabase.escape_string(name);
CharacterDatabase.escape_string(comment);
@@ -8601,7 +8600,7 @@ void ObjectMgr::_AddOrUpdateGMTicket(GM_Ticket &ticket)
void ObjectMgr::RemoveGMTicket(GM_Ticket *ticket, int64 source, bool permanently)
{
- for(GmTicketList::iterator i = m_GMTicketList.begin(); i != m_GMTicketList.end(); ++i)
+ for (GmTicketList::iterator i = m_GMTicketList.begin(); i != m_GMTicketList.end(); ++i)
if((*i)->guid == ticket->guid)
{
if(permanently)
diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h
index b0e1bce8367..ca47ff52ac1 100644
--- a/src/game/ObjectMgr.h
+++ b/src/game/ObjectMgr.h
@@ -140,7 +140,6 @@ typedef UNORDERED_MAP<uint32/*(mapid,spawnMode) pair*/,CellObjectGuidsMap> MapOb
typedef UNORDERED_MAP<uint64/*(instance,guid) pair*/,time_t> RespawnTimes;
-
// mangos string ranges
#define MIN_TRINITY_STRING_ID 1 // 'mangos_string'
#define MAX_TRINITY_STRING_ID 2000000000
@@ -173,7 +172,7 @@ typedef std::pair<ItemRequiredTargetMap::const_iterator, ItemRequiredTargetMap::
struct PetLevelInfo
{
- PetLevelInfo() : health(0), mana(0) { for(uint8 i=0; i < MAX_STATS; ++i ) stats[i] = 0; }
+ PetLevelInfo() : health(0), mana(0) { for (uint8 i=0; i < MAX_STATS; ++i ) stats[i] = 0; }
uint16 stats[MAX_STATS];
uint16 health;
@@ -847,24 +846,24 @@ class ObjectMgr
{
return ItemRequiredTargetMapBounds(m_ItemRequiredTarget.lower_bound(uiItemEntry),m_ItemRequiredTarget.upper_bound(uiItemEntry));
}
-
+
GM_Ticket *GetGMTicket(uint64 ticketGuid)
{
- for(GmTicketList::const_iterator i = m_GMTicketList.begin(); i != m_GMTicketList.end(); ++i)
+ for (GmTicketList::const_iterator i = m_GMTicketList.begin(); i != m_GMTicketList.end(); ++i)
if((*i) && (*i)->guid == ticketGuid)
return (*i);
-
+
return NULL;
}
GM_Ticket *GetGMTicketByPlayer(uint64 playerGuid)
{
- for(GmTicketList::const_iterator i = m_GMTicketList.begin(); i != m_GMTicketList.end(); ++i)
+ for (GmTicketList::const_iterator i = m_GMTicketList.begin(); i != m_GMTicketList.end(); ++i)
if((*i) && (*i)->playerGuid == playerGuid && (*i)->closed == 0)
return (*i);
-
- return NULL;
+
+ return NULL;
}
-
+
void AddOrUpdateGMTicket(GM_Ticket &ticket, bool create = false);
void _AddOrUpdateGMTicket(GM_Ticket &ticket);
void RemoveGMTicket(uint64 ticketGuid, int64 source = -1, bool permanently = false);
diff --git a/src/game/OutdoorPvP.cpp b/src/game/OutdoorPvP.cpp
index 75b794c0452..ada95b8c683 100644
--- a/src/game/OutdoorPvP.cpp
+++ b/src/game/OutdoorPvP.cpp
@@ -212,16 +212,16 @@ bool OPvPCapturePoint::DelCapturePoint()
void OPvPCapturePoint::DeleteSpawns()
{
- for(std::map<uint32,uint64>::iterator i = m_Objects.begin(); i != m_Objects.end(); ++i)
+ for (std::map<uint32,uint64>::iterator i = m_Objects.begin(); i != m_Objects.end(); ++i)
DelObject(i->first);
- for(std::map<uint32,uint64>::iterator i = m_Creatures.begin(); i != m_Creatures.end(); ++i)
+ for (std::map<uint32,uint64>::iterator i = m_Creatures.begin(); i != m_Creatures.end(); ++i)
DelCreature(i->first);
DelCapturePoint();
}
void OutdoorPvP::DeleteSpawns()
{
- for(OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
+ for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
itr->second->DeleteSpawns();
}
@@ -242,7 +242,7 @@ void OutdoorPvP::HandlePlayerEnterZone(Player * plr, uint32 zone)
void OutdoorPvP::HandlePlayerLeaveZone(Player * plr, uint32 zone)
{
// inform the objectives of the leaving
- for(OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
+ for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
itr->second->HandlePlayerLeave(plr);
// remove the world state information from the player (we can't keep everyone up to date, so leave out those who are not in the concerning zones)
if(!plr->GetSession()->PlayerLogout())
@@ -254,7 +254,7 @@ void OutdoorPvP::HandlePlayerLeaveZone(Player * plr, uint32 zone)
bool OutdoorPvP::Update(uint32 diff)
{
bool objective_changed = false;
- for(OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
+ for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
{
if(itr->second->Update(diff))
objective_changed = true;
@@ -269,9 +269,9 @@ bool OPvPCapturePoint::Update(uint32 diff)
float radius = m_capturePoint->GetGOInfo()->capturePoint.radius;
- for(uint32 team = 0; team < 2; ++team)
+ for (uint32 team = 0; team < 2; ++team)
{
- for(PlayerSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end();)
+ for (PlayerSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end(); )
{
Player *player = *itr;
++itr;
@@ -285,7 +285,7 @@ bool OPvPCapturePoint::Update(uint32 diff)
Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(m_capturePoint, players, checker);
m_capturePoint->VisitNearbyWorldObject(radius, searcher);
- for(std::list<Player*>::iterator itr = players.begin(); itr != players.end(); ++itr)
+ for (std::list<Player*>::iterator itr = players.begin(); itr != players.end(); ++itr)
{
if((*itr)->IsOutdoorPvPActive())
{
@@ -384,17 +384,17 @@ bool OPvPCapturePoint::Update(uint32 diff)
void OutdoorPvP::SendUpdateWorldState(uint32 field, uint32 value)
{
if(m_sendUpdate)
- for(int i = 0; i < 2; ++i)
- for(PlayerSet::iterator itr = m_players[i].begin(); itr != m_players[i].end(); ++itr)
+ for (int i = 0; i < 2; ++i)
+ for (PlayerSet::iterator itr = m_players[i].begin(); itr != m_players[i].end(); ++itr)
(*itr)->SendUpdateWorldState(field, value);
}
void OPvPCapturePoint::SendUpdateWorldState(uint32 field, uint32 value)
{
- for(uint32 team = 0; team < 2; ++team)
+ for (uint32 team = 0; team < 2; ++team)
{
// send to all players present in the area
- for(PlayerSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end(); ++itr)
+ for (PlayerSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end(); ++itr)
{
(*itr)->SendUpdateWorldState(field,value);
}
@@ -417,7 +417,7 @@ void OPvPCapturePoint::SendObjectiveComplete(uint32 id,uint64 guid)
}
// send to all players present in the area
- for(PlayerSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end(); ++itr)
+ for (PlayerSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end(); ++itr)
(*itr)->KilledMonsterCredit(id, guid);
}
@@ -425,7 +425,7 @@ void OutdoorPvP::HandleKill(Player *killer, Unit * killed)
{
if(Group * pGroup = killer->GetGroup())
{
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *pGroupGuy = itr->getSource();
@@ -456,7 +456,7 @@ void OutdoorPvP::HandleKill(Player *killer, Unit * killed)
bool OutdoorPvP::IsInsideObjective(Player *plr) const
{
- for(OPvPCapturePointMap::const_iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
+ for (OPvPCapturePointMap::const_iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
if(itr->second->IsInsideObjective(plr))
return true;
@@ -470,7 +470,7 @@ bool OPvPCapturePoint::IsInsideObjective(Player *plr) const
bool OutdoorPvP::HandleCustomSpell(Player *plr, uint32 spellId, GameObject * go)
{
- for(OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
+ for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
if(itr->second->HandleCustomSpell(plr,spellId,go))
return true;
@@ -486,7 +486,7 @@ bool OPvPCapturePoint::HandleCustomSpell(Player *plr, uint32 spellId, GameObject
bool OutdoorPvP::HandleOpenGo(Player *plr, uint64 guid)
{
- for(OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
+ for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
if(itr->second->HandleOpenGo(plr,guid) >= 0)
return true;
@@ -495,7 +495,7 @@ bool OutdoorPvP::HandleOpenGo(Player *plr, uint64 guid)
bool OutdoorPvP::HandleGossipOption(Player * plr, uint64 guid, uint32 id)
{
- for(OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
+ for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
if(itr->second->HandleGossipOption(plr, guid, id))
return true;
@@ -504,7 +504,7 @@ bool OutdoorPvP::HandleGossipOption(Player * plr, uint64 guid, uint32 id)
bool OutdoorPvP::CanTalkTo(Player * plr, Creature * c, GossipOption &gso)
{
- for(OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
+ for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
if(itr->second->CanTalkTo(plr, c, gso))
return true;
@@ -513,7 +513,7 @@ bool OutdoorPvP::CanTalkTo(Player * plr, Creature * c, GossipOption &gso)
bool OutdoorPvP::HandleDropFlag(Player * plr, uint32 id)
{
- for(OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
+ for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
if(itr->second->HandleDropFlag(plr, id))
return true;
@@ -553,8 +553,8 @@ bool OutdoorPvP::HandleAreaTrigger(Player *plr, uint32 trigger)
void OutdoorPvP::BroadcastPacket(WorldPacket &data) const
{
// This is faster than sWorld.SendZoneMessage
- for(uint32 team = 0; team < 2; ++team)
- for(PlayerSet::const_iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
+ for (uint32 team = 0; team < 2; ++team)
+ for (PlayerSet::const_iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
(*itr)->GetSession()->SendPacket(&data);
}
@@ -571,10 +571,10 @@ bool OutdoorPvP::HasPlayer(Player *plr) const
void OutdoorPvP::TeamCastSpell(TeamId team, int32 spellId)
{
if(spellId > 0)
- for(PlayerSet::iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
+ for (PlayerSet::iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
(*itr)->CastSpell(*itr, (uint32)spellId, true);
else
- for(PlayerSet::iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
+ for (PlayerSet::iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
(*itr)->RemoveAura((uint32)-spellId); // by stack?
}
diff --git a/src/game/OutdoorPvPEP.cpp b/src/game/OutdoorPvPEP.cpp
index c108c733f04..44b81dd6719 100644
--- a/src/game/OutdoorPvPEP.cpp
+++ b/src/game/OutdoorPvPEP.cpp
@@ -101,7 +101,6 @@ void OPvPCapturePointEP_EWT::ChangeState()
flag2->SendUpdateObjectToAllExcept(NULL);
}
-
UpdateTowerState();
// complete quest objective
@@ -173,7 +172,7 @@ void OPvPCapturePointEP_EWT::SummonSupportUnitAtNorthpassTower(uint32 team)
else
ct=EP_EWT_Summons_H;
- for(int i = 0; i < EP_EWT_NUM_CREATURES; ++i)
+ for (int i = 0; i < EP_EWT_NUM_CREATURES; ++i)
{
DelCreature(i);
AddCreature(i,ct[i].entry,ct[i].teamval,ct[i].map,ct[i].x,ct[i].y,ct[i].z,ct[i].o,1000000);
@@ -708,7 +707,7 @@ OutdoorPvPEP::OutdoorPvPEP()
bool OutdoorPvPEP::SetupOutdoorPvP()
{
- for(int i = 0; i < EPBuffZonesNum; ++i)
+ for (int i = 0; i < EPBuffZonesNum; ++i)
RegisterZone(EPBuffZones[i]);
AddCapturePoint(new OPvPCapturePointEP_EWT(this));
@@ -724,7 +723,7 @@ bool OutdoorPvPEP::Update(uint32 diff)
{
m_AllianceTowersControlled = 0;
m_HordeTowersControlled = 0;
- for(int i = 0; i < EP_TOWER_NUM; ++i)
+ for (int i = 0; i < EP_TOWER_NUM; ++i)
{
if(EP_Controls[i] == ALLIANCE)
++m_AllianceTowersControlled;
@@ -760,12 +759,12 @@ void OutdoorPvPEP::HandlePlayerLeaveZone(Player * plr, uint32 zone)
// remove buffs
if(plr->GetTeam() == ALLIANCE)
{
- for(int i = 0; i < 4; ++i)
+ for (int i = 0; i < 4; ++i)
plr->RemoveAurasDueToSpell(EP_AllianceBuffs[i]);
}
else
{
- for(int i = 0; i < 4; ++i)
+ for (int i = 0; i < 4; ++i)
plr->RemoveAurasDueToSpell(EP_HordeBuffs[i]);
}
OutdoorPvP::HandlePlayerLeaveZone(plr, zone);
@@ -773,21 +772,21 @@ void OutdoorPvPEP::HandlePlayerLeaveZone(Player * plr, uint32 zone)
void OutdoorPvPEP::BuffTeams()
{
- for(PlayerSet::iterator itr = m_players[0].begin(); itr != m_players[0].end(); ++itr)
+ for (PlayerSet::iterator itr = m_players[0].begin(); itr != m_players[0].end(); ++itr)
{
Player * plr = *itr;
{
- for(int i = 0; i < 4; ++i)
+ for (int i = 0; i < 4; ++i)
plr->RemoveAurasDueToSpell(EP_AllianceBuffs[i]);
if(m_AllianceTowersControlled && m_AllianceTowersControlled < 5)
plr->CastSpell(plr,EP_AllianceBuffs[m_AllianceTowersControlled-1],true);
}
}
- for(PlayerSet::iterator itr = m_players[1].begin(); itr != m_players[1].end(); ++itr)
+ for (PlayerSet::iterator itr = m_players[1].begin(); itr != m_players[1].end(); ++itr)
{
Player * plr = *itr;
{
- for(int i = 0; i < 4; ++i)
+ for (int i = 0; i < 4; ++i)
plr->RemoveAurasDueToSpell(EP_HordeBuffs[i]);
if(m_HordeTowersControlled && m_HordeTowersControlled < 5)
plr->CastSpell(plr,EP_HordeBuffs[m_HordeTowersControlled-1],true);
@@ -802,7 +801,7 @@ void OutdoorPvPEP::FillInitialWorldStates(WorldPacket & data)
data << EP_UI_TOWER_SLIDER_DISPLAY << uint32(0);
data << EP_UI_TOWER_SLIDER_POS << uint32(50);
data << EP_UI_TOWER_SLIDER_N << uint32(100);
- for(OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
+ for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
{
itr->second->FillInitialWorldStates(data);
}
diff --git a/src/game/OutdoorPvPHP.cpp b/src/game/OutdoorPvPHP.cpp
index a25cb86dc21..bdfd6fbd640 100644
--- a/src/game/OutdoorPvPHP.cpp
+++ b/src/game/OutdoorPvPHP.cpp
@@ -69,7 +69,7 @@ bool OutdoorPvPHP::SetupOutdoorPvP()
m_AllianceTowersControlled = 0;
m_HordeTowersControlled = 0;
// add the zones affected by the pvp buff
- for(int i = 0; i < OutdoorPvPHPBuffZonesNum; ++i)
+ for (int i = 0; i < OutdoorPvPHPBuffZonesNum; ++i)
RegisterZone(OutdoorPvPHPBuffZones[i]);
AddCapturePoint(new OPvPCapturePointHP(this,HP_TOWER_BROKEN_HILL));
@@ -140,7 +140,7 @@ void OutdoorPvPHP::SendRemoveWorldStates(Player *plr)
plr->SendUpdateWorldState(HP_UI_TOWER_SLIDER_N,0);
plr->SendUpdateWorldState(HP_UI_TOWER_SLIDER_POS,0);
plr->SendUpdateWorldState(HP_UI_TOWER_SLIDER_DISPLAY,0);
- for(int i = 0; i < HP_TOWER_NUM; ++i)
+ for (int i = 0; i < HP_TOWER_NUM; ++i)
{
plr->SendUpdateWorldState(HP_MAP_N[i],0);
plr->SendUpdateWorldState(HP_MAP_A[i],0);
@@ -157,7 +157,7 @@ void OutdoorPvPHP::FillInitialWorldStates(WorldPacket &data)
data << uint32(HP_UI_TOWER_SLIDER_DISPLAY) << uint32(0);
data << uint32(HP_UI_TOWER_SLIDER_POS) << uint32(50);
data << uint32(HP_UI_TOWER_SLIDER_N) << uint32(100);
- for(OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
+ for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
{
itr->second->FillInitialWorldStates(data);
}
diff --git a/src/game/OutdoorPvPMgr.cpp b/src/game/OutdoorPvPMgr.cpp
index 8a59b438d5b..bf94d686f88 100644
--- a/src/game/OutdoorPvPMgr.cpp
+++ b/src/game/OutdoorPvPMgr.cpp
@@ -38,7 +38,7 @@ OutdoorPvPMgr::OutdoorPvPMgr()
OutdoorPvPMgr::~OutdoorPvPMgr()
{
//sLog.outDebug("Deleting OutdoorPvPMgr");
- for(OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
+ for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
{
(*itr)->DeleteSpawns();
}
@@ -60,7 +60,6 @@ void OutdoorPvPMgr::InitOutdoorPvP()
sLog.outDebug("OutdoorPvP : HP successfully initiated.");
}
-
pOP = new OutdoorPvPNA;
// respawn, init variables
if(!pOP->SetupOutdoorPvP())
@@ -74,7 +73,6 @@ void OutdoorPvPMgr::InitOutdoorPvP()
sLog.outDebug("OutdoorPvP : NA successfully initiated.");
}
-
pOP = new OutdoorPvPTF;
// respawn, init variables
if(!pOP->SetupOutdoorPvP())
@@ -146,7 +144,6 @@ void OutdoorPvPMgr::AddZone(uint32 zoneid, OutdoorPvP *handle)
m_OutdoorPvPMap[zoneid] = handle;
}
-
void OutdoorPvPMgr::HandlePlayerEnterZone(Player *plr, uint32 zoneid)
{
OutdoorPvPMap::iterator itr = m_OutdoorPvPMap.find(zoneid);
@@ -190,7 +187,7 @@ void OutdoorPvPMgr::Update(uint32 diff)
m_UpdateTimer += diff;
if(m_UpdateTimer > OUTDOORPVP_OBJECTIVE_UPDATE_INTERVAL)
{
- for(OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
+ for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
(*itr)->Update(m_UpdateTimer);
m_UpdateTimer = 0;
}
@@ -198,7 +195,7 @@ void OutdoorPvPMgr::Update(uint32 diff)
bool OutdoorPvPMgr::HandleCustomSpell(Player *plr, uint32 spellId, GameObject * go)
{
- for(OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
+ for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
{
if((*itr)->HandleCustomSpell(plr,spellId,go))
return true;
@@ -217,7 +214,7 @@ ZoneScript * OutdoorPvPMgr::GetZoneScript(uint32 zoneId)
bool OutdoorPvPMgr::HandleOpenGo(Player *plr, uint64 guid)
{
- for(OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
+ for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
{
if((*itr)->HandleOpenGo(plr,guid))
return true;
@@ -227,7 +224,7 @@ bool OutdoorPvPMgr::HandleOpenGo(Player *plr, uint64 guid)
void OutdoorPvPMgr::HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid)
{
- for(OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
+ for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
{
if((*itr)->HandleGossipOption(plr,guid,gossipid))
return;
@@ -236,7 +233,7 @@ void OutdoorPvPMgr::HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid
bool OutdoorPvPMgr::CanTalkTo(Player * plr, Creature * c, GossipOption & gso)
{
- for(OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
+ for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
{
if((*itr)->CanTalkTo(plr,c,gso))
return true;
@@ -246,7 +243,7 @@ bool OutdoorPvPMgr::CanTalkTo(Player * plr, Creature * c, GossipOption & gso)
void OutdoorPvPMgr::HandleDropFlag(Player *plr, uint32 spellId)
{
- for(OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
+ for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
{
if((*itr)->HandleDropFlag(plr,spellId))
return;
diff --git a/src/game/OutdoorPvPMgr.h b/src/game/OutdoorPvPMgr.h
index d3b1af92e97..6ecf129165a 100644
--- a/src/game/OutdoorPvPMgr.h
+++ b/src/game/OutdoorPvPMgr.h
@@ -51,7 +51,7 @@ public:
bool HandleCustomSpell(Player * plr, uint32 spellId, GameObject* go);
// handle custom go if registered
bool HandleOpenGo(Player * plr, uint64 guid);
-
+
ZoneScript * GetZoneScript(uint32 zoneId);
void AddZone(uint32 zoneid, OutdoorPvP * handle);
diff --git a/src/game/OutdoorPvPNA.cpp b/src/game/OutdoorPvPNA.cpp
index 035d6ce9405..84cecd55f31 100644
--- a/src/game/OutdoorPvPNA.cpp
+++ b/src/game/OutdoorPvPNA.cpp
@@ -44,7 +44,7 @@ void OutdoorPvPNA::HandleKillImpl(Player *plr, Unit * killed)
uint32 OPvPCapturePointNA::GetAliveGuardsCount()
{
uint32 cnt = 0;
- for(std::map<uint32, uint64>::iterator itr = m_Creatures.begin(); itr != m_Creatures.end(); ++itr)
+ for (std::map<uint32, uint64>::iterator itr = m_Creatures.begin(); itr != m_Creatures.end(); ++itr)
{
switch(itr->first)
{
@@ -92,13 +92,13 @@ void OPvPCapturePointNA::SpawnNPCsForTeam(uint32 team)
creatures=HordeControlNPCs;
else
return;
- for(int i = 0; i < NA_CONTROL_NPC_NUM; ++i)
+ for (int i = 0; i < NA_CONTROL_NPC_NUM; ++i)
AddCreature(i,creatures[i].entry,creatures[i].teamval,creatures[i].map,creatures[i].x,creatures[i].y,creatures[i].z,creatures[i].o,1000000);
}
void OPvPCapturePointNA::DeSpawnNPCs()
{
- for(int i = 0; i < NA_CONTROL_NPC_NUM; ++i)
+ for (int i = 0; i < NA_CONTROL_NPC_NUM; ++i)
DelCreature(i);
}
@@ -111,7 +111,7 @@ void OPvPCapturePointNA::SpawnGOsForTeam(uint32 team)
gos=HordeControlGOs;
else
return;
- for(int i = 0; i < NA_CONTROL_GO_NUM; ++i)
+ for (int i = 0; i < NA_CONTROL_GO_NUM; ++i)
{
if( i == NA_ROOST_S ||
i == NA_ROOST_W ||
@@ -128,7 +128,7 @@ void OPvPCapturePointNA::SpawnGOsForTeam(uint32 team)
void OPvPCapturePointNA::DeSpawnGOs()
{
- for(int i = 0; i < NA_CONTROL_GO_NUM; ++i)
+ for (int i = 0; i < NA_CONTROL_GO_NUM; ++i)
{
DelObject(i);
}
diff --git a/src/game/OutdoorPvPSI.cpp b/src/game/OutdoorPvPSI.cpp
index e60888c7e08..8f63fd881dc 100644
--- a/src/game/OutdoorPvPSI.cpp
+++ b/src/game/OutdoorPvPSI.cpp
@@ -57,7 +57,7 @@ void OutdoorPvPSI::UpdateWorldState()
bool OutdoorPvPSI::SetupOutdoorPvP()
{
- for(int i = 0; i < OutdoorPvPSIBuffZonesNum; ++i)
+ for (int i = 0; i < OutdoorPvPSIBuffZonesNum; ++i)
RegisterZone(OutdoorPvPSIBuffZones[i]);
return true;
}
@@ -162,7 +162,7 @@ bool OutdoorPvPSI::HandleDropFlag(Player *plr, uint32 spellId)
delete go;
return true;
}
-
+
if(!go->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT),SI_SILITHYST_MOUND, map, plr->GetPhaseMask(), plr->GetPositionX(),plr->GetPositionY(),plr->GetPositionZ(),plr->GetOrientation(),0,0,0,0,100,GO_STATE_READY))
{
delete go;
diff --git a/src/game/OutdoorPvPTF.cpp b/src/game/OutdoorPvPTF.cpp
index 5a8483a2c11..c2a9db0d4bd 100644
--- a/src/game/OutdoorPvPTF.cpp
+++ b/src/game/OutdoorPvPTF.cpp
@@ -60,7 +60,7 @@ void OutdoorPvPTF::FillInitialWorldStates(WorldPacket &data)
data << TF_UI_LOCKED_DISPLAY_HORDE << uint32(m_IsLocked && (m_HordeTowersControlled > m_AllianceTowersControlled));
data << TF_UI_LOCKED_DISPLAY_ALLIANCE << uint32(m_IsLocked && (m_HordeTowersControlled < m_AllianceTowersControlled));
- for(OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
+ for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
{
itr->second->FillInitialWorldStates(data);
}
@@ -84,7 +84,7 @@ void OutdoorPvPTF::SendRemoveWorldStates(Player * plr)
plr->SendUpdateWorldState(TF_UI_LOCKED_DISPLAY_HORDE,uint32(0));
plr->SendUpdateWorldState(TF_UI_LOCKED_DISPLAY_ALLIANCE,uint32(0));
- for(int i = 0; i < TF_TOWER_NUM; ++i)
+ for (int i = 0; i < TF_TOWER_NUM; ++i)
{
plr->SendUpdateWorldState(uint32(TFTowerWorldStates[i].n),uint32(0));
plr->SendUpdateWorldState(uint32(TFTowerWorldStates[i].h),uint32(0));
@@ -220,7 +220,7 @@ bool OutdoorPvPTF::SetupOutdoorPvP()
first_digit = 0;
// add the zones affected by the pvp buff
- for(int i = 0; i < OutdoorPvPTFBuffZonesNum; ++i)
+ for (int i = 0; i < OutdoorPvPTFBuffZonesNum; ++i)
RegisterZone(OutdoorPvPTFBuffZones[i]);
AddCapturePoint(new OPvPCapturePointTF(this,TF_TOWER_NW));
diff --git a/src/game/OutdoorPvPZM.cpp b/src/game/OutdoorPvPZM.cpp
index 550dbcccdc8..4f3f0a08a2c 100644
--- a/src/game/OutdoorPvPZM.cpp
+++ b/src/game/OutdoorPvPZM.cpp
@@ -179,7 +179,7 @@ bool OutdoorPvPZM::SetupOutdoorPvP()
m_HordeTowersControlled = 0;
// add the zones affected by the pvp buff
- for(int i = 0; i < OutdoorPvPZMBuffZonesNum; ++i)
+ for (int i = 0; i < OutdoorPvPZMBuffZonesNum; ++i)
RegisterZone(OutdoorPvPZMBuffZones[i]);
AddCapturePoint(new OPvPCapturePointZM_Beacon(this,ZM_BEACON_WEST));
@@ -391,7 +391,7 @@ bool OPvPCapturePointZM_GraveYard::HandleDropFlag(Player * plr, uint32 spellId)
void OutdoorPvPZM::FillInitialWorldStates(WorldPacket &data)
{
data << ZM_WORLDSTATE_UNK_1 << uint32(1);
- for(OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
+ for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
{
itr->second->FillInitialWorldStates(data);
}
diff --git a/src/game/Path.h b/src/game/Path.h
index 2fd6723b01c..b4fa5f9da0c 100644
--- a/src/game/Path.h
+++ b/src/game/Path.h
@@ -46,7 +46,7 @@ class Path
float GetTotalLength(uint32 start, uint32 end) const
{
float len = 0, xd, yd, zd;
- for(unsigned int idx=start+1; idx < end; ++idx)
+ for (unsigned int idx=start+1; idx < end; ++idx)
{
xd = i_nodes[ idx ].x - i_nodes[ idx-1 ].x;
yd = i_nodes[ idx ].y - i_nodes[ idx-1 ].y;
@@ -59,7 +59,7 @@ class Path
float GetPassedLength(uint32 curnode, float x, float y, float z)
{
float len = 0, xd, yd, zd;
- for(unsigned int idx=1; idx < curnode; ++idx)
+ for (unsigned int idx=1; idx < curnode; ++idx)
{
xd = i_nodes[ idx ].x - i_nodes[ idx-1 ].x;
yd = i_nodes[ idx ].y - i_nodes[ idx-1 ].y;
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index 47d406f6453..7df9deabc6f 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -339,7 +339,7 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
m_declinedname = new DeclinedName;
Field *fields2 = result->Fetch();
- for(uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
+ for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
{
m_declinedname->name[i] = fields2[i].GetCppString();
}
@@ -436,7 +436,7 @@ void Pet::SavePetToDB(PetSaveMode mode)
<< GetPower(POWER_HAPPINESS) << ", '";
// save only spell slots from action bar
- for(uint32 i = ACTION_BAR_INDEX_PET_SPELL_START; i < ACTION_BAR_INDEX_PET_SPELL_END; ++i)
+ for (uint32 i = ACTION_BAR_INDEX_PET_SPELL_START; i < ACTION_BAR_INDEX_PET_SPELL_END; ++i)
{
ss << uint32(m_charmInfo->GetActionBarEntry(i)->GetType()) << " "
<< uint32(m_charmInfo->GetActionBarEntry(i)->GetAction()) << " ";
@@ -567,7 +567,7 @@ void Pet::Update(uint32 diff)
m_regenTimer = 0;
break;
}
- }
+ }
}
if(getPetType() != HUNTER_PET)
@@ -619,7 +619,7 @@ void Creature::Regenerate(Powers power)
// Apply modifiers (if any).
AuraEffectList const& ModPowerRegenPCTAuras = GetAurasByType(SPELL_AURA_MOD_POWER_REGEN_PERCENT);
- for(AuraEffectList::const_iterator i = ModPowerRegenPCTAuras.begin(); i != ModPowerRegenPCTAuras.end(); ++i)
+ for (AuraEffectList::const_iterator i = ModPowerRegenPCTAuras.begin(); i != ModPowerRegenPCTAuras.end(); ++i)
if ((*i)->GetMiscValue() == power)
addvalue *= ((*i)->GetAmount() + 100) / 100.0f;
@@ -669,7 +669,7 @@ bool Pet::CanTakeMoreActiveSpells(uint32 spellid)
uint8 x;
- for(x = 0; x < activecount; x++)
+ for (x = 0; x < activecount; x++)
{
if(chainstart == chainstartstore[x])
break;
@@ -872,7 +872,7 @@ bool Guardian::InitStatsForLevel(uint32 petlevel)
if(pInfo->armor > 0)
SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, float(pInfo->armor));
- for(uint8 stat = 0; stat < MAX_STATS; ++stat)
+ for (uint8 stat = 0; stat < MAX_STATS; ++stat)
SetCreateStat(Stats(stat), float(pInfo->stats[stat]));
}
else // not exist in DB, use some default fake data
@@ -1095,7 +1095,7 @@ void Pet::_SaveSpellCooldowns()
time_t curTime = time(NULL);
// remove oudated and save active
- for(CreatureSpellCooldowns::iterator itr = m_CreatureSpellCooldowns.begin();itr != m_CreatureSpellCooldowns.end();)
+ for (CreatureSpellCooldowns::iterator itr = m_CreatureSpellCooldowns.begin(); itr != m_CreatureSpellCooldowns.end(); )
{
if(itr->second <= curTime)
m_CreatureSpellCooldowns.erase(itr++);
@@ -1225,7 +1225,7 @@ void Pet::_SaveAuras()
CharacterDatabase.PExecute("DELETE FROM pet_aura WHERE guid = '%u'", m_charmInfo->GetPetNumber());
AuraMap const& auras = GetAuras();
- for(AuraMap::const_iterator itr = auras.begin(); itr !=auras.end() ; ++itr)
+ for (AuraMap::const_iterator itr = auras.begin(); itr !=auras.end() ; ++itr)
{
if(!itr->second->CanBeSaved())
continue;
@@ -1309,7 +1309,7 @@ bool Pet::addSpell(uint32 spell_id,ActiveStates active /*= ACT_DECIDE*/, PetSpel
{
if(TalentEntry const *talentInfo = sTalentStore.LookupEntry( talentPos->talent_id ))
{
- for(uint8 i=0; i < MAX_TALENT_RANK; ++i)
+ for (uint8 i=0; i < MAX_TALENT_RANK; ++i)
{
// skip learning spell and no rank spell case
uint32 rankSpellId = talentInfo->RankID[i];
@@ -1395,7 +1395,7 @@ void Pet::InitLevelupSpellsForLevel()
if(PetLevelupSpellSet const *levelupSpells = GetCreatureInfo()->family ? spellmgr.GetPetLevelupSpellList(GetCreatureInfo()->family) : NULL)
{
// PetLevelupSpellSet ordered by levels, process in reversed order
- for(PetLevelupSpellSet::const_reverse_iterator itr = levelupSpells->rbegin(); itr != levelupSpells->rend(); ++itr)
+ for (PetLevelupSpellSet::const_reverse_iterator itr = levelupSpells->rbegin(); itr != levelupSpells->rend(); ++itr)
{
// will called first if level down
if(itr->first > level)
@@ -1411,7 +1411,7 @@ void Pet::InitLevelupSpellsForLevel()
// default spells (can be not learned if pet level (as owner level decrease result for example) less first possible in normal game)
if(PetDefaultSpellsEntry const *defSpells = spellmgr.GetPetDefaultSpellsEntry(petSpellsId))
{
- for(uint8 i = 0; i < MAX_CREATURE_SPELL_DATA_SLOT; ++i)
+ for (uint8 i = 0; i < MAX_CREATURE_SPELL_DATA_SLOT; ++i)
{
SpellEntry const* spellEntry = sSpellStore.LookupEntry(defSpells->spellid[i]);
if(!spellEntry)
@@ -1493,10 +1493,9 @@ bool Pet::removeSpell(uint32 spell_id, bool learn_prev, bool clear_ab)
return true;
}
-
void Pet::CleanupActionBar()
{
- for(uint8 i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i)
+ for (uint8 i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i)
if(UnitActionBarEntry const* ab = m_charmInfo->GetActionBarEntry(i))
if(ab->GetAction() && ab->IsActionBarForSpell())
{
@@ -1577,7 +1576,7 @@ bool Pet::resetTalents(bool no_cost)
for (int j = 0; j < MAX_TALENT_RANK; j++)
{
- for(PetSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end();)
+ for (PetSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); )
{
if(itr->second.state == PETSPELL_REMOVED)
{
@@ -1855,7 +1854,7 @@ void Pet::LearnPetPassives()
// For general hunter pets skill 270
// Passive 01~10, Passive 00 (20782, not used), Ferocious Inspiration (34457)
// Scale 01~03 (34902~34904, bonus from owner, not used)
- for(PetFamilySpellsSet::const_iterator petSet = petStore->second.begin(); petSet != petStore->second.end(); ++petSet)
+ for (PetFamilySpellsSet::const_iterator petSet = petStore->second.begin(); petSet != petStore->second.end(); ++petSet)
addSpell(*petSet, ACT_DECIDE, PETSPELL_NEW, PETSPELL_FAMILY);
}
}
@@ -1869,7 +1868,7 @@ void Pet::CastPetAuras(bool current)
if(!IsPermanentPetFor((Player*)owner))
return;
- for(PetAuraSet::const_iterator itr = owner->m_petAuras.begin(); itr != owner->m_petAuras.end();)
+ for (PetAuraSet::const_iterator itr = owner->m_petAuras.begin(); itr != owner->m_petAuras.end(); )
{
PetAura const* pa = *itr;
++itr;
diff --git a/src/game/PetAI.cpp b/src/game/PetAI.cpp
index 534500e51ea..fc305d5f122 100644
--- a/src/game/PetAI.cpp
+++ b/src/game/PetAI.cpp
@@ -171,7 +171,7 @@ void PetAI::UpdateAI(const uint32 diff)
else
{
bool spellUsed = false;
- for(std::set<uint64>::const_iterator tar = m_AllySet.begin(); tar != m_AllySet.end(); ++tar)
+ for (std::set<uint64>::const_iterator tar = m_AllySet.begin(); tar != m_AllySet.end(); ++tar)
{
Unit* Target = ObjectAccessor::GetUnit(*m_creature,*tar);
@@ -220,7 +220,7 @@ void PetAI::UpdateAI(const uint32 diff)
}
// deleted cached Spell objects
- for(TargetSpellList::const_iterator itr = targetSpellStore.begin(); itr != targetSpellStore.end(); ++itr)
+ for (TargetSpellList::const_iterator itr = targetSpellStore.begin(); itr != targetSpellStore.end(); ++itr)
delete itr->second;
}
}
@@ -248,7 +248,7 @@ void PetAI::UpdateAllies()
m_AllySet.insert(m_creature->GetGUID());
if(pGroup) //add group
{
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* Target = itr->getSource();
if(!Target || !pGroup->SameSubGroup((Player*)owner, Target))
diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp
index 733a857373b..41cafc3c7a4 100644
--- a/src/game/PetHandler.cpp
+++ b/src/game/PetHandler.cpp
@@ -69,10 +69,10 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
{
//If a pet is dismissed, m_Controlled will change
std::vector<Unit*> controlled;
- for(Unit::ControlList::iterator itr = GetPlayer()->m_Controlled.begin(); itr != GetPlayer()->m_Controlled.end(); ++itr)
+ for (Unit::ControlList::iterator itr = GetPlayer()->m_Controlled.begin(); itr != GetPlayer()->m_Controlled.end(); ++itr)
if((*itr)->GetEntry() == pet->GetEntry() && (*itr)->isAlive())
controlled.push_back(*itr);
- for(std::vector<Unit*>::iterator itr = controlled.begin(); itr != controlled.end(); ++itr)
+ for (std::vector<Unit*>::iterator itr = controlled.begin(); itr != controlled.end(); ++itr)
HandlePetActionHelper(*itr, guid1, spellid, flag, guid2);
}
}
@@ -140,7 +140,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
return;
}
-
+
pet->clearUnitState(UNIT_STAT_FOLLOW);
// This is true if pet has no target or has target but targets differs.
if(pet->getVictim() != TargetUnit || ( pet->getVictim() == TargetUnit && !pet->GetCharmInfo()->IsCommandAttack() ))
@@ -238,7 +238,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
return;
}
- for(uint32 i = 0; i < 3;++i)
+ for (uint32 i = 0; i < 3; ++i)
{
if(spellInfo->EffectImplicitTargetA[i] == TARGET_UNIT_AREA_ENEMY_SRC || spellInfo->EffectImplicitTargetA[i] == TARGET_UNIT_AREA_ENEMY_DST || spellInfo->EffectImplicitTargetA[i] == TARGET_DEST_DYNOBJ_ENEMY)
return;
@@ -366,7 +366,7 @@ void WorldSession::SendPetNameQuery( uint64 petguid, uint32 petnumber)
if( pet->isPet() && ((Pet*)pet)->GetDeclinedNames() )
{
data << uint8(1);
- for(uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
+ for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
data << ((Pet*)pet)->GetDeclinedNames()->name[i];
}
else
@@ -400,7 +400,7 @@ void WorldSession::HandlePetSetAction( WorldPacket & recv_data )
}
count = (recv_data.size() == 24) ? 2 : 1;
- for(uint8 i = 0; i < count; ++i)
+ for (uint8 i = 0; i < count; ++i)
{
uint32 position;
uint32 data;
@@ -487,7 +487,7 @@ void WorldSession::HandlePetRename( WorldPacket & recv_data )
if(isdeclined)
{
- for(uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
+ for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
{
recv_data >> declinedname.name[i];
}
@@ -504,7 +504,7 @@ void WorldSession::HandlePetRename( WorldPacket & recv_data )
CharacterDatabase.BeginTransaction();
if(isdeclined)
{
- for(uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
+ for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
CharacterDatabase.escape_string(declinedname.name[i]);
CharacterDatabase.PExecute("DELETE FROM character_pet_declinedname WHERE owner = '%u' AND id = '%u'", _player->GetGUIDLow(), pet->GetCharmInfo()->GetPetNumber());
CharacterDatabase.PExecute("INSERT INTO character_pet_declinedname (id, owner, genitive, dative, accusative, instrumental, prepositional) VALUES ('%u','%u','%s','%s','%s','%s','%s')",
@@ -720,7 +720,7 @@ void WorldSession::SendPetNameInvalid(uint32 error, const std::string& name, Dec
if(declinedName)
{
data << uint8(1);
- for(uint32 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
+ for (uint32 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
data << declinedName->name[i];
}
else
@@ -752,7 +752,7 @@ void WorldSession::HandleLearnPreviewTalentsPet( WorldPacket & recv_data )
uint32 talentId, talentRank;
- for(uint32 i = 0; i < talentsCount; ++i)
+ for (uint32 i = 0; i < talentsCount; ++i)
{
recv_data >> talentId >> talentRank;
diff --git a/src/game/PetitionsHandler.cpp b/src/game/PetitionsHandler.cpp
index fe719b1b671..718f063beca 100644
--- a/src/game/PetitionsHandler.cpp
+++ b/src/game/PetitionsHandler.cpp
@@ -272,7 +272,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data)
data << petitionguid_low; // guild guid (in Trinity always same as GUID_LOPART(petitionguid)
data << signs; // sign's count
- for(uint8 i = 1; i <= signs; ++i)
+ for (uint8 i = 1; i <= signs; ++i)
{
Field *fields2 = result->Fetch();
uint64 plguid = fields2[0].GetUInt64();
@@ -673,7 +673,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data)
data << GUID_LOPART(petitionguid); // guild guid (in Trinity always same as GUID_LOPART(petition guid)
data << signs; // sign's count
- for(uint8 i = 1; i <= signs; ++i)
+ for (uint8 i = 1; i <= signs; ++i)
{
Field *fields2 = result->Fetch();
plguid = fields2[0].GetUInt64();
@@ -818,7 +818,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
objmgr.AddGuild(guild);
// add members
- for(uint8 i = 0; i < signs; ++i)
+ for (uint8 i = 0; i < signs; ++i)
{
Field* fields = result->Fetch();
guild->AddMember(fields[0].GetUInt64(), guild->GetLowestRank());
@@ -846,7 +846,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
sLog.outDebug("PetitonsHandler: arena team added to objmrg");
// add members
- for(uint8 i = 0; i < signs; ++i)
+ for (uint8 i = 0; i < signs; ++i)
{
Field* fields = result->Fetch();
uint64 memberGUID = fields[0].GetUInt64();
@@ -937,7 +937,7 @@ void WorldSession::SendPetitionShowList(uint64 guid)
data << uint32(5); // unknown
data << uint32(5); // required signs?
}
- //for(uint8 i = 0; i < count; ++i)
+ //for (uint8 i = 0; i < count; ++i)
//{
// data << uint32(i); // index
// data << uint32(GUILD_CHARTER); // charter entry
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 2d49a7559e9..2abac550ca9 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -140,7 +140,7 @@ void PlayerTaxi::InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint32 leve
{
case CLASS_DEATH_KNIGHT:
{
- for(uint8 i = 0; i < TaxiMaskSize; ++i)
+ for (uint8 i = 0; i < TaxiMaskSize; ++i)
m_taximask[i] |= sOldContinentsNodesMask[i];
break;
}
@@ -207,7 +207,7 @@ bool PlayerTaxi::LoadTaxiDestinationsFromString( const std::string& values, uint
Tokens tokens = StrSplit(values," ");
- for(Tokens::iterator iter = tokens.begin(); iter != tokens.end(); ++iter)
+ for (Tokens::iterator iter = tokens.begin(); iter != tokens.end(); ++iter)
{
uint32 node = uint32(atol(iter->c_str()));
AddTaxiDestination(node);
@@ -220,7 +220,7 @@ bool PlayerTaxi::LoadTaxiDestinationsFromString( const std::string& values, uint
if(m_TaxiDestinations.size() < 2)
return false;
- for(size_t i = 1; i < m_TaxiDestinations.size(); ++i)
+ for (size_t i = 1; i < m_TaxiDestinations.size(); ++i)
{
uint32 cost;
uint32 path;
@@ -243,7 +243,7 @@ std::string PlayerTaxi::SaveTaxiDestinationsToString()
std::ostringstream ss;
- for(size_t i=0; i < m_TaxiDestinations.size(); ++i)
+ for (size_t i=0; i < m_TaxiDestinations.size(); ++i)
ss << m_TaxiDestinations[i] << " ";
return ss.str();
@@ -265,7 +265,7 @@ uint32 PlayerTaxi::GetCurrentTaxiPath() const
std::ostringstream& operator<< (std::ostringstream& ss, PlayerTaxi const& taxi)
{
ss << "'";
- for(uint8 i = 0; i < TaxiMaskSize; ++i)
+ for (uint8 i = 0; i < TaxiMaskSize; ++i)
ss << taxi.m_taximask[i] << " ";
ss << "'";
return ss;
@@ -485,7 +485,7 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa
m_ChampioningFaction = 0;
- for(int i = 0; i < MAX_POWERS; ++i)
+ for (int i = 0; i < MAX_POWERS; ++i)
m_powerFraction[i] = 0;
}
@@ -495,7 +495,7 @@ Player::~Player ()
//m_social = NULL;
// Note: buy back item already deleted from DB when player was saved
- for(uint8 i = 0; i < PLAYER_SLOTS_COUNT; ++i)
+ for (uint8 i = 0; i < PLAYER_SLOTS_COUNT; ++i)
{
if(m_items[i])
delete m_items[i];
@@ -512,7 +512,7 @@ Player::~Player ()
}
//all mailed items should be deleted, also all mail should be deallocated
- for (PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end();++itr)
+ for (PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end(); ++itr)
delete *itr;
for (ItemMap::iterator iter = mMitems.begin(); iter != mMitems.end(); ++iter)
@@ -520,7 +520,7 @@ Player::~Player ()
delete PlayerTalkClass;
- for(size_t x = 0; x < ItemSetEff.size(); x++)
+ for (size_t x = 0; x < ItemSetEff.size(); x++)
if(ItemSetEff[x])
delete ItemSetEff[x];
@@ -541,8 +541,8 @@ void Player::CleanupsBeforeDelete()
m_transport->RemovePassenger(this);
// clean up player-instance binds, may unload some instance saves
- for(uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i)
- for(BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end(); ++itr)
+ for (uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i)
+ for (BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end(); ++itr)
itr->second.save->RemovePlayer(this);
}
@@ -737,7 +737,7 @@ bool Player::Create( uint32 guidlow, const std::string& name, uint8 race, uint8
if(oEntry)
{
- for(int j = 0; j < MAX_OUTFIT_ITEMS; ++j)
+ for (int j = 0; j < MAX_OUTFIT_ITEMS; ++j)
{
if(oEntry->ItemId[j] <= 0)
continue;
@@ -784,7 +784,7 @@ bool Player::Create( uint32 guidlow, const std::string& name, uint8 race, uint8
// bags and main-hand weapon must equipped at this moment
// now second pass for not equipped (offhand weapon/shield if it attempt equipped before main-hand weapon)
// or ammo not equipped in special bag
- for(uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
+ for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
{
if(Item* pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
{
@@ -936,7 +936,7 @@ int32 Player::getMaxTimer(MirrorTimerType timer)
return DISABLED_MIRROR_TIMER;
int32 UnderWaterTime = 3*MINUTE*IN_MILISECONDS;
AuraEffectList const& mModWaterBreathing = GetAurasByType(SPELL_AURA_MOD_WATER_BREATHING);
- for(AuraEffectList::const_iterator i = mModWaterBreathing.begin(); i != mModWaterBreathing.end(); ++i)
+ for (AuraEffectList::const_iterator i = mModWaterBreathing.begin(); i != mModWaterBreathing.end(); ++i)
UnderWaterTime = uint32(UnderWaterTime * (100.0f + (*i)->GetAmount()) / 100.0f);
return UnderWaterTime;
}
@@ -1285,7 +1285,7 @@ void Player::Update( uint32 p_time )
}
}
}
-
+
if (m_weaponChangeTimer > 0)
{
if(p_time >= m_weaponChangeTimer)
@@ -1574,7 +1574,7 @@ bool Player::BuildEnumData( QueryResult * result, WorldPacket * p_data )
SpellItemEnchantmentEntry const *enchant = NULL;
uint32 enchants = GetUInt32ValueFromArray(data, visualbase + 1);
- for(uint8 enchantSlot = PERM_ENCHANTMENT_SLOT; enchantSlot <= TEMP_ENCHANTMENT_SLOT; ++enchantSlot)
+ for (uint8 enchantSlot = PERM_ENCHANTMENT_SLOT; enchantSlot <= TEMP_ENCHANTMENT_SLOT; ++enchantSlot)
{
// values stored in 2 uint16
uint32 enchantId = 0x0000FFFF & (enchants >> enchantSlot*16);
@@ -1975,7 +1975,7 @@ void Player::AddToWorld()
///- The player should only be added when logging in
Unit::AddToWorld();
- for(uint8 i = PLAYER_SLOT_START; i < PLAYER_SLOT_END; ++i)
+ for (uint8 i = PLAYER_SLOT_START; i < PLAYER_SLOT_END; ++i)
{
if(m_items[i])
m_items[i]->AddToWorld();
@@ -1999,7 +1999,7 @@ void Player::RemoveFromWorld()
///- The player should only be removed when logging out
Unit::RemoveFromWorld();
- for(uint8 i = PLAYER_SLOT_START; i < PLAYER_SLOT_END; ++i)
+ for (uint8 i = PLAYER_SLOT_START; i < PLAYER_SLOT_END; ++i)
{
if(m_items[i])
m_items[i]->RemoveFromWorld();
@@ -2022,13 +2022,13 @@ void Player::RegenerateAll()
{
//if (m_regenTimer <= 500)
// return;
-
+
m_regenTimerCount += m_regenTimer;
Regenerate( POWER_ENERGY );
Regenerate( POWER_MANA );
-
+
if(m_regenTimerCount >= 2000)
{
// Not in combat or they have regeneration
@@ -2057,7 +2057,7 @@ void Player::Regenerate(Powers power)
{
if(power == POWER_RUNE)
{
- for(uint32 i = 0; i < MAX_RUNES; ++i)
+ for (uint32 i = 0; i < MAX_RUNES; ++i)
if(uint8 cd = GetRuneCooldown(i)) // if we have cooldown, reduce it...
SetRuneCooldown(i, cd - 1); // ... by 2 sec (because update is every 2 sec)
}
@@ -2117,7 +2117,7 @@ void Player::Regenerate(Powers power)
if(power != POWER_MANA)
{
AuraEffectList const& ModPowerRegenPCTAuras = GetAurasByType(SPELL_AURA_MOD_POWER_REGEN_PERCENT);
- for(AuraEffectList::const_iterator i = ModPowerRegenPCTAuras.begin(); i != ModPowerRegenPCTAuras.end(); ++i)
+ for (AuraEffectList::const_iterator i = ModPowerRegenPCTAuras.begin(); i != ModPowerRegenPCTAuras.end(); ++i)
if ((*i)->GetMiscValue() == power)
addvalue *= ((*i)->GetAmount() + 100) / 100.0f;
}
@@ -2148,7 +2148,7 @@ void Player::Regenerate(Powers power)
{
curValue = 0;
m_powerFraction[power] = 0;
- }
+ }
}
if(m_regenTimerCount >= 2000)
SetPower(power, curValue);
@@ -2177,7 +2177,7 @@ void Player::RegenerateHealth()
if (!isInCombat())
{
AuraEffectList const& mModHealthRegenPct = GetAurasByType(SPELL_AURA_MOD_HEALTH_REGEN_PERCENT);
- for(AuraEffectList::const_iterator i = mModHealthRegenPct.begin(); i != mModHealthRegenPct.end(); ++i)
+ for (AuraEffectList::const_iterator i = mModHealthRegenPct.begin(); i != mModHealthRegenPct.end(); ++i)
addvalue *= (100.0f + (*i)->GetAmount()) / 100.0f;
}
else if(HasAuraType(SPELL_AURA_MOD_REGEN_DURING_COMBAT))
@@ -2520,7 +2520,7 @@ void Player::GiveLevel(uint32 level)
WorldPacket data(SMSG_LEVELUP_INFO, (4+4+MAX_POWERS*4+MAX_STATS*4));
data << uint32(level);
data << uint32(int32(classInfo.basehealth) - int32(GetCreateHealth()));
- // for(int i = 0; i < MAX_POWERS; ++i) // Powers loop (0-6)
+ // for (int i = 0; i < MAX_POWERS; ++i) // Powers loop (0-6)
data << uint32(int32(classInfo.basemana) - int32(GetCreateMana()));
data << uint32(0);
data << uint32(0);
@@ -2529,7 +2529,7 @@ void Player::GiveLevel(uint32 level)
data << uint32(0);
data << uint32(0);
// end for
- for(uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i) // Stats loop (0-4)
+ for (uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i) // Stats loop (0-4)
data << uint32(int32(info.stats[i]) - GetCreateStat(Stats(i)));
GetSession()->SendPacket(&data);
@@ -2546,7 +2546,7 @@ void Player::GiveLevel(uint32 level)
UpdateSkillsForLevel ();
// save base values (bonuses already included in stored stats
- for(uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i)
+ for (uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i)
SetCreateStat(Stats(i), info.stats[i]);
SetCreateHealth(classInfo.basehealth);
@@ -2642,10 +2642,10 @@ void Player::InitStatsForLevel(bool reapplyMods)
SetFloatValue(OBJECT_FIELD_SCALE_X,1.0f);
// save base values (bonuses already included in stored stats
- for(uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i)
+ for (uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i)
SetCreateStat(Stats(i), info.stats[i]);
- for(uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i)
+ for (uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i)
SetStat(Stats(i), info.stats[i]);
SetCreateHealth(classInfo.basehealth);
@@ -2658,7 +2658,7 @@ void Player::InitStatsForLevel(bool reapplyMods)
InitStatBuffMods();
//reset rating fields values
- for(uint16 index = PLAYER_FIELD_COMBAT_RATING_1; index < PLAYER_FIELD_COMBAT_RATING_1 + MAX_COMBAT_RATING; ++index)
+ for (uint16 index = PLAYER_FIELD_COMBAT_RATING_1; index < PLAYER_FIELD_COMBAT_RATING_1 + MAX_COMBAT_RATING; ++index)
SetUInt32Value(index, 0);
SetUInt32Value(PLAYER_FIELD_MOD_HEALING_DONE_POS,0);
@@ -2718,13 +2718,13 @@ void Player::InitStatsForLevel(bool reapplyMods)
SetUInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE,0);
SetUInt32Value(PLAYER_FIELD_MOD_TARGET_PHYSICAL_RESISTANCE,0);
- for(uint8 i = 0; i < MAX_SPELL_SCHOOL; ++i)
+ for (uint8 i = 0; i < MAX_SPELL_SCHOOL; ++i)
{
SetUInt32Value(UNIT_FIELD_POWER_COST_MODIFIER+i,0);
SetFloatValue(UNIT_FIELD_POWER_COST_MULTIPLIER+i,0.0f);
}
// Reset no reagent cost field
- for(uint8 i = 0; i < 3; i++)
+ for (uint8 i = 0; i < 3; i++)
SetUInt32Value(PLAYER_NO_REAGENT_COST_1 + i, 0);
// Init data for form but skip reapply item mods for form
InitDataForForm(reapplyMods);
@@ -2807,7 +2807,7 @@ void Player::SendInitialSpells()
uint16 spellCooldowns = m_spellCooldowns.size();
data << uint16(spellCooldowns);
- for(SpellCooldowns::const_iterator itr=m_spellCooldowns.begin(); itr!=m_spellCooldowns.end(); ++itr)
+ for (SpellCooldowns::const_iterator itr=m_spellCooldowns.begin(); itr!=m_spellCooldowns.end(); ++itr)
{
SpellEntry const *sEntry = sSpellStore.LookupEntry(itr->first);
if(!sEntry)
@@ -2847,7 +2847,7 @@ void Player::SendInitialSpells()
void Player::RemoveMail(uint32 id)
{
- for(PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end();++itr)
+ for (PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end(); ++itr)
{
if ((*itr)->messageID == id)
{
@@ -2889,7 +2889,7 @@ void Player::UpdateNextMailTimeAndUnreads()
time_t cTime = time(NULL);
m_nextMailDelivereTime = 0;
unReadMails = 0;
- for(PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end(); ++itr)
+ for (PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end(); ++itr)
{
if((*itr)->deliver_time > cTime)
{
@@ -2955,7 +2955,7 @@ bool Player::AddTalent(uint32 spell_id, uint8 spec, bool learning)
{
if(TalentEntry const *talentInfo = sTalentStore.LookupEntry( talentPos->talent_id ))
{
- for(uint8 rank = 0; rank < MAX_TALENT_RANK; ++rank)
+ for (uint8 rank = 0; rank < MAX_TALENT_RANK; ++rank)
{
// skip learning spell and no rank spell case
uint32 rankSpellId = talentInfo->RankID[rank];
@@ -2972,7 +2972,7 @@ bool Player::AddTalent(uint32 spell_id, uint8 spec, bool learning)
PlayerSpellState state = learning ? PLAYERSPELL_NEW : PLAYERSPELL_UNCHANGED;
PlayerTalent *newtalent = new PlayerTalent();
-
+
newtalent->state = state;
newtalent->spec = spec;
@@ -3136,7 +3136,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
{
if(TalentEntry const *talentInfo = sTalentStore.LookupEntry( talentPos->talent_id ))
{
- for(uint8 rank = 0; rank < MAX_TALENT_RANK; ++rank)
+ for (uint8 rank = 0; rank < MAX_TALENT_RANK; ++rank)
{
// skip learning spell and no rank spell case
uint32 rankSpellId = talentInfo->RankID[rank];
@@ -3165,7 +3165,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
// replace spells in action bars and spellbook to bigger rank if only one spell rank must be accessible
if(newspell->active && !newspell->disabled && !SpellMgr::canStackSpellRanks(spellInfo) && spellmgr.GetSpellRank(spellInfo->Id) != 0)
{
- for( PlayerSpellMap::iterator itr2 = m_spells.begin(); itr2 != m_spells.end(); ++itr2 )
+ for (PlayerSpellMap::iterator itr2 = m_spells.begin(); itr2 != m_spells.end(); ++itr2 )
{
if(itr2->second->state == PLAYERSPELL_REMOVED) continue;
SpellEntry const *i_spellInfo = sSpellStore.LookupEntry(itr2->first);
@@ -3274,7 +3274,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
else
{
// not ranked skills
- for(SkillLineAbilityMap::const_iterator _spell_idx = skill_bounds.first; _spell_idx != skill_bounds.second; ++_spell_idx)
+ for (SkillLineAbilityMap::const_iterator _spell_idx = skill_bounds.first; _spell_idx != skill_bounds.second; ++_spell_idx)
{
SkillLineEntry const *pSkill = sSkillLineStore.LookupEntry(_spell_idx->second->skillId);
if (!pSkill)
@@ -3308,7 +3308,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
// learn dependent spells
SpellLearnSpellMapBounds spell_bounds = spellmgr.GetSpellLearnSpellMapBounds(spell_id);
- for(SpellLearnSpellMap::const_iterator itr2 = spell_bounds.first; itr2 != spell_bounds.second; ++itr2)
+ for (SpellLearnSpellMap::const_iterator itr2 = spell_bounds.first; itr2 != spell_bounds.second; ++itr2)
{
if (!itr2->second.autoLearned)
{
@@ -3322,7 +3322,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
if (!GetSession()->PlayerLoading())
{
// not ranked skills
- for(SkillLineAbilityMap::const_iterator _spell_idx = skill_bounds.first; _spell_idx != skill_bounds.second; ++_spell_idx)
+ for (SkillLineAbilityMap::const_iterator _spell_idx = skill_bounds.first; _spell_idx != skill_bounds.second; ++_spell_idx)
{
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LINE,_spell_idx->second->skillId);
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILLLINE_SPELLS,_spell_idx->second->skillId);
@@ -3421,7 +3421,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
//unlearn spells dependent from recently removed spells
SpellsRequiringSpellMap const& reqMap = spellmgr.GetSpellsRequiringSpell();
SpellsRequiringSpellMap::const_iterator itr2 = reqMap.find(spell_id);
- for (uint32 i=reqMap.count(spell_id);i>0;i--,itr2++)
+ for (uint32 i=reqMap.count(spell_id); i>0; i--,itr2++)
removeSpell(itr2->second,disabled,false);
// re-search, it can be corrupted in prev loop
@@ -3452,7 +3452,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
RemoveAurasDueToSpell(spell_id);
// remove pet auras
- for(int i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ for (int i = 0; i < MAX_SPELL_EFFECTS; ++i)
if(PetAura const* petSpell = spellmgr.GetPetAura(spell_id, i))
RemovePetAura(petSpell);
@@ -3516,7 +3516,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
// not ranked skills
SkillLineAbilityMapBounds bounds = spellmgr.GetSkillLineAbilityMapBounds(spell_id);
- for(SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
+ for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
{
SkillLineEntry const *pSkill = sSkillLineStore.LookupEntry(_spell_idx->second->skillId);
if (!pSkill)
@@ -3540,7 +3540,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
// remove dependent spells
SpellLearnSpellMapBounds spell_bounds = spellmgr.GetSpellLearnSpellMapBounds(spell_id);
- for(SpellLearnSpellMap::const_iterator itr2 = spell_bounds.first; itr2 != spell_bounds.second; ++itr2)
+ for (SpellLearnSpellMap::const_iterator itr2 = spell_bounds.first; itr2 != spell_bounds.second; ++itr2)
removeSpell(itr2->second.spell, disabled);
// activate lesser rank in spellbook/action bar, and cast it if need
@@ -3587,7 +3587,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
}
}
}
-
+
if(spell_id == 46917 && m_canTitanGrip)
SetCanTitanGrip(false);
@@ -3616,7 +3616,7 @@ void Player::RemoveCategoryCooldown( uint32 cat )
{
SpellCategoryStore::const_iterator i_scstore = sSpellCategoryStore.find(cat);
if(i_scstore != sSpellCategoryStore.end())
- for(SpellCategorySet::const_iterator i_scset = i_scstore->second.begin(); i_scset != i_scstore->second.end(); ++i_scset)
+ for (SpellCategorySet::const_iterator i_scset = i_scstore->second.begin(); i_scset != i_scstore->second.end(); ++i_scset)
RemoveSpellCooldown(*i_scset, true);
}
@@ -3627,7 +3627,7 @@ void Player::RemoveSpellCategoryCooldown(uint32 cat, bool update /* = false */)
return;
const SpellCategorySet& ct_set = ct->second;
- for (SpellCooldowns::const_iterator i = m_spellCooldowns.begin(); i != m_spellCooldowns.end();)
+ for (SpellCooldowns::const_iterator i = m_spellCooldowns.begin(); i != m_spellCooldowns.end(); )
{
if (ct_set.find(i->first) != ct_set.end())
RemoveSpellCooldown((i++)->first, update);
@@ -3641,7 +3641,7 @@ void Player::RemoveArenaSpellCooldowns()
// remove cooldowns on spells that has < 15 min CD
SpellCooldowns::iterator itr, next;
// iterate spell cooldowns
- for(itr = m_spellCooldowns.begin();itr != m_spellCooldowns.end(); itr = next)
+ for (itr = m_spellCooldowns.begin(); itr != m_spellCooldowns.end(); itr = next)
{
next = itr;
++next;
@@ -3661,7 +3661,7 @@ void Player::RemoveAllSpellCooldown()
{
if(!m_spellCooldowns.empty())
{
- for(SpellCooldowns::const_iterator itr = m_spellCooldowns.begin();itr != m_spellCooldowns.end(); ++itr)
+ for (SpellCooldowns::const_iterator itr = m_spellCooldowns.begin(); itr != m_spellCooldowns.end(); ++itr)
SendClearCooldown(itr->first, this);
m_spellCooldowns.clear();
@@ -3714,7 +3714,7 @@ void Player::_SaveSpellCooldowns()
time_t infTime = curTime + infinityCooldownDelayCheck;
// remove outdated and save active
- for(SpellCooldowns::iterator itr = m_spellCooldowns.begin();itr != m_spellCooldowns.end();)
+ for (SpellCooldowns::iterator itr = m_spellCooldowns.begin(); itr != m_spellCooldowns.end(); )
{
if(itr->second.end <= curTime)
m_spellCooldowns.erase(itr++);
@@ -3804,11 +3804,11 @@ bool Player::resetTalents(bool no_cost)
// to prevent unexpected lost normal learned spell skip another class talents
if( (getClassMask() & talentTabInfo->ClassMask) == 0 )
continue;
-
+
// Re-use pre-dual talent way of resetting talents, to ensure talents aren't being stored in spell storage.
- for(uint8 rank = 0; rank < MAX_TALENT_RANK; ++rank)
+ for (uint8 rank = 0; rank < MAX_TALENT_RANK; ++rank)
{
- for(PlayerSpellMap::iterator itr = GetSpellMap().begin(); itr != GetSpellMap().end();)
+ for (PlayerSpellMap::iterator itr = GetSpellMap().begin(); itr != GetSpellMap().end(); )
{
if(itr->second->state == PLAYERSPELL_REMOVED || itr->second->disabled)
{
@@ -3871,7 +3871,7 @@ bool Player::resetTalents(bool no_cost)
Mail* Player::GetMail(uint32 id)
{
- for(PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end(); ++itr)
+ for (PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end(); ++itr)
{
if ((*itr)->messageID == id)
{
@@ -3889,7 +3889,7 @@ void Player::_SetCreateBits(UpdateMask *updateMask, Player *target) const
}
else
{
- for(uint16 index = 0; index < m_valuesCount; index++)
+ for (uint16 index = 0; index < m_valuesCount; index++)
{
if(GetUInt32Value(index) != 0 && updateVisualBits.GetBit(index))
updateMask->SetBit(index);
@@ -3982,11 +3982,11 @@ void Player::InitVisibleBits()
updateVisualBits.SetBit(PLAYER_GUILD_TIMESTAMP);
// PLAYER_QUEST_LOG_x also visible bit on official (but only on party/raid)...
- for(uint16 i = PLAYER_QUEST_LOG_1_1; i < PLAYER_QUEST_LOG_25_2; i += 4)
+ for (uint16 i = PLAYER_QUEST_LOG_1_1; i < PLAYER_QUEST_LOG_25_2; i += 4)
updateVisualBits.SetBit(i);
// Players visible items are not inventory stuff
- for(uint8 i = 0; i < EQUIPMENT_SLOT_END; ++i)
+ for (uint8 i = 0; i < EQUIPMENT_SLOT_END; ++i)
{
uint16 offset = i * 2;
@@ -4001,7 +4001,7 @@ void Player::InitVisibleBits()
void Player::BuildCreateUpdateBlockForPlayer( UpdateData *data, Player *target ) const
{
- for(uint8 i = 0; i < EQUIPMENT_SLOT_END; i++)
+ for (uint8 i = 0; i < EQUIPMENT_SLOT_END; i++)
{
if(m_items[i] == NULL)
continue;
@@ -4011,14 +4011,14 @@ void Player::BuildCreateUpdateBlockForPlayer( UpdateData *data, Player *target )
if(target == this)
{
- for(uint8 i = INVENTORY_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
+ for (uint8 i = INVENTORY_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
{
if(m_items[i] == NULL)
continue;
m_items[i]->BuildCreateUpdateBlockForPlayer( data, target );
}
- for(uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
+ for (uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
{
if(m_items[i] == NULL)
continue;
@@ -4034,7 +4034,7 @@ void Player::DestroyForPlayer( Player *target, bool anim ) const
{
Unit::DestroyForPlayer( target, anim );
- for(uint8 i = 0; i < INVENTORY_SLOT_BAG_END; i++)
+ for (uint8 i = 0; i < INVENTORY_SLOT_BAG_END; i++)
{
if(m_items[i] == NULL)
continue;
@@ -4044,14 +4044,14 @@ void Player::DestroyForPlayer( Player *target, bool anim ) const
if(target == this)
{
- for(uint8 i = INVENTORY_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
+ for (uint8 i = INVENTORY_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
{
if(m_items[i] == NULL)
continue;
m_items[i]->DestroyForPlayer( target );
}
- for(uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
+ for (uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
{
if(m_items[i] == NULL)
continue;
@@ -4585,25 +4585,25 @@ Corpse* Player::GetCorpse() const
void Player::DurabilityLossAll(double percent, bool inventory)
{
- for(uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; i++)
+ for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; i++)
if(Item *pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
DurabilityLoss(pItem,percent);
if(inventory)
{
// bags not have durability
- // for(int i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
+ // for (int i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
- for(uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
+ for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
if(Item *pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
DurabilityLoss(pItem,percent);
// keys not have durability
- //for(int i = KEYRING_SLOT_START; i < KEYRING_SLOT_END; i++)
+ //for (int i = KEYRING_SLOT_START; i < KEYRING_SLOT_END; i++)
- for(uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
+ for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
if(Bag* pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
- for(uint32 j = 0; j < pBag->GetBagSize(); j++)
+ for (uint32 j = 0; j < pBag->GetBagSize(); j++)
if(Item* pItem = GetItemByPos( i, j ))
DurabilityLoss(pItem,percent);
}
@@ -4629,25 +4629,25 @@ void Player::DurabilityLoss(Item* item, double percent)
void Player::DurabilityPointsLossAll(int32 points, bool inventory)
{
- for(uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; i++)
+ for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; i++)
if(Item *pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
DurabilityPointsLoss(pItem,points);
if(inventory)
{
// bags not have durability
- // for(int i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
+ // for (int i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
- for(uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
+ for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
if(Item *pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
DurabilityPointsLoss(pItem,points);
// keys not have durability
- //for(int i = KEYRING_SLOT_START; i < KEYRING_SLOT_END; i++)
+ //for (int i = KEYRING_SLOT_START; i < KEYRING_SLOT_END; i++)
- for(uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
+ for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
if(Bag* pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
- for(uint32 j = 0; j < pBag->GetBagSize(); j++)
+ for (uint32 j = 0; j < pBag->GetBagSize(); j++)
if(Item* pItem = GetItemByPos( i, j ))
DurabilityPointsLoss(pItem,points);
}
@@ -4690,14 +4690,14 @@ uint32 Player::DurabilityRepairAll(bool cost, float discountMod, bool guildBank)
{
uint32 TotalCost = 0;
// equipped, backpack, bags itself
- for(uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; i++)
+ for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; i++)
TotalCost += DurabilityRepair(( (INVENTORY_SLOT_BAG_0 << 8) | i ),cost,discountMod, guildBank);
// bank, buyback and keys not repaired
// items in inventory bags
- for(uint8 j = INVENTORY_SLOT_BAG_START; j < INVENTORY_SLOT_BAG_END; j++)
- for(uint8 i = 0; i < MAX_BAG_SIZE; i++)
+ for (uint8 j = INVENTORY_SLOT_BAG_START; j < INVENTORY_SLOT_BAG_END; j++)
+ for (uint8 i = 0; i < MAX_BAG_SIZE; i++)
TotalCost += DurabilityRepair(( (j << 8) | i ),cost,discountMod, guildBank);
return TotalCost;
}
@@ -4881,7 +4881,7 @@ void Player::UpdateLocalChannels(uint32 newZone )
std::string current_zone_name = current_zone->area_name[GetSession()->GetSessionDbcLocale()];
- for(JoinedChannelsList::iterator i = m_channels.begin(), next; i != m_channels.end(); i = next)
+ for (JoinedChannelsList::iterator i = m_channels.begin(), next; i != m_channels.end(); i = next)
{
next = i; ++next;
@@ -4917,7 +4917,7 @@ void Player::UpdateLocalChannels(uint32 newZone )
void Player::LeaveLFGChannel()
{
- for(JoinedChannelsList::iterator i = m_channels.begin(); i != m_channels.end(); ++i )
+ for (JoinedChannelsList::iterator i = m_channels.begin(); i != m_channels.end(); ++i )
{
if((*i)->IsLFG())
{
@@ -5200,7 +5200,7 @@ void Player::ApplyRatingMod(CombatRating cr, int32 value, bool apply)
// Apply bonus from SPELL_AURA_MOD_RATING_FROM_STAT
// stat used stored in miscValueB for this aura
AuraEffectList const& modRatingFromStat = GetAurasByType(SPELL_AURA_MOD_RATING_FROM_STAT);
- for(AuraEffectList::const_iterator i = modRatingFromStat.begin();i != modRatingFromStat.end(); ++i)
+ for (AuraEffectList::const_iterator i = modRatingFromStat.begin(); i != modRatingFromStat.end(); ++i)
if ((*i)->GetMiscValue() & (1<<cr))
amount += int32(GetStat(Stats((*i)->GetMiscBValue())) * (*i)->GetAmount() / 100.0f);
if (amount < 0)
@@ -5294,7 +5294,7 @@ void Player::ApplyRatingMod(CombatRating cr, int32 value, bool apply)
void Player::SetRegularAttackTime()
{
- for(uint8 i = 0; i < MAX_ATTACK; ++i)
+ for (uint8 i = 0; i < MAX_ATTACK; ++i)
{
Item *tmpitem = GetWeaponForAttack(WeaponAttackType(i));
if(tmpitem && !tmpitem->IsBroken())
@@ -5360,7 +5360,7 @@ bool Player::UpdateCraftSkill(uint32 spellid)
SkillLineAbilityMapBounds bounds = spellmgr.GetSkillLineAbilityMapBounds(spellid);
- for(SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
+ for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
{
if (_spell_idx->second->skillId)
{
@@ -5466,7 +5466,7 @@ bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step)
new_value = MaxValue;
SetUInt32Value(PLAYER_SKILL_VALUE_INDEX(i),MAKE_SKILL_VALUE(new_value,MaxValue));
- for(uint32* bsl = &bonusSkillLevels[0]; *bsl; ++bsl)
+ for (uint32* bsl = &bonusSkillLevels[0]; *bsl; ++bsl)
{
if((SkillValue < *bsl && new_value >= *bsl))
{
@@ -5696,13 +5696,13 @@ void Player::SetSkill(uint32 id, uint16 currVal, uint16 maxVal)
// temporary bonuses
AuraEffectList const& mModSkill = GetAurasByType(SPELL_AURA_MOD_SKILL);
- for(AuraEffectList::const_iterator j = mModSkill.begin(); j != mModSkill.end(); ++j)
+ for (AuraEffectList::const_iterator j = mModSkill.begin(); j != mModSkill.end(); ++j)
if ((*j)->GetMiscValue() == int32(id))
(*j)->ApplyModifier(true);
// permanent bonuses
AuraEffectList const& mModSkillTalent = GetAurasByType(SPELL_AURA_MOD_SKILL_TALENT);
- for(AuraEffectList::const_iterator j = mModSkillTalent.begin(); j != mModSkillTalent.end(); ++j)
+ for (AuraEffectList::const_iterator j = mModSkillTalent.begin(); j != mModSkillTalent.end(); ++j)
if ((*j)->GetMiscValue() == int32(id))
(*j)->ApplyModifier(true);
@@ -5843,7 +5843,7 @@ void Player::SendActionButtons(uint32 state) const
WorldPacket data(SMSG_ACTION_BUTTONS, 1+(MAX_ACTION_BUTTONS*4));
data << uint8(state); // can be 0, 1, 2
- for(int button = 0; button < MAX_ACTION_BUTTONS; ++button)
+ for (int button = 0; button < MAX_ACTION_BUTTONS; ++button)
{
ActionButtonList::const_iterator itr = m_actionButtons.find(button);
if(itr != m_actionButtons.end() && itr->second.uState != ACTIONBUTTON_DELETED)
@@ -5896,7 +5896,6 @@ ActionButton* Player::addActionButton(uint8 button, uint32 action, uint8 type)
break; // pther cases not checked at this moment
}
-
// it create new button (NEW state) if need or return existed
ActionButton& ab = m_actionButtons[button];
@@ -5915,9 +5914,9 @@ void Player::removeActionButton(uint8 button)
if (!buttonItr->second.canRemoveByClient)
{
- buttonItr->second.canRemoveByClient = true;
+ buttonItr->second.canRemoveByClient = true;
return;
- }
+ }
if(buttonItr->second.uState==ACTIONBUTTON_NEW)
m_actionButtons.erase(buttonItr); // new and not saved
else
@@ -6266,7 +6265,7 @@ void Player::RewardReputation(Unit *pVictim, float rate)
void Player::RewardReputation(Quest const *pQuest)
{
// quest reputation reward/loss
- for(uint8 i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
+ for (uint8 i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
{
if(pQuest->RewRepFaction[i] && pQuest->RewRepValue[i] )
{
@@ -6809,7 +6808,7 @@ void Player::DuelComplete(DuelCompleteType type)
/* remove auras */
AuraMap &itsAuras = duel->opponent->GetAuras();
- for(AuraMap::iterator i = itsAuras.begin(); i != itsAuras.end();)
+ for (AuraMap::iterator i = itsAuras.begin(); i != itsAuras.end(); )
{
if (!i->second->IsPositive() && i->second->GetCasterGUID() == GetGUID() && i->second->GetAuraApplyTime() >= duel->startTime)
{
@@ -6820,7 +6819,7 @@ void Player::DuelComplete(DuelCompleteType type)
}
AuraMap &myAuras = GetAuras();
- for(AuraMap::iterator i = myAuras.begin(); i != myAuras.end();)
+ for (AuraMap::iterator i = myAuras.begin(); i != myAuras.end(); )
{
if (!i->second->IsPositive() && i->second->GetCasterGUID() == duel->opponent->GetGUID() && i->second->GetAuraApplyTime() >= duel->startTime)
{
@@ -7199,15 +7198,15 @@ void Player::_ApplyItemBonuses(ItemPrototype const *proto, uint8 slot, bool appl
void Player::_ApplyWeaponDependentAuraMods(Item *item,WeaponAttackType attackType,bool apply)
{
AuraEffectList const& auraCritList = GetAurasByType(SPELL_AURA_MOD_WEAPON_CRIT_PERCENT);
- for(AuraEffectList::const_iterator itr = auraCritList.begin(); itr!=auraCritList.end();++itr)
+ for (AuraEffectList::const_iterator itr = auraCritList.begin(); itr!=auraCritList.end(); ++itr)
_ApplyWeaponDependentAuraCritMod(item,attackType,*itr,apply);
AuraEffectList const& auraDamageFlatList = GetAurasByType(SPELL_AURA_MOD_DAMAGE_DONE);
- for(AuraEffectList::const_iterator itr = auraDamageFlatList.begin(); itr!=auraDamageFlatList.end();++itr)
+ for (AuraEffectList::const_iterator itr = auraDamageFlatList.begin(); itr!=auraDamageFlatList.end(); ++itr)
_ApplyWeaponDependentAuraDamageMod(item,attackType,*itr,apply);
AuraEffectList const& auraDamagePCTList = GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
- for(AuraEffectList::const_iterator itr = auraDamagePCTList.begin(); itr!=auraDamagePCTList.end();++itr)
+ for (AuraEffectList::const_iterator itr = auraDamagePCTList.begin(); itr!=auraDamagePCTList.end(); ++itr)
_ApplyWeaponDependentAuraDamageMod(item,attackType,*itr,apply);
}
@@ -7306,7 +7305,7 @@ void Player::ApplyEquipSpell(SpellEntry const* spellInfo, Item* item, bool apply
if(form_change) // check aura active state from other form
{
AuraMap const& auras = GetAuras();
- for(AuraMap::const_iterator itr = auras.lower_bound(spellInfo->Id); itr != auras.upper_bound(spellInfo->Id); ++itr)
+ for (AuraMap::const_iterator itr = auras.lower_bound(spellInfo->Id); itr != auras.upper_bound(spellInfo->Id); ++itr)
if(!item || itr->second->GetCastItemGUID()==item->GetGUID())
return;
}
@@ -7343,13 +7342,13 @@ void Player::UpdateEquipSpellsAtFormChange()
}
// item set bonuses not dependent from item broken state
- for(size_t setindex = 0; setindex < ItemSetEff.size(); ++setindex)
+ for (size_t setindex = 0; setindex < ItemSetEff.size(); ++setindex)
{
ItemSetEffect* eff = ItemSetEff[setindex];
if(!eff)
continue;
- for(uint32 y=0;y<8; ++y)
+ for (uint32 y=0; y<8; ++y)
{
SpellEntry const* spellInfo = eff->spells[y];
if(!spellInfo)
@@ -7365,7 +7364,7 @@ void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32
if(!target || !target->isAlive() || target == this)
return;
- for(int i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; i++)
+ for (int i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; i++)
{
// If usable, try to cast item spell
if (Item * item = ((Player*)this)->GetItemByPos(INVENTORY_SLOT_BAG_0,i))
@@ -7457,12 +7456,12 @@ void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32
}
// item combat enchantments
- for(int e_slot = 0; e_slot < MAX_ENCHANTMENT_SLOT; ++e_slot)
+ for (int e_slot = 0; e_slot < MAX_ENCHANTMENT_SLOT; ++e_slot)
{
uint32 enchant_id = item->GetEnchantmentId(EnchantmentSlot(e_slot));
SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id);
if(!pEnchant) continue;
- for (int s=0;s<3;s++)
+ for (int s=0; s<3; s++)
{
if(pEnchant->type[s]!=ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
continue;
@@ -7543,7 +7542,7 @@ void Player::CastItemUseSpell(Item *item,SpellCastTargets const& targets,uint8 c
int count = 0;
// item spells casted at use
- for(int i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
+ for (int i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
{
_Spell const& spellData = proto->Spells[i];
@@ -7572,12 +7571,12 @@ void Player::CastItemUseSpell(Item *item,SpellCastTargets const& targets,uint8 c
}
// Item enchantments spells casted at use
- for(int e_slot = 0; e_slot < MAX_ENCHANTMENT_SLOT; ++e_slot)
+ for (int e_slot = 0; e_slot < MAX_ENCHANTMENT_SLOT; ++e_slot)
{
uint32 enchant_id = item->GetEnchantmentId(EnchantmentSlot(e_slot));
SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id);
if(!pEnchant) continue;
- for (int s=0;s<3;s++)
+ for (int s=0; s<3; s++)
{
if(pEnchant->type[s]!=ITEM_ENCHANTMENT_TYPE_USE_SPELL)
continue;
@@ -8889,7 +8888,7 @@ uint8 Player::CanUnequipItems( uint32 item, uint32 count ) const
uint8 res = EQUIP_ERR_OK;
- for(uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_BAG_END; i++)
+ for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_BAG_END; i++)
{
pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pItem && pItem->GetEntry() == item )
@@ -8905,7 +8904,7 @@ uint8 Player::CanUnequipItems( uint32 item, uint32 count ) const
res = ires;
}
}
- for(uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
+ for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
{
pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pItem && pItem->GetEntry() == item )
@@ -8915,7 +8914,7 @@ uint8 Player::CanUnequipItems( uint32 item, uint32 count ) const
return EQUIP_ERR_OK;
}
}
- for(uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
+ for (uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
{
pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pItem && pItem->GetEntry() == item )
@@ -8926,12 +8925,12 @@ uint8 Player::CanUnequipItems( uint32 item, uint32 count ) const
}
}
Bag *pBag;
- for(uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
+ for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
{
pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pBag )
{
- for(uint32 j = 0; j < pBag->GetBagSize(); j++)
+ for (uint32 j = 0; j < pBag->GetBagSize(); j++)
{
pItem = GetItemByPos( i, j );
if( pItem && pItem->GetEntry() == item )
@@ -8951,19 +8950,19 @@ uint8 Player::CanUnequipItems( uint32 item, uint32 count ) const
uint32 Player::GetItemCount( uint32 item, bool inBankAlso, Item* skipItem ) const
{
uint32 count = 0;
- for(uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; i++)
+ for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; i++)
{
Item *pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pItem && pItem != skipItem && pItem->GetEntry() == item )
count += pItem->GetCount();
}
- for(uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
+ for (uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
{
Item *pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pItem && pItem != skipItem && pItem->GetEntry() == item )
count += pItem->GetCount();
}
- for(uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
+ for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
{
Bag* pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pBag )
@@ -8972,7 +8971,7 @@ uint32 Player::GetItemCount( uint32 item, bool inBankAlso, Item* skipItem ) cons
if(skipItem && skipItem->GetProto()->GemProperties)
{
- for(uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; i++)
+ for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; i++)
{
Item *pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pItem && pItem != skipItem && pItem->GetProto()->Socket[0].Color )
@@ -8982,13 +8981,13 @@ uint32 Player::GetItemCount( uint32 item, bool inBankAlso, Item* skipItem ) cons
if(inBankAlso)
{
- for(uint8 i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; i++)
+ for (uint8 i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; i++)
{
Item* pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pItem && pItem != skipItem && pItem->GetEntry() == item )
count += pItem->GetCount();
}
- for(uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
+ for (uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
{
Bag* pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pBag )
@@ -8997,7 +8996,7 @@ uint32 Player::GetItemCount( uint32 item, bool inBankAlso, Item* skipItem ) cons
if(skipItem && skipItem->GetProto()->GemProperties)
{
- for(uint8 i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; i++)
+ for (uint8 i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; i++)
{
Item* pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pItem && pItem != skipItem && pItem->GetProto()->Socket[0].Color )
@@ -9011,25 +9010,25 @@ uint32 Player::GetItemCount( uint32 item, bool inBankAlso, Item* skipItem ) cons
Item* Player::GetItemByGuid( uint64 guid ) const
{
- for(uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; i++)
+ for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; i++)
{
Item *pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pItem && pItem->GetGUID() == guid )
return pItem;
}
- for(uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
+ for (uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
{
Item *pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pItem && pItem->GetGUID() == guid )
return pItem;
}
- for(uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
+ for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
{
Bag *pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pBag )
{
- for(uint32 j = 0; j < pBag->GetBagSize(); j++)
+ for (uint32 j = 0; j < pBag->GetBagSize(); j++)
{
Item* pItem = pBag->GetItemByPos( j );
if( pItem && pItem->GetGUID() == guid )
@@ -9037,12 +9036,12 @@ Item* Player::GetItemByGuid( uint64 guid ) const
}
}
}
- for(uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
+ for (uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
{
Bag *pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pBag )
{
- for(uint32 j = 0; j < pBag->GetBagSize(); j++)
+ for (uint32 j = 0; j < pBag->GetBagSize(); j++)
{
Item* pItem = pBag->GetItemByPos( j );
if( pItem && pItem->GetGUID() == guid )
@@ -9240,11 +9239,10 @@ bool Player::IsValidPos( uint8 bag, uint8 slot )
return false;
}
-
bool Player::HasItemCount( uint32 item, uint32 count, bool inBankAlso ) const
{
uint32 tempcount = 0;
- for(uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; i++)
+ for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; i++)
{
Item *pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pItem && pItem->GetEntry() == item )
@@ -9254,7 +9252,7 @@ bool Player::HasItemCount( uint32 item, uint32 count, bool inBankAlso ) const
return true;
}
}
- for(uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
+ for (uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
{
Item *pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pItem && pItem->GetEntry() == item )
@@ -9264,11 +9262,11 @@ bool Player::HasItemCount( uint32 item, uint32 count, bool inBankAlso ) const
return true;
}
}
- for(uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
+ for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
{
if(Bag* pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
{
- for(uint32 j = 0; j < pBag->GetBagSize(); j++)
+ for (uint32 j = 0; j < pBag->GetBagSize(); j++)
{
Item* pItem = GetItemByPos( i, j );
if( pItem && pItem->GetEntry() == item )
@@ -9283,7 +9281,7 @@ bool Player::HasItemCount( uint32 item, uint32 count, bool inBankAlso ) const
if(inBankAlso)
{
- for(uint8 i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; i++)
+ for (uint8 i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; i++)
{
Item *pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pItem && pItem->GetEntry() == item )
@@ -9293,11 +9291,11 @@ bool Player::HasItemCount( uint32 item, uint32 count, bool inBankAlso ) const
return true;
}
}
- for(uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
+ for (uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
{
if(Bag* pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
{
- for(uint32 j = 0; j < pBag->GetBagSize(); j++)
+ for (uint32 j = 0; j < pBag->GetBagSize(); j++)
{
Item* pItem = GetItemByPos( i, j );
if( pItem && pItem->GetEntry() == item )
@@ -9317,7 +9315,7 @@ bool Player::HasItemCount( uint32 item, uint32 count, bool inBankAlso ) const
bool Player::HasItemOrGemWithIdEquipped( uint32 item, uint32 count, uint8 except_slot ) const
{
uint32 tempcount = 0;
- for(uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
+ for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
{
if(i == except_slot)
continue;
@@ -9334,7 +9332,7 @@ bool Player::HasItemOrGemWithIdEquipped( uint32 item, uint32 count, uint8 except
ItemPrototype const *pProto = objmgr.GetItemPrototype(item);
if (pProto && pProto->GemProperties)
{
- for(uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
+ for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
{
if(i == except_slot)
continue;
@@ -9355,7 +9353,7 @@ bool Player::HasItemOrGemWithIdEquipped( uint32 item, uint32 count, uint8 except
bool Player::HasItemOrGemWithLimitCategoryEquipped( uint32 limitCategory, uint32 count, uint8 except_slot ) const
{
uint32 tempcount = 0;
- for(uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
+ for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
{
if(i == except_slot)
continue;
@@ -9415,23 +9413,23 @@ uint8 Player::_CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem,
bool Player::HasItemTotemCategory( uint32 TotemCategory ) const
{
Item *pItem;
- for(uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; ++i)
+ for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; ++i)
{
pItem = GetUseableItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pItem && IsTotemCategoryCompatiableWith(pItem->GetProto()->TotemCategory,TotemCategory ))
return true;
}
- for(uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
+ for (uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
{
pItem = GetUseableItemByPos( INVENTORY_SLOT_BAG_0, i );
if( pItem && IsTotemCategoryCompatiableWith(pItem->GetProto()->TotemCategory,TotemCategory ))
return true;
}
- for(uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i)
+ for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i)
{
if(Bag *pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
{
- for(uint32 j = 0; j < pBag->GetBagSize(); ++j)
+ for (uint32 j = 0; j < pBag->GetBagSize(); ++j)
{
pItem = GetUseableItemByPos( i, j );
if( pItem && IsTotemCategoryCompatiableWith(pItem->GetProto()->TotemCategory,TotemCategory ))
@@ -9537,7 +9535,7 @@ uint8 Player::_CanStoreItem_InBag( uint8 bag, ItemPosCountVec &dest, ItemPrototy
if (!ItemCanGoIntoBag(pProto,pBagProto))
return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG;
- for(uint32 j = 0; j < pBag->GetBagSize(); j++)
+ for (uint32 j = 0; j < pBag->GetBagSize(); j++)
{
// skip specific slot already processed in first called _CanStoreItem_InSpecificSlot
if (j==skip_slot)
@@ -9594,7 +9592,7 @@ uint8 Player::_CanStoreItem_InBag( uint8 bag, ItemPosCountVec &dest, ItemPrototy
uint8 Player::_CanStoreItem_InInventorySlots( uint8 slot_begin, uint8 slot_end, ItemPosCountVec &dest, ItemPrototype const *pProto, uint32& count, bool merge, Item* pSrcItem, uint8 skip_bag, uint8 skip_slot ) const
{
- for(uint32 j = slot_begin; j < slot_end; j++)
+ for (uint32 j = slot_begin; j < slot_end; j++)
{
// skip specific slot already processed in first called _CanStoreItem_InSpecificSlot
if (INVENTORY_SLOT_BAG_0==skip_bag && j==skip_slot)
@@ -9925,7 +9923,7 @@ uint8 Player::_CanStoreItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, uint3
if (pProto->BagFamily)
{
- for(uint32 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
+ for (uint32 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
{
res = _CanStoreItem_InBag(i,dest,pProto,count,true,false,pItem,bag,slot);
if (res!=EQUIP_ERR_OK)
@@ -9943,7 +9941,7 @@ uint8 Player::_CanStoreItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, uint3
}
}
- for(uint32 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
+ for (uint32 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
{
res = _CanStoreItem_InBag(i,dest,pProto,count,true,true,pItem,bag,slot);
if (res!=EQUIP_ERR_OK)
@@ -10006,7 +10004,7 @@ uint8 Player::_CanStoreItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, uint3
}
}
- for(uint32 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
+ for (uint32 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
{
res = _CanStoreItem_InBag(i,dest,pProto,count,false,false,pItem,bag,slot);
if (res!=EQUIP_ERR_OK)
@@ -10043,7 +10041,7 @@ uint8 Player::_CanStoreItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, uint3
return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS;
}
- for(uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
+ for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
{
res = _CanStoreItem_InBag(i,dest,pProto,count,false,true,pItem,bag,slot);
if (res!=EQUIP_ERR_OK)
@@ -10082,7 +10080,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
memset(inv_keys,0,sizeof(int)*(KEYRING_SLOT_END-KEYRING_SLOT_START));
memset(inv_tokens,0,sizeof(int)*(CURRENCYTOKEN_SLOT_END-CURRENCYTOKEN_SLOT_START));
- for(uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
+ for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
{
pItem2 = GetItemByPos( INVENTORY_SLOT_BAG_0, i );
@@ -10092,7 +10090,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
}
}
- for(uint8 i = KEYRING_SLOT_START; i < KEYRING_SLOT_END; i++)
+ for (uint8 i = KEYRING_SLOT_START; i < KEYRING_SLOT_END; i++)
{
pItem2 = GetItemByPos( INVENTORY_SLOT_BAG_0, i );
@@ -10102,7 +10100,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
}
}
- for(uint8 i = CURRENCYTOKEN_SLOT_START; i < CURRENCYTOKEN_SLOT_END; i++)
+ for (uint8 i = CURRENCYTOKEN_SLOT_START; i < CURRENCYTOKEN_SLOT_END; i++)
{
pItem2 = GetItemByPos( INVENTORY_SLOT_BAG_0, i );
@@ -10112,11 +10110,11 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
}
}
- for(uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
+ for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
{
if(Bag* pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
{
- for(uint32 j = 0; j < pBag->GetBagSize(); j++)
+ for (uint32 j = 0; j < pBag->GetBagSize(); j++)
{
pItem2 = GetItemByPos( i, j );
if (pItem2 && !pItem2->IsInTrade())
@@ -10159,7 +10157,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
{
bool b_found = false;
- for(int t = KEYRING_SLOT_START; t < KEYRING_SLOT_END; ++t)
+ for (int t = KEYRING_SLOT_START; t < KEYRING_SLOT_END; ++t)
{
pItem2 = GetItemByPos( INVENTORY_SLOT_BAG_0, t );
if( pItem2 && pItem2->GetEntry() == pItem->GetEntry() && inv_keys[t-KEYRING_SLOT_START] + pItem->GetCount() <= pProto->GetMaxStackSize())
@@ -10171,7 +10169,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
}
if (b_found) continue;
- for(int t = CURRENCYTOKEN_SLOT_START; t < CURRENCYTOKEN_SLOT_END; ++t)
+ for (int t = CURRENCYTOKEN_SLOT_START; t < CURRENCYTOKEN_SLOT_END; ++t)
{
pItem2 = GetItemByPos( INVENTORY_SLOT_BAG_0, t );
if( pItem2 && pItem2->GetEntry() == pItem->GetEntry() && inv_tokens[t-CURRENCYTOKEN_SLOT_START] + pItem->GetCount() <= pProto->GetMaxStackSize())
@@ -10183,7 +10181,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
}
if (b_found) continue;
- for(int t = INVENTORY_SLOT_ITEM_START; t < INVENTORY_SLOT_ITEM_END; ++t)
+ for (int t = INVENTORY_SLOT_ITEM_START; t < INVENTORY_SLOT_ITEM_END; ++t)
{
pItem2 = GetItemByPos( INVENTORY_SLOT_BAG_0, t );
if( pItem2 && pItem2->GetEntry() == pItem->GetEntry() && inv_slot_items[t-INVENTORY_SLOT_ITEM_START] + pItem->GetCount() <= pProto->GetMaxStackSize())
@@ -10195,12 +10193,12 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
}
if (b_found) continue;
- for(int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; ++t)
+ for (int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; ++t)
{
pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, t );
if( pBag && ItemCanGoIntoBag(pItem->GetProto(), pBag->GetProto()))
{
- for(uint32 j = 0; j < pBag->GetBagSize(); j++)
+ for (uint32 j = 0; j < pBag->GetBagSize(); j++)
{
pItem2 = GetItemByPos( t, j );
if( pItem2 && pItem2->GetEntry() == pItem->GetEntry() && inv_bags[t-INVENTORY_SLOT_BAG_START][j] + pItem->GetCount() <= pProto->GetMaxStackSize())
@@ -10222,7 +10220,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
if(pProto->BagFamily & BAG_FAMILY_MASK_KEYS)
{
uint32 keyringSize = GetMaxKeyringSize();
- for(uint32 t = KEYRING_SLOT_START; t < KEYRING_SLOT_START+keyringSize; ++t)
+ for (uint32 t = KEYRING_SLOT_START; t < KEYRING_SLOT_START+keyringSize; ++t)
{
if( inv_keys[t-KEYRING_SLOT_START] == 0 )
{
@@ -10237,7 +10235,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
if(pProto->BagFamily & BAG_FAMILY_MASK_CURRENCY_TOKENS)
{
- for(uint32 t = CURRENCYTOKEN_SLOT_START; t < CURRENCYTOKEN_SLOT_END; ++t)
+ for (uint32 t = CURRENCYTOKEN_SLOT_START; t < CURRENCYTOKEN_SLOT_END; ++t)
{
if( inv_tokens[t-CURRENCYTOKEN_SLOT_START] == 0 )
{
@@ -10250,7 +10248,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
if (b_found) continue;
- for(int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; ++t)
+ for (int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; ++t)
{
pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, t );
if( pBag )
@@ -10261,7 +10259,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
if( pBagProto && (pBagProto->Class != ITEM_CLASS_CONTAINER || pBagProto->SubClass != ITEM_SUBCLASS_CONTAINER) &&
ItemCanGoIntoBag(pProto,pBagProto) )
{
- for(uint32 j = 0; j < pBag->GetBagSize(); j++)
+ for (uint32 j = 0; j < pBag->GetBagSize(); j++)
{
if( inv_bags[t-INVENTORY_SLOT_BAG_START][j] == 0 )
{
@@ -10278,7 +10276,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
// search free slot
bool b_found = false;
- for(int t = INVENTORY_SLOT_ITEM_START; t < INVENTORY_SLOT_ITEM_END; ++t)
+ for (int t = INVENTORY_SLOT_ITEM_START; t < INVENTORY_SLOT_ITEM_END; ++t)
{
if( inv_slot_items[t-INVENTORY_SLOT_ITEM_START] == 0 )
{
@@ -10290,7 +10288,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
if (b_found) continue;
// search free slot in bags
- for(int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; ++t)
+ for (int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; ++t)
{
pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, t );
if( pBag )
@@ -10301,7 +10299,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
if( pBagProto && (pBagProto->Class != ITEM_CLASS_CONTAINER || pBagProto->SubClass != ITEM_SUBCLASS_CONTAINER))
continue;
- for(uint32 j = 0; j < pBag->GetBagSize(); j++)
+ for (uint32 j = 0; j < pBag->GetBagSize(); j++)
{
if( inv_bags[t-INVENTORY_SLOT_BAG_START][j] == 0 )
{
@@ -10403,7 +10401,7 @@ uint8 Player::CanEquipItem( uint8 slot, uint16 &dest, Item *pItem, bool swap, bo
// check unique-equipped special item classes
if (pProto->Class == ITEM_CLASS_QUIVER)
{
- for(uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i)
+ for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i)
{
if (Item* pBag = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
{
@@ -10628,7 +10626,7 @@ uint8 Player::CanBankItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, Item *p
// in special bags
if( pProto->BagFamily )
{
- for(uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
+ for (uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
{
res = _CanStoreItem_InBag(i,dest,pProto,count,true,false,pItem,bag,slot);
if(res!=EQUIP_ERR_OK)
@@ -10639,7 +10637,7 @@ uint8 Player::CanBankItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, Item *p
}
}
- for(uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
+ for (uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
{
res = _CanStoreItem_InBag(i,dest,pProto,count,true,true,pItem,bag,slot);
if(res!=EQUIP_ERR_OK)
@@ -10653,7 +10651,7 @@ uint8 Player::CanBankItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, Item *p
// search free place in special bag
if( pProto->BagFamily )
{
- for(uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
+ for (uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
{
res = _CanStoreItem_InBag(i,dest,pProto,count,false,false,pItem,bag,slot);
if(res!=EQUIP_ERR_OK)
@@ -10672,7 +10670,7 @@ uint8 Player::CanBankItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, Item *p
if(count==0)
return EQUIP_ERR_OK;
- for(uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
+ for (uint8 i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
{
res = _CanStoreItem_InBag(i,dest,pProto,count,false,true,pItem,bag,slot);
if(res!=EQUIP_ERR_OK)
@@ -10836,7 +10834,7 @@ void Player::RemoveAmmo()
Item* Player::StoreNewItem( ItemPosCountVec const& dest, uint32 item, bool update,int32 randomPropertyId )
{
uint32 count = 0;
- for(ItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end(); ++itr)
+ for (ItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end(); ++itr)
count += itr->count;
Item *pItem = Item::CreateItem( item, count, this );
@@ -10857,7 +10855,7 @@ Item* Player::StoreItem( ItemPosCountVec const& dest, Item* pItem, bool update )
Item* lastItem = pItem;
uint32 entry = pItem->GetEntry();
- for(ItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end(); )
+ for (ItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end(); )
{
uint16 pos = itr->pos;
uint32 count = itr->count;
@@ -11371,7 +11369,7 @@ void Player::DestroyItemCount( uint32 item, uint32 count, bool update, bool uneq
uint32 remcount = 0;
// in inventory
- for(uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
+ for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
{
if (Item* pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
{
@@ -11399,7 +11397,7 @@ void Player::DestroyItemCount( uint32 item, uint32 count, bool update, bool uneq
}
}
- for(uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
+ for (uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
{
if (Item* pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
{
@@ -11428,11 +11426,11 @@ void Player::DestroyItemCount( uint32 item, uint32 count, bool update, bool uneq
}
// in inventory bags
- for(uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
+ for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
{
if(Bag *pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
{
- for(uint32 j = 0; j < pBag->GetBagSize(); j++)
+ for (uint32 j = 0; j < pBag->GetBagSize(); j++)
{
if(Item* pItem = pBag->GetItemByPos(j))
{
@@ -11463,7 +11461,7 @@ void Player::DestroyItemCount( uint32 item, uint32 count, bool update, bool uneq
}
// in equipment and bag list
- for(uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_BAG_END; i++)
+ for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_BAG_END; i++)
{
if (Item* pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
{
@@ -11499,26 +11497,26 @@ void Player::DestroyZoneLimitedItem( bool update, uint32 new_zone )
sLog.outDebug( "STORAGE: DestroyZoneLimitedItem in map %u and area %u", GetMapId(), new_zone );
// in inventory
- for(uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
+ for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
if (Item* pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
if (pItem->IsLimitedToAnotherMapOrZone(GetMapId(), new_zone))
DestroyItem( INVENTORY_SLOT_BAG_0, i, update);
- for(uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
+ for (uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
if (Item* pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
if (pItem->IsLimitedToAnotherMapOrZone(GetMapId(), new_zone))
DestroyItem( INVENTORY_SLOT_BAG_0, i, update);
// in inventory bags
- for(uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
+ for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
if (Bag* pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
- for(uint32 j = 0; j < pBag->GetBagSize(); j++)
+ for (uint32 j = 0; j < pBag->GetBagSize(); j++)
if (Item* pItem = pBag->GetItemByPos(j))
if (pItem->IsLimitedToAnotherMapOrZone(GetMapId(), new_zone))
DestroyItem(i, j, update);
// in equipment and bag list
- for(uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_BAG_END; i++)
+ for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_BAG_END; i++)
if (Item* pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
if (pItem->IsLimitedToAnotherMapOrZone(GetMapId(), new_zone))
DestroyItem( INVENTORY_SLOT_BAG_0, i, update);
@@ -11531,21 +11529,21 @@ void Player::DestroyConjuredItems( bool update )
sLog.outDebug( "STORAGE: DestroyConjuredItems" );
// in inventory
- for(uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
+ for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
if (Item* pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
if (pItem->IsConjuredConsumable())
DestroyItem( INVENTORY_SLOT_BAG_0, i, update);
// in inventory bags
- for(uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
+ for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
if (Bag* pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
- for(uint32 j = 0; j < pBag->GetBagSize(); j++)
+ for (uint32 j = 0; j < pBag->GetBagSize(); j++)
if (Item* pItem = pBag->GetItemByPos(j))
if (pItem->IsConjuredConsumable())
DestroyItem( i, j, update);
// in equipment and bag list
- for(uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_BAG_END; i++)
+ for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_BAG_END; i++)
if (Item* pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
if (pItem->IsConjuredConsumable())
DestroyItem( INVENTORY_SLOT_BAG_0, i, update);
@@ -11920,7 +11918,7 @@ void Player::SwapItem( uint16 src, uint16 dst )
uint32 count = 0;
- for(uint32 i=0; i < fullBag->GetBagSize(); ++i)
+ for (uint32 i=0; i < fullBag->GetBagSize(); ++i)
{
Item *bagItem = fullBag->GetItemByPos(i);
if (!bagItem)
@@ -11937,7 +11935,6 @@ void Player::SwapItem( uint16 src, uint16 dst )
++count;
}
-
if (count > emptyBag->GetBagSize())
{
// too small targeted bag
@@ -11947,7 +11944,7 @@ void Player::SwapItem( uint16 src, uint16 dst )
// Items swap
count = 0; // will pos in new bag
- for(uint32 i = 0; i< fullBag->GetBagSize(); ++i)
+ for (uint32 i = 0; i< fullBag->GetBagSize(); ++i)
{
Item *bagItem = fullBag->GetItemByPos(i);
if (!bagItem)
@@ -11996,7 +11993,7 @@ void Player::AddItemToBuyBackSlot( Item *pItem )
uint32 oldest_time = GetUInt32Value( PLAYER_FIELD_BUYBACK_TIMESTAMP_1 );
uint32 oldest_slot = BUYBACK_SLOT_START;
- for(uint32 i = BUYBACK_SLOT_START+1; i < BUYBACK_SLOT_END; ++i )
+ for (uint32 i = BUYBACK_SLOT_START+1; i < BUYBACK_SLOT_END; ++i )
{
// found empty
if (!m_items[i])
@@ -12126,7 +12123,7 @@ void Player::ClearTrade()
{
tradeGold = 0;
acceptTrade = false;
- for(uint8 i = 0; i < TRADE_SLOT_COUNT; i++)
+ for (uint8 i = 0; i < TRADE_SLOT_COUNT; i++)
tradeItems[i] = NULL_SLOT;
}
@@ -12159,7 +12156,7 @@ void Player::UpdateItemDuration(uint32 time, bool realtimeonly)
sLog.outDebug("Player::UpdateItemDuration(%u,%u)", time, realtimeonly);
- for(ItemDurationList::const_iterator itr = m_itemDuration.begin(); itr != m_itemDuration.end(); )
+ for (ItemDurationList::const_iterator itr = m_itemDuration.begin(); itr != m_itemDuration.end(); )
{
Item* item = *itr;
++itr; // current element can be erased in UpdateDuration
@@ -12171,7 +12168,7 @@ void Player::UpdateItemDuration(uint32 time, bool realtimeonly)
void Player::UpdateEnchantTime(uint32 time)
{
- for(EnchantDurationList::iterator itr = m_enchantDuration.begin(),next;itr != m_enchantDuration.end();itr=next)
+ for (EnchantDurationList::iterator itr = m_enchantDuration.begin(),next; itr != m_enchantDuration.end(); itr=next)
{
assert(itr->item);
next = itr;
@@ -12195,7 +12192,7 @@ void Player::UpdateEnchantTime(uint32 time)
void Player::AddEnchantmentDurations(Item *item)
{
- for(int x = 0; x < MAX_ENCHANTMENT_SLOT; ++x)
+ for (int x = 0; x < MAX_ENCHANTMENT_SLOT; ++x)
{
if (!item->GetEnchantmentId(EnchantmentSlot(x)))
continue;
@@ -12208,7 +12205,7 @@ void Player::AddEnchantmentDurations(Item *item)
void Player::RemoveEnchantmentDurations(Item *item)
{
- for(EnchantDurationList::iterator itr = m_enchantDuration.begin(); itr != m_enchantDuration.end();)
+ for (EnchantDurationList::iterator itr = m_enchantDuration.begin(); itr != m_enchantDuration.end(); )
{
if (itr->item == item)
{
@@ -12224,7 +12221,7 @@ void Player::RemoveEnchantmentDurations(Item *item)
void Player::RemoveArenaEnchantments(EnchantmentSlot slot)
{
// remove enchantments from equipped items first to clean up the m_enchantDuration list
- for(EnchantDurationList::iterator itr = m_enchantDuration.begin(), next; itr != m_enchantDuration.end(); itr = next)
+ for (EnchantDurationList::iterator itr = m_enchantDuration.begin(), next; itr != m_enchantDuration.end(); itr = next)
{
next = itr;
if (itr->slot == slot)
@@ -12252,15 +12249,15 @@ void Player::RemoveArenaEnchantments(EnchantmentSlot slot)
// remove enchants from inventory items
// NOTE: no need to remove these from stats, since these aren't equipped
// in inventory
- for(uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; ++i)
+ for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; ++i)
if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
if (pItem->GetEnchantmentId(slot))
pItem->ClearEnchantment(slot);
// in inventory bags
- for(uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i)
+ for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i)
if (Bag* pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
- for(uint32 j = 0; j < pBag->GetBagSize(); j++)
+ for (uint32 j = 0; j < pBag->GetBagSize(); j++)
if (Item* pItem = pBag->GetItemByPos(j))
if (pItem->GetEnchantmentId(slot))
pItem->ClearEnchantment(slot);
@@ -12275,7 +12272,7 @@ void Player::AddEnchantmentDuration(Item *item,EnchantmentSlot slot,uint32 durat
if (slot >= MAX_ENCHANTMENT_SLOT)
return;
- for(EnchantDurationList::iterator itr = m_enchantDuration.begin(); itr != m_enchantDuration.end(); ++itr)
+ for (EnchantDurationList::iterator itr = m_enchantDuration.begin(); itr != m_enchantDuration.end(); ++itr)
{
if (itr->item == item && itr->slot == slot)
{
@@ -12293,7 +12290,7 @@ void Player::AddEnchantmentDuration(Item *item,EnchantmentSlot slot,uint32 durat
void Player::ApplyEnchantment(Item *item,bool apply)
{
- for(uint32 slot = 0; slot < MAX_ENCHANTMENT_SLOT; ++slot)
+ for (uint32 slot = 0; slot < MAX_ENCHANTMENT_SLOT; ++slot)
ApplyEnchantment(item, EnchantmentSlot(slot), apply);
}
@@ -12626,7 +12623,6 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool
if(slot == TEMP_ENCHANTMENT_SLOT)
SetUInt16Value(PLAYER_VISIBLE_ITEM_1_ENCHANTMENT + (item->GetSlot() * 2), 1, apply ? item->GetEnchantmentId(slot) : 0);
-
if(apply_dur)
{
if(apply)
@@ -12646,7 +12642,7 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool
void Player::SendEnchantmentDurations()
{
- for(EnchantDurationList::const_iterator itr = m_enchantDuration.begin(); itr != m_enchantDuration.end(); ++itr)
+ for (EnchantDurationList::const_iterator itr = m_enchantDuration.begin(); itr != m_enchantDuration.end(); ++itr)
{
GetSession()->SendItemEnchantTimeUpdate(GetGUID(), itr->item->GetGUID(), itr->slot, uint32(itr->leftduration) / 1000);
}
@@ -12654,7 +12650,7 @@ void Player::SendEnchantmentDurations()
void Player::SendItemDurations()
{
- for(ItemDurationList::const_iterator itr = m_itemDuration.begin(); itr != m_itemDuration.end(); ++itr)
+ for (ItemDurationList::const_iterator itr = m_itemDuration.begin(); itr != m_itemDuration.end(); ++itr)
{
(*itr)->SendTimeUpdate(this);
}
@@ -12724,7 +12720,7 @@ void Player::PrepareQuestMenu( uint64 guid )
QuestMenu &qm = PlayerTalkClass->GetQuestMenu();
qm.ClearMenu();
- for(QuestRelations::const_iterator i = pObjectQIR->lower_bound(pObject->GetEntry()); i != pObjectQIR->upper_bound(pObject->GetEntry()); ++i)
+ for (QuestRelations::const_iterator i = pObjectQIR->lower_bound(pObject->GetEntry()); i != pObjectQIR->upper_bound(pObject->GetEntry()); ++i)
{
uint32 quest_id = i->second;
QuestStatus status = GetQuestStatus( quest_id );
@@ -12736,7 +12732,7 @@ void Player::PrepareQuestMenu( uint64 guid )
// qm.AddMenuItem(quest_id, DIALOG_STATUS_CHAT);
}
- for(QuestRelations::const_iterator i = pObjectQR->lower_bound(pObject->GetEntry()); i != pObjectQR->upper_bound(pObject->GetEntry()); ++i)
+ for (QuestRelations::const_iterator i = pObjectQR->lower_bound(pObject->GetEntry()); i != pObjectQR->upper_bound(pObject->GetEntry()); ++i)
{
uint32 quest_id = i->second;
Quest const* pQuest = objmgr.GetQuestTemplate(quest_id);
@@ -12880,7 +12876,7 @@ Quest const * Player::GetNextQuest( uint64 guid, Quest const *pQuest )
}
uint32 nextQuestID = pQuest->GetNextQuestInChain();
- for(QuestRelations::const_iterator itr = pObjectQR->lower_bound(pObject->GetEntry()); itr != pObjectQR->upper_bound(pObject->GetEntry()); ++itr)
+ for (QuestRelations::const_iterator itr = pObjectQR->lower_bound(pObject->GetEntry()); itr != pObjectQR->upper_bound(pObject->GetEntry()); ++itr)
{
if (itr->second == nextQuestID)
return objmgr.GetQuestTemplate(nextQuestID);
@@ -12958,7 +12954,7 @@ bool Player::CanCompleteQuest( uint32 quest_id )
if ( qInfo->HasFlag( QUEST_TRINITY_FLAGS_DELIVER ) )
{
- for(uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; i++)
+ for (uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; i++)
{
if( qInfo->ReqItemCount[i]!= 0 && q_status.m_itemcount[i] < qInfo->ReqItemCount[i] )
return false;
@@ -12967,7 +12963,7 @@ bool Player::CanCompleteQuest( uint32 quest_id )
if ( qInfo->HasFlag(QUEST_TRINITY_FLAGS_KILL_OR_CAST | QUEST_TRINITY_FLAGS_SPEAKTO) )
{
- for(uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; i++)
+ for (uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; i++)
{
if( qInfo->ReqCreatureOrGOId[i] == 0 )
continue;
@@ -13008,7 +13004,7 @@ bool Player::CanCompleteRepeatableQuest( Quest const *pQuest )
return false;
if (pQuest->HasFlag( QUEST_TRINITY_FLAGS_DELIVER) )
- for(uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; i++)
+ for (uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; i++)
if( pQuest->ReqItemId[i] && pQuest->ReqItemCount[i] && !HasItemCount(pQuest->ReqItemId[i],pQuest->ReqItemCount[i]) )
return false;
@@ -13035,7 +13031,7 @@ bool Player::CanRewardQuest( Quest const *pQuest, bool msg )
// prevent receive reward with quest items in bank
if ( pQuest->HasFlag( QUEST_TRINITY_FLAGS_DELIVER ) )
{
- for(uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; i++)
+ for (uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; i++)
{
if( pQuest->ReqItemCount[i]!= 0 &&
GetItemCount(pQuest->ReqItemId[i]) < pQuest->ReqItemCount[i] )
@@ -13110,13 +13106,13 @@ void Player::AddQuest( Quest const *pQuest, Object *questGiver )
if ( pQuest->HasFlag( QUEST_TRINITY_FLAGS_DELIVER ) )
{
- for(uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
+ for (uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
questStatusData.m_itemcount[i] = 0;
}
if ( pQuest->HasFlag(QUEST_TRINITY_FLAGS_KILL_OR_CAST | QUEST_TRINITY_FLAGS_SPEAKTO) )
{
- for(uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
+ for (uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
questStatusData.m_creatureOrGOcount[i] = 0;
}
@@ -13159,7 +13155,7 @@ void Player::AddQuest( Quest const *pQuest, Object *questGiver )
uint32 zone, area;
GetZoneAndAreaId(zone,area);
- for(SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
+ for (SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
if(itr->second->autocast && itr->second->IsFitToRequirements(this,zone,area))
if( !HasAura(itr->second->spellId) )
CastSpell(this,itr->second->spellId,true);
@@ -13216,7 +13212,7 @@ void Player::RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver
TakeQuestSourceItem(quest_id, true); // take quest src item from player on completing quest
- for(uint8 i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
+ for (uint8 i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
{
if (pQuest->ReqSourceId[i])
{
@@ -13269,7 +13265,7 @@ void Player::RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver
// handle SPELL_AURA_MOD_XP_QUEST_PCT auras
Unit::AuraEffectList const& ModXPPctAuras = GetAurasByType(SPELL_AURA_MOD_XP_QUEST_PCT);
- for(Unit::AuraEffectList::const_iterator i = ModXPPctAuras.begin();i != ModXPPctAuras.end(); ++i)
+ for (Unit::AuraEffectList::const_iterator i = ModXPPctAuras.begin(); i != ModXPPctAuras.end(); ++i)
XP = uint32(XP*(1.0f + (*i)->GetAmount() / 100.0f));
if (getLevel() < sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL))
@@ -13344,7 +13340,7 @@ void Player::RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver
MailItemsInfo mi; // item list preparing
uint32 max_slot = questMailLoot.GetMaxSlotInLootFor(this);
- for(uint32 i = 0; mi.size() < MAX_MAIL_ITEMS && i < max_slot; ++i)
+ for (uint32 i = 0; mi.size() < MAX_MAIL_ITEMS && i < max_slot; ++i)
{
if (LootItem* lootitem = questMailLoot.LootItemInSlot(i,this))
{
@@ -13397,7 +13393,7 @@ void Player::RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver
{
GetZoneAndAreaId(zone,area);
- for(SpellAreaForAreaMap::const_iterator itr = saEndBounds.first; itr != saEndBounds.second; ++itr)
+ for (SpellAreaForAreaMap::const_iterator itr = saEndBounds.first; itr != saEndBounds.second; ++itr)
if(!itr->second->IsFitToRequirements(this,zone,area))
RemoveAurasDueToSpell(itr->second->spellId);
}
@@ -13409,7 +13405,7 @@ void Player::RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver
if(!zone || !area)
GetZoneAndAreaId(zone,area);
- for(SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
+ for (SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
if(itr->second->autocast && itr->second->IsFitToRequirements(this,zone,area))
if( !HasAura(itr->second->spellId) )
CastSpell(this,itr->second->spellId,true);
@@ -13525,7 +13521,7 @@ bool Player::SatisfyQuestPreviousQuest( Quest const* qInfo, bool msg )
if( qInfo->prevQuests.empty())
return true;
- for(Quest::PrevQuests::const_iterator iter = qInfo->prevQuests.begin(); iter != qInfo->prevQuests.end(); ++iter )
+ for (Quest::PrevQuests::const_iterator iter = qInfo->prevQuests.begin(); iter != qInfo->prevQuests.end(); ++iter )
{
uint32 prevId = abs(*iter);
@@ -13548,7 +13544,7 @@ bool Player::SatisfyQuestPreviousQuest( Quest const* qInfo, bool msg )
assert(iter2!=end); // always must be found if qPrevInfo->ExclusiveGroup != 0
- for(; iter2 != end; ++iter2)
+ for (; iter2 != end; ++iter2)
{
uint32 exclude_Id = iter2->second;
@@ -13583,7 +13579,7 @@ bool Player::SatisfyQuestPreviousQuest( Quest const* qInfo, bool msg )
assert(iter2!=end); // always must be found if qPrevInfo->ExclusiveGroup != 0
- for(; iter2 != end; ++iter2)
+ for (; iter2 != end; ++iter2)
{
uint32 exclude_Id = iter2->second;
@@ -13685,7 +13681,7 @@ bool Player::SatisfyQuestExclusiveGroup( Quest const* qInfo, bool msg )
assert(iter!=end); // always must be found if qInfo->ExclusiveGroup != 0
- for(; iter != end; ++iter)
+ for (; iter != end; ++iter)
{
uint32 exclude_Id = iter->second;
@@ -13743,7 +13739,7 @@ bool Player::SatisfyQuestPrevChain( Quest const* qInfo, bool msg )
if( qInfo->prevChainQuests.empty())
return true;
- for(Quest::PrevChainQuests::const_iterator iter = qInfo->prevChainQuests.begin(); iter != qInfo->prevChainQuests.end(); ++iter )
+ for (Quest::PrevChainQuests::const_iterator iter = qInfo->prevChainQuests.begin(); iter != qInfo->prevChainQuests.end(); ++iter )
{
uint32 prevId = *iter;
@@ -13777,7 +13773,7 @@ bool Player::SatisfyQuestDay( Quest const* qInfo, bool msg )
return true;
bool have_slot = false;
- for(uint32 quest_daily_idx = 0; quest_daily_idx < PLAYER_MAX_DAILY_QUESTS; ++quest_daily_idx)
+ for (uint32 quest_daily_idx = 0; quest_daily_idx < PLAYER_MAX_DAILY_QUESTS; ++quest_daily_idx)
{
uint32 id = GetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1+quest_daily_idx);
if(qInfo->GetQuestId()==id)
@@ -13925,7 +13921,7 @@ void Player::AdjustQuestReqItemCount( Quest const* pQuest, QuestStatusData& ques
{
if ( pQuest->HasFlag( QUEST_TRINITY_FLAGS_DELIVER ) )
{
- for(uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
+ for (uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
{
uint32 reqitemcount = pQuest->ReqItemCount[i];
if( reqitemcount != 0 )
@@ -13941,7 +13937,7 @@ void Player::AdjustQuestReqItemCount( Quest const* pQuest, QuestStatusData& ques
uint16 Player::FindQuestSlot( uint32 quest_id ) const
{
- for ( uint16 i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
+ for (uint16 i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
if ( GetQuestSlotQuestId(i) == quest_id )
return i;
@@ -13974,7 +13970,7 @@ void Player::GroupEventHappens( uint32 questId, WorldObject const* pEventObject
{
if( Group *pGroup = GetGroup() )
{
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *pGroupGuy = itr->getSource();
@@ -13989,7 +13985,7 @@ void Player::GroupEventHappens( uint32 questId, WorldObject const* pEventObject
void Player::ItemAddedQuestCheck( uint32 entry, uint32 count )
{
- for( uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
+ for (uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
{
uint32 questid = GetQuestSlotQuestId(i);
if ( questid == 0 )
@@ -14030,7 +14026,7 @@ void Player::ItemAddedQuestCheck( uint32 entry, uint32 count )
void Player::ItemRemovedQuestCheck( uint32 entry, uint32 count )
{
- for( uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
+ for (uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
{
uint32 questid = GetQuestSlotQuestId(i);
if(!questid)
@@ -14074,7 +14070,7 @@ void Player::KilledMonster( CreatureInfo const* cInfo, uint64 guid )
if(cInfo->Entry)
KilledMonsterCredit(cInfo->Entry,guid);
- for(int i = 0; i < MAX_KILL_CREDIT; ++i)
+ for (int i = 0; i < MAX_KILL_CREDIT; ++i)
if(cInfo->KillCredit[i])
KilledMonsterCredit(cInfo->KillCredit[i],guid);
}
@@ -14083,7 +14079,7 @@ void Player::KilledMonsterCredit( uint32 entry, uint64 guid )
{
uint32 addkillcount = 1;
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, entry, addkillcount);
- for( uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
+ for (uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
{
uint32 questid = GetQuestSlotQuestId(i);
if(!questid)
@@ -14138,7 +14134,7 @@ void Player::CastedCreatureOrGO( uint32 entry, uint64 guid, uint32 spell_id )
bool isCreature = IS_CRE_OR_VEH_GUID(guid);
uint32 addCastCount = 1;
- for( uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i)
+ for (uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i)
{
uint32 questid = GetQuestSlotQuestId(i);
if(!questid)
@@ -14205,7 +14201,7 @@ void Player::CastedCreatureOrGO( uint32 entry, uint64 guid, uint32 spell_id )
void Player::TalkedToCreature( uint32 entry, uint64 guid )
{
uint32 addTalkCount = 1;
- for( uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
+ for (uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
{
uint32 questid = GetQuestSlotQuestId(i);
if(!questid)
@@ -14260,7 +14256,7 @@ void Player::TalkedToCreature( uint32 entry, uint64 guid )
void Player::MoneyChanged( uint32 count )
{
- for( uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
+ for (uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
{
uint32 questid = GetQuestSlotQuestId(i);
if (!questid)
@@ -14290,7 +14286,7 @@ void Player::MoneyChanged( uint32 count )
void Player::ReputationChanged(FactionEntry const* factionEntry )
{
- for( uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
+ for (uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
{
if(uint32 questid = GetQuestSlotQuestId(i))
{
@@ -14318,7 +14314,7 @@ void Player::ReputationChanged(FactionEntry const* factionEntry )
bool Player::HasQuestForItem( uint32 itemid ) const
{
- for( uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
+ for (uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
{
uint32 questid = GetQuestSlotQuestId(i);
if ( questid == 0 )
@@ -14561,7 +14557,7 @@ void Player::_LoadDeclinedNames(QueryResult* result)
m_declinedname = new DeclinedName;
Field *fields = result->Fetch();
- for(uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
+ for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
m_declinedname->name[i] = fields[i].GetCppString();
delete result;
@@ -14621,7 +14617,7 @@ void Player::_LoadEquipmentSets(QueryResult *result)
eqSet.IconName = fields[3].GetCppString();
eqSet.state = EQUIPMENT_SET_UNCHANGED;
- for(uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
+ for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
eqSet.Items[i] = fields[4+i].GetUInt32();
m_EquipmentSets[index] = eqSet;
@@ -14822,7 +14818,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
InitDisplayIds();
// cleanup inventory related item value fields (its will be filled correctly in _LoadInventory)
- for(uint8 slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; ++slot)
+ for (uint8 slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; ++slot)
{
SetUInt64Value( PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2), 0 );
SetVisibleItemSlot(slot, NULL);
@@ -14875,7 +14871,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
SetUInt32Value(PLAYER_FIELD_ARENA_CURRENCY, arena_currency);
// check arena teams integrity
- for(uint32 arena_slot = 0; arena_slot < MAX_ARENA_SLOT; ++arena_slot)
+ for (uint32 arena_slot = 0; arena_slot < MAX_ARENA_SLOT; ++arena_slot)
{
uint32 arena_team_id = GetArenaTeamId(arena_slot);
if(!arena_team_id)
@@ -14886,7 +14882,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
continue;
// arena team not exist or not member, cleanup fields
- for(int j = 0; j < 6; ++j)
+ for (int j = 0; j < 6; ++j)
SetUInt32Value(PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + arena_slot * 6 + j, 0);
}
@@ -15195,7 +15191,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
// remember loaded power/health values to restore after stats initialization and modifier applying
uint32 savedHealth = GetHealth();
uint32 savedPower[MAX_POWERS];
- for(uint32 i = 0; i < MAX_POWERS; ++i)
+ for (uint32 i = 0; i < MAX_POWERS; ++i)
savedPower[i] = GetPower(Powers(i));
// reset stats before loading any modifiers
@@ -15208,11 +15204,11 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
//mails are loaded only when needed ;-) - when player in game click on mailbox.
//_LoadMail();
-
+
m_specsCount = fields[42].GetUInt32();
m_activeSpec = fields[43].GetUInt32();
delete result;
-
+
// sanity check
if (m_specsCount > MAX_TALENT_SPECS || m_activeSpec > MAX_TALENT_SPEC ||
m_specsCount < MIN_TALENT_SPECS || m_activeSpec < MIN_TALENT_SPEC ) // if (m_specsCount < 2) is not logical
@@ -15220,7 +15216,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
m_activeSpec = 0;
sLog.outError("Player %s(GUID: %u) has SpecCount = %u and ActiveSpec = %u.", GetName(), GetGUIDLow(), m_specsCount, m_activeSpec);
}
-
+
_LoadTalents(holder->GetResult(PLAYER_LOGIN_QUERY_LOADTALENTS));
_LoadSpells(holder->GetResult(PLAYER_LOGIN_QUERY_LOADSPELLS));
@@ -15278,7 +15274,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
// restore remembered power/health values (but not more max values)
SetHealth(savedHealth > GetMaxHealth() ? GetMaxHealth() : savedHealth);
- for(uint32 i = 0; i < MAX_POWERS; ++i)
+ for (uint32 i = 0; i < MAX_POWERS; ++i)
SetPower(Powers(i),savedPower[i] > GetMaxPower(Powers(i)) ? GetMaxPower(Powers(i)) : savedPower[i]);
sLog.outDebug("The value of player %s after load item and aura is: ", m_name.c_str());
@@ -15670,7 +15666,7 @@ void Player::_LoadInventory(QueryResult *result, uint32 timediff)
// fill mail
MailItemsInfo mi; // item list preparing
- for(uint8 i = 0; !problematicItems.empty() && i < MAX_MAIL_ITEMS; ++i)
+ for (uint8 i = 0; !problematicItems.empty() && i < MAX_MAIL_ITEMS; ++i)
{
Item* item = problematicItems.front();
problematicItems.pop_front();
@@ -15882,7 +15878,7 @@ void Player::_LoadQuestStatus(QueryResult *result)
if (questStatusData.m_status == QUEST_STATUS_FAILED)
SetQuestSlotState(slot, QUEST_STATE_FAIL);
- for(uint8 idx = 0; idx < QUEST_OBJECTIVES_COUNT; ++idx)
+ for (uint8 idx = 0; idx < QUEST_OBJECTIVES_COUNT; ++idx)
if(questStatusData.m_creatureOrGOcount[idx])
SetQuestSlotCounter(slot, idx, questStatusData.m_creatureOrGOcount[idx]);
@@ -15914,13 +15910,13 @@ void Player::_LoadQuestStatus(QueryResult *result)
}
// clear quest log tail
- for ( uint16 i = slot; i < MAX_QUEST_LOG_SIZE; ++i )
+ for (uint16 i = slot; i < MAX_QUEST_LOG_SIZE; ++i )
SetQuestSlot(i, 0);
}
void Player::_LoadDailyQuestStatus(QueryResult *result)
{
- for(uint32 quest_daily_idx = 0; quest_daily_idx < PLAYER_MAX_DAILY_QUESTS; ++quest_daily_idx)
+ for (uint32 quest_daily_idx = 0; quest_daily_idx < PLAYER_MAX_DAILY_QUESTS; ++quest_daily_idx)
SetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1+quest_daily_idx,0);
//QueryResult *result = CharacterDatabase.PQuery("SELECT quest,time FROM character_queststatus_daily WHERE guid = '%u'", GetGUIDLow());
@@ -16002,7 +15998,7 @@ void Player::_LoadGroup(QueryResult *result)
void Player::_LoadBoundInstances(QueryResult *result)
{
- for(uint8 i = 0; i < TOTAL_DIFFICULTIES; i++)
+ for (uint8 i = 0; i < TOTAL_DIFFICULTIES; i++)
m_boundInstances[i].clear();
Group *group = GetGroup();
@@ -16129,7 +16125,7 @@ void Player::SendRaidInfo()
time_t now = time(NULL);
- for(uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i)
+ for (uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i)
{
for (BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end(); ++itr)
{
@@ -16157,7 +16153,7 @@ void Player::SendSavedInstances()
bool hasBeenSaved = false;
WorldPacket data;
- for(uint8 i = 0; i < TOTAL_DIFFICULTIES; i++)
+ for (uint8 i = 0; i < TOTAL_DIFFICULTIES; i++)
{
for (BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end(); ++itr)
{
@@ -16177,7 +16173,7 @@ void Player::SendSavedInstances()
if(!hasBeenSaved)
return;
- for(uint8 i = 0; i < TOTAL_DIFFICULTIES; i++)
+ for (uint8 i = 0; i < TOTAL_DIFFICULTIES; i++)
{
for (BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end(); ++itr)
{
@@ -16205,9 +16201,9 @@ void Player::ConvertInstancesToGroup(Player *player, Group *group, uint64 player
if(player)
{
- for(uint8 i = 0; i < TOTAL_DIFFICULTIES; i++)
+ for (uint8 i = 0; i < TOTAL_DIFFICULTIES; i++)
{
- for (BoundInstancesMap::iterator itr = player->m_boundInstances[i].begin(); itr != player->m_boundInstances[i].end();)
+ for (BoundInstancesMap::iterator itr = player->m_boundInstances[i].begin(); itr != player->m_boundInstances[i].end(); )
{
has_binds = true;
if(group) group->BindToInstance(itr->second.save, itr->second.perm, true);
@@ -16419,7 +16415,7 @@ void Player::SaveToDB()
}
uint16 i;
- for( i = 0; i < m_valuesCount; i++ )
+ for (i = 0; i < m_valuesCount; i++ )
{
ss << GetUInt32Value(i) << " ";
}
@@ -16513,7 +16509,7 @@ void Player::SaveGoldToDB()
void Player::_SaveActions()
{
- for(ActionButtonList::iterator itr = m_actionButtons.begin(); itr != m_actionButtons.end(); )
+ for (ActionButtonList::iterator itr = m_actionButtons.begin(); itr != m_actionButtons.end(); )
{
switch (itr->second.uState)
{
@@ -16545,13 +16541,13 @@ void Player::_SaveAuras()
CharacterDatabase.PExecute("DELETE FROM character_aura WHERE guid = '%u'",GetGUIDLow());
AuraMap const& auras = GetAuras();
- for(AuraMap::const_iterator itr = auras.begin(); itr !=auras.end() ; ++itr)
+ for (AuraMap::const_iterator itr = auras.begin(); itr !=auras.end() ; ++itr)
{
if(!itr->second->CanBeSaved())
continue;
int32 amounts[MAX_SPELL_EFFECTS];
- for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i)
+ for (uint8 i=0; i<MAX_SPELL_EFFECTS; ++i)
{
if (AuraEffect * partAura = itr->second->GetPartAura(i))
amounts[i]=partAura->GetAmount();
@@ -16581,7 +16577,7 @@ void Player::_SaveInventory()
}
// update enchantment durations
- for(EnchantDurationList::iterator itr = m_enchantDuration.begin();itr != m_enchantDuration.end();++itr)
+ for (EnchantDurationList::iterator itr = m_enchantDuration.begin(); itr != m_enchantDuration.end(); ++itr)
{
itr->item->SetEnchantmentDuration(itr->slot,itr->leftduration);
}
@@ -16591,7 +16587,7 @@ void Player::_SaveInventory()
// do not save if the update queue is corrupt
bool error = false;
- for(size_t i = 0; i < m_itemUpdateQueue.size(); i++)
+ for (size_t i = 0; i < m_itemUpdateQueue.size(); i++)
{
Item *item = m_itemUpdateQueue[i];
if(!item || item->GetState() == ITEM_REMOVED) continue;
@@ -16617,7 +16613,7 @@ void Player::_SaveInventory()
return;
}
- for(size_t i = 0; i < m_itemUpdateQueue.size(); i++)
+ for (size_t i = 0; i < m_itemUpdateQueue.size(); i++)
{
Item *item = m_itemUpdateQueue[i];
if(!item) continue;
@@ -16659,7 +16655,7 @@ void Player::_SaveMail()
m->itemTextId, m->HasItems() ? 1 : 0, (uint64)m->expire_time, (uint64)m->deliver_time, m->money, m->COD, m->checked, m->messageID);
if(m->removedItems.size())
{
- for(std::vector<uint32>::iterator itr2 = m->removedItems.begin(); itr2 != m->removedItems.end(); ++itr2)
+ for (std::vector<uint32>::iterator itr2 = m->removedItems.begin(); itr2 != m->removedItems.end(); ++itr2)
CharacterDatabase.PExecute("DELETE FROM mail_items WHERE item_guid = '%u'", *itr2);
m->removedItems.clear();
}
@@ -16668,7 +16664,7 @@ void Player::_SaveMail()
else if (m->state == MAIL_STATE_DELETED)
{
if (m->HasItems())
- for(std::vector<MailItemInfo>::iterator itr2 = m->items.begin(); itr2 != m->items.end(); ++itr2)
+ for (std::vector<MailItemInfo>::iterator itr2 = m->items.begin(); itr2 != m->items.end(); ++itr2)
CharacterDatabase.PExecute("DELETE FROM item_instance WHERE guid = '%u'", itr2->item_guid);
if (m->itemTextId)
CharacterDatabase.PExecute("DELETE FROM item_text WHERE id = '%u'", m->itemTextId);
@@ -16697,7 +16693,7 @@ void Player::_SaveMail()
void Player::_SaveQuestStatus()
{
// we don't need transactions here.
- for( QuestStatusMap::iterator i = mQuestStatus.begin( ); i != mQuestStatus.end( ); ++i )
+ for (QuestStatusMap::iterator i = mQuestStatus.begin( ); i != mQuestStatus.end( ); ++i )
{
switch (i->second.uState)
{
@@ -16728,7 +16724,7 @@ void Player::_SaveDailyQuestStatus()
// we don't need transactions here.
CharacterDatabase.PExecute("DELETE FROM character_queststatus_daily WHERE guid = '%u'",GetGUIDLow());
- for(uint32 quest_daily_idx = 0; quest_daily_idx < PLAYER_MAX_DAILY_QUESTS; ++quest_daily_idx)
+ for (uint32 quest_daily_idx = 0; quest_daily_idx < PLAYER_MAX_DAILY_QUESTS; ++quest_daily_idx)
if(GetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1+quest_daily_idx))
CharacterDatabase.PExecute("INSERT INTO character_queststatus_daily (guid,quest,time) VALUES ('%u', '%u','" UI64FMTD "')",
GetGUIDLow(), GetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1+quest_daily_idx),uint64(m_lastDailyQuestTime));
@@ -16736,7 +16732,7 @@ void Player::_SaveDailyQuestStatus()
void Player::_SaveSpells()
{
- for (PlayerSpellMap::iterator itr = m_spells.begin(), next = m_spells.begin(); itr != m_spells.end();)
+ for (PlayerSpellMap::iterator itr = m_spells.begin(), next = m_spells.begin(); itr != m_spells.end(); )
{
if (itr->second->state == PLAYERSPELL_REMOVED || itr->second->state == PLAYERSPELL_CHANGED)
CharacterDatabase.PExecute("DELETE FROM character_spell WHERE guid = '%u' and spell = '%u'", GetGUIDLow(), itr->first);
@@ -16843,7 +16839,7 @@ void Player::SaveDataFieldToDB()
std::ostringstream ss;
ss<<"UPDATE characters SET data='";
- for(uint16 i = 0; i < m_valuesCount; i++ )
+ for (uint16 i = 0; i < m_valuesCount; i++ )
{
ss << GetUInt32Value(i) << " ";
}
@@ -16982,7 +16978,7 @@ void Player::ResetInstances(uint8 method)
// we assume that when the difficulty changes, all instances that can be reset will be
uint8 dif = GetDifficulty();
- for (BoundInstancesMap::iterator itr = m_boundInstances[dif].begin(); itr != m_boundInstances[dif].end();)
+ for (BoundInstancesMap::iterator itr = m_boundInstances[dif].begin(); itr != m_boundInstances[dif].end(); )
{
InstanceSave *p = itr->second.save;
const MapEntry *entry = sMapStore.LookupEntry(itr->first);
@@ -17128,7 +17124,7 @@ void Player::RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent)
if(spellInfo)
{
- for(uint32 i = 0; i < 7; ++i)
+ for (uint32 i = 0; i < 7; ++i)
{
if(spellInfo->Reagent[i] > 0)
{
@@ -17347,7 +17343,7 @@ void Player::PetSpellInitialize()
time_t curTime = time(NULL);
- for(CreatureSpellCooldowns::const_iterator itr = pet->m_CreatureSpellCooldowns.begin(); itr != pet->m_CreatureSpellCooldowns.end(); ++itr)
+ for (CreatureSpellCooldowns::const_iterator itr = pet->m_CreatureSpellCooldowns.begin(); itr != pet->m_CreatureSpellCooldowns.end(); ++itr)
{
time_t cooldown = (itr->second > curTime) ? (itr->second - curTime) * IN_MILISECONDS : 0;
@@ -17357,7 +17353,7 @@ void Player::PetSpellInitialize()
data << uint32(0); // category cooldown
}
- for(CreatureSpellCooldowns::const_iterator itr = pet->m_CreatureCategoryCooldowns.begin(); itr != pet->m_CreatureCategoryCooldowns.end(); ++itr)
+ for (CreatureSpellCooldowns::const_iterator itr = pet->m_CreatureCategoryCooldowns.begin(); itr != pet->m_CreatureCategoryCooldowns.end(); ++itr)
{
time_t cooldown = (itr->second > curTime) ? (itr->second - curTime) * IN_MILISECONDS : 0;
@@ -17412,7 +17408,7 @@ void Player::VehicleSpellInitialize()
data << uint32(0);
data << uint32(0x00000101);
- for(uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
+ for (uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
{
uint32 spellId = ((Creature*)veh)->m_spells[i];
if(!spellId)
@@ -17431,7 +17427,7 @@ void Player::VehicleSpellInitialize()
data << uint16(spellId) << uint8(0) << uint8(i+8);
}
- for(uint32 i = CREATURE_MAX_SPELLS; i < MAX_SPELL_CONTROL_BAR; ++i)
+ for (uint32 i = CREATURE_MAX_SPELLS; i < MAX_SPELL_CONTROL_BAR; ++i)
data << uint16(0) << uint8(0) << uint8(i+8);
data << uint8(0);
@@ -17458,7 +17454,7 @@ void Player::CharmSpellInitialize()
CreatureInfo const *cinfo = ((Creature*)charm)->GetCreatureInfo();
//if(cinfo && cinfo->type == CREATURE_TYPE_DEMON && getClass() == CLASS_WARLOCK)
{
- for(uint32 i = 0; i < MAX_SPELL_CHARM; ++i)
+ for (uint32 i = 0; i < MAX_SPELL_CHARM; ++i)
{
if(charmInfo->GetCharmSpell(i)->GetAction())
++addlist;
@@ -17482,7 +17478,7 @@ void Player::CharmSpellInitialize()
if(addlist)
{
- for(uint32 i = 0; i < MAX_SPELL_CHARM; ++i)
+ for (uint32 i = 0; i < MAX_SPELL_CHARM; ++i)
{
CharmSpellEntry *cspell = charmInfo->GetCharmSpell(i);
if(cspell->GetAction())
@@ -17558,9 +17554,9 @@ void Player::RestoreSpellMods(Spell * spell)
if (!spell || spell->m_appliedMods.empty())
return;
- for(uint8 i=0;i<MAX_SPELLMOD;++i)
+ for (uint8 i=0; i<MAX_SPELLMOD; ++i)
{
- for (SpellModList::iterator itr = m_spellMods[i].begin(); itr != m_spellMods[i].end();++itr)
+ for (SpellModList::iterator itr = m_spellMods[i].begin(); itr != m_spellMods[i].end(); ++itr)
{
SpellModifier *mod = *itr;
@@ -17600,7 +17596,7 @@ void Player::RemoveSpellMods(Spell * spell)
std::set <Aura *> checkedSpells;
AuraEffectList const & auraList = GetAurasByType(SPELL_AURA_ABILITY_IGNORE_AURASTATE);
- for(AuraEffectList::const_iterator itr = auraList.begin(); itr != auraList.end();)
+ for (AuraEffectList::const_iterator itr = auraList.begin(); itr != auraList.end(); )
{
AuraEffect * aur = *itr;
++itr;
@@ -17627,9 +17623,9 @@ void Player::RemoveSpellMods(Spell * spell)
if (spell->m_appliedMods.empty())
return;
- for(uint8 i=0;i<MAX_SPELLMOD;++i)
+ for (uint8 i=0; i<MAX_SPELLMOD; ++i)
{
- for (SpellModList::iterator itr = m_spellMods[i].begin(); itr != m_spellMods[i].end();)
+ for (SpellModList::iterator itr = m_spellMods[i].begin(); itr != m_spellMods[i].end(); )
{
SpellModifier *mod = *itr;
++itr;
@@ -17944,7 +17940,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
uint32 prevnode = sourcenode;
uint32 lastnode = 0;
- for(uint32 i = 1; i < nodes.size(); ++i)
+ for (uint32 i = 1; i < nodes.size(); ++i)
{
uint32 path, cost;
@@ -18070,7 +18066,7 @@ void Player::ContinueTaxiFlight()
(nodeList[0].y-GetPositionY())*(nodeList[0].y-GetPositionY())+
(nodeList[0].z-GetPositionZ())*(nodeList[0].z-GetPositionZ());
- for(uint32 i = 1; i < nodeList.size(); ++i)
+ for (uint32 i = 1; i < nodeList.size(); ++i)
{
TaxiPathNode const& node = nodeList[i];
TaxiPathNode const& prevNode = nodeList[i-1];
@@ -18108,7 +18104,7 @@ void Player::ProhibitSpellScholl(SpellSchoolMask idSchoolMask, uint32 unTimeMs )
data << GetGUID();
data << uint8(0x0); // flags (0x1, 0x2)
time_t curTime = time(NULL);
- for(PlayerSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr)
+ for (PlayerSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr)
{
if (itr->second->state == PLAYERSPELL_REMOVED)
continue;
@@ -18430,7 +18426,7 @@ uint32 Player::GetMaxPersonalArenaRatingRequirement()
// the personal rating of the arena team must match the required limit as well
// so return max[in arenateams](min(personalrating[teamtype], teamrating[teamtype]))
uint32 max_personal_rating = 0;
- for(uint8 i = 0; i < MAX_ARENA_SLOT; ++i)
+ for (uint8 i = 0; i < MAX_ARENA_SLOT; ++i)
{
if(ArenaTeam * at = objmgr.GetArenaTeamById(GetArenaTeamId(i)))
{
@@ -18492,14 +18488,14 @@ void Player::UpdatePvPState(bool onlyFFA)
if(!HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP))
{
SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
- for(ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
+ for (ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
(*itr)->SetByteValue(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
}
}
else if(HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP))
{
RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
- for(ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
+ for (ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
(*itr)->RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
}
@@ -18549,7 +18545,7 @@ void Player::AddSpellAndCategoryCooldowns(SpellEntry const* spellInfo, uint32 it
{
if(ItemPrototype const* proto = ObjectMgr::GetItemPrototype(itemId))
{
- for(uint8 idx = 0; idx < 5; ++idx)
+ for (uint8 idx = 0; idx < 5; ++idx)
{
if(proto->Spells[idx].SpellId == spellInfo->Id)
{
@@ -18619,7 +18615,7 @@ void Player::AddSpellAndCategoryCooldowns(SpellEntry const* spellInfo, uint32 it
SpellCategoryStore::const_iterator i_scstore = sSpellCategoryStore.find(cat);
if(i_scstore != sSpellCategoryStore.end())
{
- for(SpellCategorySet::const_iterator i_scset = i_scstore->second.begin(); i_scset != i_scstore->second.end(); ++i_scset)
+ for (SpellCategorySet::const_iterator i_scset = i_scstore->second.begin(); i_scset != i_scstore->second.end(); ++i_scset)
{
if(*i_scset == spellInfo->Id) // skip main spell, already handled above
continue;
@@ -18661,7 +18657,7 @@ void Player::UpdatePotionCooldown(Spell* spell)
{
// spell/item pair let set proper cooldown (except not existed charged spell cooldown spellmods for potions)
if(ItemPrototype const* proto = ObjectMgr::GetItemPrototype(m_lastPotionId))
- for(uint8 idx = 0; idx < 5; ++idx)
+ for (uint8 idx = 0; idx < 5; ++idx)
if(proto->Spells[idx].SpellId && proto->Spells[idx].SpellTrigger == ITEM_SPELLTRIGGER_ON_USE)
if(SpellEntry const* spellInfo = sSpellStore.LookupEntry(proto->Spells[idx].SpellId))
SendCooldownEvent(spellInfo,m_lastPotionId);
@@ -18687,14 +18683,14 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot)
uint8 curcount[4] = {0, 0, 0, 0};
//counting current equipped gem colors
- for(uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
+ for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
{
if(i == slot)
continue;
Item *pItem2 = GetItemByPos( INVENTORY_SLOT_BAG_0, i );
if(pItem2 && pItem2->GetProto()->Socket[0].Color)
{
- for(uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+3; ++enchant_slot)
+ for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+3; ++enchant_slot)
{
uint32 enchant_id = pItem2->GetEnchantmentId(EnchantmentSlot(enchant_slot));
if(!enchant_id)
@@ -18718,7 +18714,7 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot)
uint8 GemColor = gemProperty->color;
- for(uint8 b = 0, tmpcolormask = 1; b < 4; b++, tmpcolormask <<= 1)
+ for (uint8 b = 0, tmpcolormask = 1; b < 4; b++, tmpcolormask <<= 1)
{
if(tmpcolormask & GemColor)
++curcount[b];
@@ -18729,7 +18725,7 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot)
bool activate = true;
- for(uint8 i = 0; i < 5; i++)
+ for (uint8 i = 0; i < 5; i++)
{
if(!Condition->Color[i])
continue;
@@ -18761,7 +18757,7 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot)
void Player::CorrectMetaGemEnchants(uint8 exceptslot, bool apply)
{
//cycle all equipped items
- for(uint32 slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; ++slot)
+ for (uint32 slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; ++slot)
{
//enchants for the slot being socketed are handled by Player::ApplyItemMods
if(slot == exceptslot)
@@ -18772,7 +18768,7 @@ void Player::CorrectMetaGemEnchants(uint8 exceptslot, bool apply)
if(!pItem || !pItem->GetProto()->Socket[0].Color)
continue;
- for(uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+3; ++enchant_slot)
+ for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+3; ++enchant_slot)
{
uint32 enchant_id = pItem->GetEnchantmentId(EnchantmentSlot(enchant_slot));
if(!enchant_id)
@@ -18803,7 +18799,7 @@ void Player::CorrectMetaGemEnchants(uint8 exceptslot, bool apply)
void Player::ToggleMetaGemsActive(uint8 exceptslot, bool apply)
{
//cycle all equipped items
- for(int slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; ++slot)
+ for (int slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; ++slot)
{
//enchants for the slot being socketed are handled by WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
if(slot == exceptslot)
@@ -18815,7 +18811,7 @@ void Player::ToggleMetaGemsActive(uint8 exceptslot, bool apply)
continue;
//cycle all (gem)enchants
- for(uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+3; ++enchant_slot)
+ for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+3; ++enchant_slot)
{
uint32 enchant_id = pItem->GetEnchantmentId(EnchantmentSlot(enchant_slot));
if(!enchant_id) //if no enchant go to next enchant(slot)
@@ -19178,7 +19174,7 @@ void Player::UpdateVisibilityOf(WorldObject* target)
{
//if(target->isType(TYPEMASK_UNIT) && ((Unit*)target)->m_Vehicle)
// UpdateVisibilityOf(((Unit*)target)->m_Vehicle);
-
+
target->SendUpdateToPlayer(this);
UpdateVisibilityOf_helper(m_clientGUIDs, target);
@@ -19422,7 +19418,7 @@ void Player::SendInitialPacketsAfterAddToMap()
SPELL_AURA_FEATHER_FALL, SPELL_AURA_HOVER, SPELL_AURA_SAFE_FALL,
SPELL_AURA_FLY, SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED, SPELL_AURA_NONE
};
- for(AuraType const* itr = &auratypes[0]; itr && itr[0] != SPELL_AURA_NONE; ++itr)
+ for (AuraType const* itr = &auratypes[0]; itr && itr[0] != SPELL_AURA_NONE; ++itr)
{
Unit::AuraEffectList const& auraList = GetAurasByType(*itr);
if(!auraList.empty())
@@ -19503,7 +19499,7 @@ void Player::SendInstanceResetWarning( uint32 mapid, uint32 difficulty, uint32 t
void Player::ApplyEquipCooldown( Item * pItem )
{
- for(uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
+ for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
{
_Spell const& spellData = pItem->GetProto()->Spells[i];
@@ -19544,7 +19540,7 @@ void Player::resetSpells(bool myClassOnly)
family = clsEntry->spellfamily;
}
- for(PlayerSpellMap::const_iterator iter = smap.begin();iter != smap.end(); ++iter)
+ for (PlayerSpellMap::const_iterator iter = smap.begin(); iter != smap.end(); ++iter)
{
if(myClassOnly)
{
@@ -19609,7 +19605,7 @@ void Player::learnQuestRewardedSpells(Quest const* quest)
// check learned spells state
bool found = false;
- for(uint8 i=0; i < 3; ++i)
+ for (uint8 i=0; i < 3; ++i)
{
if(spellInfo->Effect[i] == SPELL_EFFECT_LEARN_SPELL && !HasSpell(spellInfo->EffectTriggerSpell[i]))
{
@@ -19641,7 +19637,7 @@ void Player::learnQuestRewardedSpells(Quest const* quest)
if(learnedInfo->Effect[0]==SPELL_EFFECT_TRADE_SKILL && learnedInfo->Effect[1]==0 && profSpell)
{
// search other specialization for same prof
- for(PlayerSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr)
+ for (PlayerSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr)
{
if(itr->second->state == PLAYERSPELL_REMOVED || itr->first==learned_0)
continue;
@@ -19667,7 +19663,7 @@ void Player::learnQuestRewardedSpells(Quest const* quest)
void Player::learnQuestRewardedSpells()
{
// learn spells received from quest completing
- for(QuestStatusMap::const_iterator itr = mQuestStatus.begin(); itr != mQuestStatus.end(); ++itr)
+ for (QuestStatusMap::const_iterator itr = mQuestStatus.begin(); itr != mQuestStatus.end(); ++itr)
{
// skip no rewarded quests
if(!itr->second.m_rewarded)
@@ -19720,7 +19716,7 @@ void Player::SendAurasForTarget(Unit *target)
data.append(target->GetPackGUID());
Unit::VisibleAuraMap const *visibleAuras = target->GetVisibleAuras();
- for(Unit::VisibleAuraMap::const_iterator itr = visibleAuras->begin(); itr != visibleAuras->end(); ++itr)
+ for (Unit::VisibleAuraMap::const_iterator itr = visibleAuras->begin(); itr != visibleAuras->end(); ++itr)
{
Aura * aura=itr->second;
data << uint8(aura->GetAuraSlot());
@@ -19753,7 +19749,7 @@ void Player::SendAurasForTarget(Unit *target)
void Player::SetDailyQuestStatus( uint32 quest_id )
{
- for(uint32 quest_daily_idx = 0; quest_daily_idx < PLAYER_MAX_DAILY_QUESTS; ++quest_daily_idx)
+ for (uint32 quest_daily_idx = 0; quest_daily_idx < PLAYER_MAX_DAILY_QUESTS; ++quest_daily_idx)
{
if(!GetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1+quest_daily_idx))
{
@@ -19767,7 +19763,7 @@ void Player::SetDailyQuestStatus( uint32 quest_id )
void Player::ResetDailyQuestStatus()
{
- for(uint32 quest_daily_idx = 0; quest_daily_idx < PLAYER_MAX_DAILY_QUESTS; ++quest_daily_idx)
+ for (uint32 quest_daily_idx = 0; quest_daily_idx < PLAYER_MAX_DAILY_QUESTS; ++quest_daily_idx)
SetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1+quest_daily_idx,0);
// DB data deleted in caller
@@ -19843,7 +19839,7 @@ bool Player::IsSpellFitByClassAndRace( uint32 spell_id ) const
if (bounds.first==bounds.second)
return true;
- for(SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
+ for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
{
// skip wrong race skills
if (_spell_idx->second->racemask && (_spell_idx->second->racemask & racemask) == 0)
@@ -19861,7 +19857,7 @@ bool Player::IsSpellFitByClassAndRace( uint32 spell_id ) const
bool Player::HasQuestForGO(int32 GOId) const
{
- for( uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
+ for (uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i )
{
uint32 questid = GetQuestSlotQuestId(i);
if ( questid == 0 )
@@ -19902,7 +19898,7 @@ void Player::UpdateForQuestWorldObjects()
UpdateData udata;
WorldPacket packet;
- for(ClientGUIDs::iterator itr=m_clientGUIDs.begin(); itr!=m_clientGUIDs.end(); ++itr)
+ for (ClientGUIDs::iterator itr=m_clientGUIDs.begin(); itr!=m_clientGUIDs.end(); ++itr)
{
if(IS_GAMEOBJECT_GUID(*itr))
{
@@ -19921,7 +19917,7 @@ void Player::UpdateForQuestWorldObjects()
continue;
SpellClickInfoMapBounds clickPair = objmgr.GetSpellClickInfoMapBounds(obj->GetEntry());
- for(SpellClickInfoMap::const_iterator _itr = clickPair.first; _itr != clickPair.second; ++_itr)
+ for (SpellClickInfoMap::const_iterator _itr = clickPair.first; _itr != clickPair.second; ++_itr)
{
if(_itr->second.questStart || _itr->second.questEnd)
{
@@ -19968,7 +19964,7 @@ void Player::SummonIfPossible(bool agree)
void Player::RemoveItemDurations( Item *item )
{
- for(ItemDurationList::iterator itr = m_itemDuration.begin();itr != m_itemDuration.end(); ++itr)
+ for (ItemDurationList::iterator itr = m_itemDuration.begin(); itr != m_itemDuration.end(); ++itr)
{
if(*itr==item)
{
@@ -20035,7 +20031,7 @@ bool Player::HasItemFitToSpellReqirements(SpellEntry const* spellInfo, Item cons
{
case ITEM_CLASS_WEAPON:
{
- for(uint8 i= EQUIPMENT_SLOT_MAINHAND; i < EQUIPMENT_SLOT_TABARD; ++i)
+ for (uint8 i= EQUIPMENT_SLOT_MAINHAND; i < EQUIPMENT_SLOT_TABARD; ++i)
if(Item *item = GetUseableItemByPos( INVENTORY_SLOT_BAG_0, i ))
if(item!=ignoreItem && item->IsFitToSpellRequirements(spellInfo))
return true;
@@ -20044,7 +20040,7 @@ bool Player::HasItemFitToSpellReqirements(SpellEntry const* spellInfo, Item cons
case ITEM_CLASS_ARMOR:
{
// tabard not have dependent spells
- for(uint8 i= EQUIPMENT_SLOT_START; i< EQUIPMENT_SLOT_MAINHAND; ++i)
+ for (uint8 i= EQUIPMENT_SLOT_START; i< EQUIPMENT_SLOT_MAINHAND; ++i)
if(Item *item = GetUseableItemByPos( INVENTORY_SLOT_BAG_0, i ))
if(item!=ignoreItem && item->IsFitToSpellRequirements(spellInfo))
return true;
@@ -20090,7 +20086,7 @@ bool Player::CanNoReagentCast(SpellEntry const* spellInfo) const
void Player::RemoveItemDependentAurasAndCasts( Item * pItem )
{
AuraMap& auras = GetAuras();
- for(AuraMap::iterator itr = auras.begin(); itr != auras.end(); )
+ for (AuraMap::iterator itr = auras.begin(); itr != auras.end(); )
{
Aura* aura = itr->second;
@@ -20126,7 +20122,7 @@ uint32 Player::GetResurrectionSpellId()
uint32 prio = 0;
uint32 spell_id = 0;
AuraEffectList const& dummyAuras = GetAurasByType(SPELL_AURA_DUMMY);
- for(AuraEffectList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
+ for (AuraEffectList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
{
// Soulstone Resurrection // prio: 3 (max, non death persistent)
if( prio < 2 && (*itr)->GetSpellProto()->SpellVisual[0] == 99 && (*itr)->GetSpellProto()->SpellIconID == 92 )
@@ -20210,7 +20206,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
bool is_dungeon = PvP ? false : sMapStore.LookupEntry(GetMapId())->IsDungeon();
float group_rate = Trinity::XP::xp_in_group_rate(count,is_raid);
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* pGroupGuy = itr->getSource();
if(!pGroupGuy)
@@ -20240,7 +20236,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
// handle SPELL_AURA_MOD_XP_PCT auras
Unit::AuraEffectList const& ModXPPctAuras = GetAurasByType(SPELL_AURA_MOD_XP_PCT);
- for(Unit::AuraEffectList::const_iterator i = ModXPPctAuras.begin();i != ModXPPctAuras.end(); ++i)
+ for (Unit::AuraEffectList::const_iterator i = ModXPPctAuras.begin(); i != ModXPPctAuras.end(); ++i)
itr_xp = uint32(itr_xp*(1.0f + (*i)->GetAmount() / 100.0f));
pGroupGuy->GiveXP(itr_xp, pVictim);
@@ -20274,7 +20270,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
// handle SPELL_AURA_MOD_XP_PCT auras
Unit::AuraEffectList const& ModXPPctAuras = GetAurasByType(SPELL_AURA_MOD_XP_PCT);
- for(Unit::AuraEffectList::const_iterator i = ModXPPctAuras.begin();i != ModXPPctAuras.end(); ++i)
+ for (Unit::AuraEffectList::const_iterator i = ModXPPctAuras.begin(); i != ModXPPctAuras.end(); ++i)
xp = uint32(xp*(1.0f + (*i)->GetAmount() / 100.0f));
GiveXP(xp, pVictim);
@@ -20297,7 +20293,7 @@ void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewar
// prepare data for near group iteration
if(Group *pGroup = GetGroup())
{
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* pGroupGuy = itr->getSource();
if(!pGroupGuy)
@@ -20387,7 +20383,7 @@ void Player::UpdateZoneDependentAuras( uint32 newZone )
{
// Some spells applied at enter into zone (with subzones), aura removed in UpdateAreaDependentAuras that called always at zone->area update
SpellAreaForAreaMapBounds saBounds = spellmgr.GetSpellAreaForAreaMapBounds(newZone);
- for(SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
+ for (SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
if(itr->second->autocast && itr->second->IsFitToRequirements(this,newZone,0))
if( !HasAura(itr->second->spellId) )
CastSpell(this,itr->second->spellId,true);
@@ -20396,7 +20392,7 @@ void Player::UpdateZoneDependentAuras( uint32 newZone )
void Player::UpdateAreaDependentAuras( uint32 newArea )
{
// remove auras from spells with area limitations
- for(AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end();)
+ for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); )
{
// use m_zoneUpdateId for speed: UpdateArea called from UpdateZone or instead UpdateZone in both cases m_zoneUpdateId up-to-date
if(spellmgr.GetSpellAllowedInLocationError(iter->second->GetSpellProto(),GetMapId(),m_zoneUpdateId,newArea,this) != SPELL_CAST_OK)
@@ -20407,7 +20403,7 @@ void Player::UpdateAreaDependentAuras( uint32 newArea )
// some auras applied at subzone enter
SpellAreaForAreaMapBounds saBounds = spellmgr.GetSpellAreaForAreaMapBounds(newArea);
- for(SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
+ for (SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
if(itr->second->autocast && itr->second->IsFitToRequirements(this,m_zoneUpdateId,newArea))
if( !HasAura(itr->second->spellId) )
CastSpell(this,itr->second->spellId,true);
@@ -20521,7 +20517,7 @@ Player* Player::GetNextRandomRaidMember(float radius)
std::vector<Player*> nearMembers;
nearMembers.reserve(pGroup->GetMembersCount());
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* Target = itr->getSource();
@@ -20654,7 +20650,7 @@ void Player::SetCanBlock( bool value )
bool ItemPosCount::isContainedIn(ItemPosCountVec const& vec) const
{
- for(ItemPosCountVec::const_iterator itr = vec.begin(); itr != vec.end();++itr)
+ for (ItemPosCountVec::const_iterator itr = vec.begin(); itr != vec.end(); ++itr)
if(itr->pos == pos)
return true;
return false;
@@ -20783,7 +20779,7 @@ uint32 Player::GetBarberShopCost(uint8 newhairstyle, uint8 newhaircolor, uint8 n
void Player::InitGlyphsForLevel()
{
- for(uint32 i = 0; i < sGlyphSlotStore.GetNumRows(); ++i)
+ for (uint32 i = 0; i < sGlyphSlotStore.GetNumRows(); ++i)
if(GlyphSlotEntry const * gs = sGlyphSlotStore.LookupEntry(i))
if(gs->Order)
SetGlyphSlot(gs->Order - 1, gs->Id);
@@ -20811,7 +20807,7 @@ bool Player::isTotalImmune()
AuraEffectList const& immune = GetAurasByType(SPELL_AURA_SCHOOL_IMMUNITY);
uint32 immuneMask = 0;
- for(AuraEffectList::const_iterator itr = immune.begin(); itr != immune.end(); ++itr)
+ for (AuraEffectList::const_iterator itr = immune.begin(); itr != immune.end(); ++itr)
{
immuneMask |= (*itr)->GetMiscValue();
if( immuneMask & SPELL_SCHOOL_MASK_ALL ) // total immunity
@@ -20861,7 +20857,7 @@ bool Player::isTotalImmunity()
{
AuraEffectList const& immune = GetAurasByType(SPELL_AURA_SCHOOL_IMMUNITY);
- for(AuraEffectList::const_iterator itr = immune.begin(); itr != immune.end(); ++itr)
+ for (AuraEffectList::const_iterator itr = immune.begin(); itr != immune.end(); ++itr)
{
if (((*itr)->GetMiscValue() & SPELL_SCHOOL_MASK_ALL) !=0) // total immunity
{
@@ -20869,7 +20865,7 @@ bool Player::isTotalImmunity()
}
if (((*itr)->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL) !=0) // physical damage immunity
{
- for(AuraEffectList::const_iterator i = immune.begin(); i != immune.end(); ++i)
+ for (AuraEffectList::const_iterator i = immune.begin(); i != immune.end(); ++i)
{
if (((*i)->GetMiscValue() & SPELL_SCHOOL_MASK_MAGIC) !=0) // magic immunity
{
@@ -20890,7 +20886,7 @@ void Player::UpdateCharmedAI()
if(charmer->IsInEvadeMode())
{
AuraEffectList const& auras = GetAurasByType(SPELL_AURA_MOD_CHARM);
- for(AuraEffectList::const_iterator iter = auras.begin(); iter != auras.end(); ++iter)
+ for (AuraEffectList::const_iterator iter = auras.begin(); iter != auras.end(); ++iter)
if((*iter)->GetCasterGUID() == charmer->GetGUID() && (*iter)->GetParentAura()->IsPermanent())
{
charmer->DealDamage(this, GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
@@ -20926,7 +20922,7 @@ void Player::ConvertRune(uint8 index, RuneType newType)
void Player::ResyncRunes(uint8 count)
{
WorldPacket data(SMSG_RESYNC_RUNES, count * 2);
- for(uint32 i = 0; i < count; ++i)
+ for (uint32 i = 0; i < count; ++i)
{
data << uint8(GetCurrentRune(i)); // rune type
data << uint8(255 - (GetRuneCooldown(i) * 51)); // passed cooldown time (0-255)
@@ -20960,7 +20956,7 @@ void Player::InitRunes()
m_runes->runeState = 0;
m_runes->lastUsedRune = RUNE_BLOOD;
- for(uint32 i = 0; i < MAX_RUNES; ++i)
+ for (uint32 i = 0; i < MAX_RUNES; ++i)
{
SetBaseRune(i, runeSlotTypes[i]); // init base types
SetCurrentRune(i, runeSlotTypes[i]); // init current types
@@ -20968,13 +20964,13 @@ void Player::InitRunes()
m_runes->SetRuneState(i);
}
- for(uint32 i = 0; i < NUM_RUNE_TYPES; ++i)
+ for (uint32 i = 0; i < NUM_RUNE_TYPES; ++i)
SetFloatValue(PLAYER_RUNE_REGEN_1 + i, 0.1f);
}
bool Player::IsBaseRuneSlotsOnCooldown(RuneType runeType) const
{
- for(uint32 i = 0; i < MAX_RUNES; ++i)
+ for (uint32 i = 0; i < MAX_RUNES; ++i)
if (GetBaseRune(i) == runeType && GetRuneCooldown(i) == 0)
return false;
@@ -20987,7 +20983,7 @@ void Player::AutoStoreLoot(uint8 bag, uint8 slot, uint32 loot_id, LootStore cons
loot.FillLoot (loot_id,store,this,true);
uint32 max_slot = loot.GetMaxSlotInLootFor(this);
- for(uint32 i = 0; i < max_slot; ++i)
+ for (uint32 i = 0; i < max_slot; ++i)
{
LootItem* lootItem = loot.LootItemInSlot(i,this);
@@ -21135,7 +21131,7 @@ uint8 Player::CanEquipUniqueItem(Item* pItem, uint8 eslot, uint32 limit_count) c
return res;
// check unique-equipped on gems
- for(uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+3; ++enchant_slot)
+ for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+3; ++enchant_slot)
{
uint32 enchant_id = pItem->GetEnchantmentId(EnchantmentSlot(enchant_slot));
if(!enchant_id)
@@ -21271,7 +21267,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank)
// find current max talent rank (0~5)
uint8 curtalent_maxrank = 0; // 0 = not learned any rank
- for(int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank)
+ for (int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank)
{
if(talentInfo->RankID[rank] && HasSpell(talentInfo->RankID[rank]))
{
@@ -21408,7 +21404,7 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank)
// find current max talent rank (0~5)
uint8 curtalent_maxrank = 0; // 0 = not learned any rank
- for(int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank)
+ for (int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank)
{
if(talentInfo->RankID[rank] && pet->HasSpell(talentInfo->RankID[rank]))
{
@@ -21556,7 +21552,7 @@ bool Player::canSeeSpellClickOn(Creature const *c) const
if(clickPair.first == clickPair.second)
return true;
- for(SpellClickInfoMap::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
+ for (SpellClickInfoMap::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
if(itr->second.IsFitToRequirements(this, c))
return true;
@@ -21572,7 +21568,7 @@ void Player::BuildPlayerTalentsInfoData(WorldPacket *data)
if(m_specsCount)
{
// loop through all specs (only 1 for now)
- for(uint32 specIdx = 0; specIdx < m_specsCount; ++specIdx)
+ for (uint32 specIdx = 0; specIdx < m_specsCount; ++specIdx)
{
uint8 talentIdCount = 0;
size_t pos = data->wpos();
@@ -21581,11 +21577,11 @@ void Player::BuildPlayerTalentsInfoData(WorldPacket *data)
// find class talent tabs (all players have 3 talent tabs)
uint32 const* talentTabIds = GetTalentTabPages(getClass());
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
{
uint32 talentTabId = talentTabIds[i];
- for(uint32 talentId = 0; talentId < sTalentStore.GetNumRows(); ++talentId)
+ for (uint32 talentId = 0; talentId < sTalentStore.GetNumRows(); ++talentId)
{
TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentId);
if(!talentInfo)
@@ -21597,7 +21593,7 @@ void Player::BuildPlayerTalentsInfoData(WorldPacket *data)
// find max talent rank (0~4)
int8 curtalent_maxrank = -1;
- for(int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank)
+ for (int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank)
{
if(talentInfo->RankID[rank] && HasTalent(talentInfo->RankID[rank], specIdx))
{
@@ -21621,7 +21617,7 @@ void Player::BuildPlayerTalentsInfoData(WorldPacket *data)
*data << uint8(MAX_GLYPH_SLOT_INDEX); // glyphs count
- for(uint8 i = 0; i < MAX_GLYPH_SLOT_INDEX; ++i)
+ for (uint8 i = 0; i < MAX_GLYPH_SLOT_INDEX; ++i)
*data << uint16(m_Glyphs[specIdx][i]); // GlyphProperties.dbc
}
}
@@ -21653,7 +21649,7 @@ void Player::BuildPetTalentsInfoData(WorldPacket *data)
if(!pet_family || pet_family->petTalentType < 0)
return;
- for(uint32 talentTabId = 1; talentTabId < sTalentTabStore.GetNumRows(); ++talentTabId)
+ for (uint32 talentTabId = 1; talentTabId < sTalentTabStore.GetNumRows(); ++talentTabId)
{
TalentTabEntry const *talentTabInfo = sTalentTabStore.LookupEntry( talentTabId );
if(!talentTabInfo)
@@ -21662,7 +21658,7 @@ void Player::BuildPetTalentsInfoData(WorldPacket *data)
if(!((1 << pet_family->petTalentType) & talentTabInfo->petTalentMask))
continue;
- for(uint32 talentId = 0; talentId < sTalentStore.GetNumRows(); ++talentId)
+ for (uint32 talentId = 0; talentId < sTalentStore.GetNumRows(); ++talentId)
{
TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentId);
if(!talentInfo)
@@ -21674,7 +21670,7 @@ void Player::BuildPetTalentsInfoData(WorldPacket *data)
// find max talent rank (0~4)
int8 curtalent_maxrank = -1;
- for(int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank)
+ for (int8 rank = MAX_TALENT_RANK-1; rank >= 0; --rank)
{
if(talentInfo->RankID[rank] && pet->HasSpell(talentInfo->RankID[rank]))
{
@@ -21716,7 +21712,7 @@ void Player::BuildEnchantmentsInfoData(WorldPacket *data)
size_t slotUsedMaskPos = data->wpos();
*data << uint32(slotUsedMask); // slotUsedMask < 0x80000
- for(uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
+ for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
{
Item *item = GetItemByPos(INVENTORY_SLOT_BAG_0, i);
@@ -21731,7 +21727,7 @@ void Player::BuildEnchantmentsInfoData(WorldPacket *data)
size_t enchantmentMaskPos = data->wpos();
*data << uint16(enchantmentMask); // enchantmentMask < 0x1000
- for(uint32 j = 0; j < MAX_ENCHANTMENT_SLOT; ++j)
+ for (uint32 j = 0; j < MAX_ENCHANTMENT_SLOT; ++j)
{
uint32 enchId = item->GetEnchantmentId(EnchantmentSlot(j));
@@ -21745,7 +21741,6 @@ void Player::BuildEnchantmentsInfoData(WorldPacket *data)
data->put<uint16>(enchantmentMaskPos, enchantmentMask);
-
*data << uint16(0); // unknown
data->appendPackGUID(item->GetUInt64Value(ITEM_FIELD_CREATOR)); // item creator
*data << uint32(0); // seed?
@@ -21760,7 +21755,7 @@ void Player::SendEquipmentSetList()
WorldPacket data(SMSG_EQUIPMENT_SET_LIST, 4);
size_t count_pos = data.wpos();
data << uint32(count); // count placeholder
- for(EquipmentSets::iterator itr = m_EquipmentSets.begin(); itr != m_EquipmentSets.end(); ++itr)
+ for (EquipmentSets::iterator itr = m_EquipmentSets.begin(); itr != m_EquipmentSets.end(); ++itr)
{
if(itr->second.state==EQUIPMENT_SET_DELETED)
continue;
@@ -21768,7 +21763,7 @@ void Player::SendEquipmentSetList()
data << uint32(itr->first);
data << itr->second.Name;
data << itr->second.IconName;
- for(uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
+ for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
data.appendPackGUID(MAKE_NEW_GUID(itr->second.Items[i], 0, HIGHGUID_ITEM));
++count; // client have limit but it checked at loading and set
@@ -21783,7 +21778,7 @@ void Player::SetEquipmentSet(uint32 index, EquipmentSet eqset)
{
bool found = false;
- for(EquipmentSets::iterator itr = m_EquipmentSets.begin(); itr != m_EquipmentSets.end(); ++itr)
+ for (EquipmentSets::iterator itr = m_EquipmentSets.begin(); itr != m_EquipmentSets.end(); ++itr)
{
if((itr->second.Guid == eqset.Guid) && (itr->first == index))
{
@@ -21820,7 +21815,7 @@ void Player::SetEquipmentSet(uint32 index, EquipmentSet eqset)
void Player::_SaveEquipmentSets()
{
- for(EquipmentSets::iterator itr = m_EquipmentSets.begin(); itr != m_EquipmentSets.end();)
+ for (EquipmentSets::iterator itr = m_EquipmentSets.begin(); itr != m_EquipmentSets.end(); )
{
uint32 index = itr->first;
EquipmentSet& eqset = itr->second;
@@ -21865,7 +21860,7 @@ void Player::_SaveBGData()
void Player::DeleteEquipmentSet(uint64 setGuid)
{
- for(EquipmentSets::iterator itr = m_EquipmentSets.begin(); itr != m_EquipmentSets.end(); ++itr)
+ for (EquipmentSets::iterator itr = m_EquipmentSets.begin(); itr != m_EquipmentSets.end(); ++itr)
{
if(itr->second.Guid == setGuid)
{
@@ -21932,7 +21927,7 @@ void Player::_LoadGlyphs(QueryResult *result)
m_Glyphs[spec][3] = fields[4].GetUInt32();
m_Glyphs[spec][4] = fields[5].GetUInt32();
m_Glyphs[spec][5] = fields[6].GetUInt32();
-
+
} while (result->NextRow());
delete result;
@@ -21969,7 +21964,7 @@ void Player::_SaveTalents()
{
for (uint8 i = 0; i < MAX_TALENT_SPECS; ++i)
{
- for (PlayerTalentMap::iterator itr = m_talents[i]->begin(), next = m_talents[i]->begin(); itr != m_talents[i]->end();)
+ for (PlayerTalentMap::iterator itr = m_talents[i]->begin(), next = m_talents[i]->begin(); itr != m_talents[i]->end(); )
{
if (itr->second->state == PLAYERSPELL_REMOVED || itr->second->state == PLAYERSPELL_CHANGED)
CharacterDatabase.PExecute("DELETE FROM character_talent WHERE guid = '%u' and spell = '%u' and spec = '%u'", GetGUIDLow(), itr->first, itr->second->spec);
@@ -22006,7 +22001,7 @@ void Player::UpdateSpecCount(uint8 count)
else if (count == MAX_TALENT_SPECS)
{
_SaveActions(); // make sure the button list is cleaned up
- for(ActionButtonList::iterator itr = m_actionButtons.begin(); itr != m_actionButtons.end(); ++itr)
+ for (ActionButtonList::iterator itr = m_actionButtons.begin(); itr != m_actionButtons.end(); ++itr)
{
CharacterDatabase.PExecute("INSERT INTO character_action (guid,button,action,type,spec) VALUES ('%u', '%u', '%u', '%u', '%u')",
GetGUIDLow(), (uint32)itr->first, (uint32)itr->second.GetAction(), (uint32)itr->second.GetType(), 1 );
@@ -22036,11 +22031,11 @@ void Player::ActivateSpec(uint8 spec)
RemoveAllAuras(this->GetGUID(), NULL, false, true); // remove all positive auras (ie: buffs from another spec)
_SaveActions();
-
+
UnsummonPetTemporaryIfAny();
-
+
uint32 const* talentTabIds = GetTalentTabPages(getClass());
-
+
for (uint8 i = 0; i < 3; ++i)
{
uint32 talentTabId = talentTabIds[i];
@@ -22071,7 +22066,7 @@ void Player::ActivateSpec(uint8 spec)
SetActiveSpec(spec);
uint32 spentTalents = 0;
-
+
for (uint8 i = 0; i < 3; ++i)
{
uint32 talentTabId = talentTabIds[i];
@@ -22099,7 +22094,7 @@ void Player::ActivateSpec(uint8 spec)
}
// set glyphs
- for (uint8 slot = 0; slot < MAX_GLYPH_SLOT_INDEX; ++slot)
+ for (uint8 slot = 0; slot < MAX_GLYPH_SLOT_INDEX; ++slot)
{
uint32 glyph = m_Glyphs[m_activeSpec][slot];
@@ -22117,14 +22112,14 @@ void Player::ActivateSpec(uint8 spec)
m_actionButtons.clear();
if (QueryResult *result = CharacterDatabase.PQuery("SELECT button,action,type FROM character_action WHERE guid = '%u' AND spec = '%u' ORDER BY button", GetGUIDLow(), m_activeSpec))
_LoadActions(result, false);
-
+
ResummonPetTemporaryUnSummonedIfAny();
SendActionButtons(1);
Powers pw = getPowerType();
if (pw != POWER_MANA)
SetPower(POWER_MANA, 0); // what on earth is this for?!
-
+
SetPower(pw, 0);
}
diff --git a/src/game/Player.h b/src/game/Player.h
index 1a218879aa6..6d94ae4ad83 100644
--- a/src/game/Player.h
+++ b/src/game/Player.h
@@ -208,7 +208,7 @@ struct PlayerClassInfo
struct PlayerLevelInfo
{
- PlayerLevelInfo() { for(uint8 i=0; i < MAX_STATS; ++i ) stats[i] = 0; }
+ PlayerLevelInfo() { for (uint8 i=0; i < MAX_STATS; ++i ) stats[i] = 0; }
uint8 stats[MAX_STATS];
};
@@ -316,7 +316,7 @@ struct Runes
struct EnchantDuration
{
EnchantDuration() : item(NULL), slot(MAX_ENCHANTMENT_SLOT), leftduration(0) {};
- EnchantDuration(Item * _item, EnchantmentSlot _slot, uint32 _leftduration) : item(_item), slot(_slot),
+ EnchantDuration(Item * _item, EnchantmentSlot _slot, uint32 _leftduration) : item(_item), slot(_slot),
leftduration(_leftduration){ assert(item); };
Item * item;
@@ -366,7 +366,7 @@ struct LookingForGroup
bool HaveInSlot(LookingForGroupSlot const& slot) const { return HaveInSlot(slot.entry, slot.type); }
bool HaveInSlot(uint32 _entry, uint32 _type) const
{
- for(uint8 i = 0; i < MAX_LOOKING_FOR_GROUP_SLOT; ++i)
+ for (uint8 i = 0; i < MAX_LOOKING_FOR_GROUP_SLOT; ++i)
if(slots[i].Is(_entry, _type))
return true;
return false;
@@ -374,7 +374,7 @@ struct LookingForGroup
bool canAutoJoin() const
{
- for(uint8 i = 0; i < MAX_LOOKING_FOR_GROUP_SLOT; ++i)
+ for (uint8 i = 0; i < MAX_LOOKING_FOR_GROUP_SLOT; ++i)
if(slots[i].canAutoJoin())
return true;
return false;
@@ -382,7 +382,7 @@ struct LookingForGroup
bool Empty() const
{
- for(uint8 i = 0; i < MAX_LOOKING_FOR_GROUP_SLOT; ++i)
+ for (uint8 i = 0; i < MAX_LOOKING_FOR_GROUP_SLOT; ++i)
if(!slots[i].Empty())
return false;
return more.Empty();
@@ -520,8 +520,6 @@ enum ActivateTaxiReplies
ERR_TAXINOTSTANDING = 12
};
-
-
enum MirrorTimerType
{
FATIGUE_TIMER = 0,
@@ -671,7 +669,7 @@ struct EquipmentSet
{
EquipmentSet() : Guid(0), state(EQUIPMENT_SET_NEW)
{
- for(uint8 i = 0; i < EQUIPMENT_SLOT_END; ++i)
+ for (uint8 i = 0; i < EQUIPMENT_SLOT_END; ++i)
Items[i] = 0;
}
@@ -904,7 +902,6 @@ struct BGData
BGData() : bgInstanceID(0), bgTypeID(BATTLEGROUND_TYPE_NONE), bgAfkReportedCount(0), bgAfkReportedTimer(0),
bgTeam(0), mountSpell(0) { ClearTaxiPath(); }
-
uint32 bgInstanceID; ///< This variable is set to bg->m_InstanceID,
/// when player is teleported to BG - (it is battleground's GUID)
BattleGroundTypeId bgTypeID;
@@ -915,7 +912,6 @@ struct BGData
uint32 bgTeam; ///< What side the player will be added to
-
uint32 mountSpell;
uint32 taxiPath[2];
@@ -1497,9 +1493,9 @@ class MANGOS_DLL_SPEC Player : public Unit
void SetGlyphSlot(uint8 slot, uint32 slottype) { SetUInt32Value(PLAYER_FIELD_GLYPH_SLOTS_1 + slot, slottype); }
uint32 GetGlyphSlot(uint8 slot) { return GetUInt32Value(PLAYER_FIELD_GLYPH_SLOTS_1 + slot); }
void SetGlyph(uint8 slot, uint32 glyph)
- {
+ {
m_Glyphs[m_activeSpec][slot] = glyph;
- SetUInt32Value(PLAYER_FIELD_GLYPHS_1 + slot, glyph);
+ SetUInt32Value(PLAYER_FIELD_GLYPHS_1 + slot, glyph);
}
uint32 GetGlyph(uint8 slot) { return m_Glyphs[m_activeSpec][slot]; }
@@ -1583,7 +1579,7 @@ class MANGOS_DLL_SPEC Player : public Unit
void SetPvP(bool state)
{
Unit::SetPvP(state);
- for(ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
+ for (ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
(*itr)->SetPvP(state);
}
void UpdatePvP(bool state, bool override=false);
@@ -1870,7 +1866,7 @@ class MANGOS_DLL_SPEC Player : public Unit
float GetTotalPercentageModValue(BaseModGroup modGroup) const { return m_auraBaseMod[modGroup][FLAT_MOD] + m_auraBaseMod[modGroup][PCT_MOD]; }
void _ApplyAllStatBonuses();
void _RemoveAllStatBonuses();
-
+
void _ApplyWeaponDependentAuraMods(Item *item, WeaponAttackType attackType, bool apply);
void _ApplyWeaponDependentAuraCritMod(Item *item, WeaponAttackType attackType, AuraEffect* aura, bool apply);
void _ApplyWeaponDependentAuraDamageMod(Item *item, WeaponAttackType attackType, AuraEffect* aura, bool apply);
@@ -1921,7 +1917,6 @@ class MANGOS_DLL_SPEC Player : public Unit
BattleGroundTypeId GetBattleGroundTypeId() const { return m_bgData.bgTypeID; }
BattleGround* GetBattleGround() const;
-
BGQueueIdBasedOnLevel GetBattleGroundQueueIdFromLevel(BattleGroundTypeId bgTypeId) const;
bool InBattleGroundQueue() const
@@ -2253,7 +2248,7 @@ Spell * m_spellModTakingSpell;
/*********************************************************/
/*** QUEST SYSTEM ***/
/*********************************************************/
-
+
//We allow only one timed quest active at the same time. Below can then be simple value instead of set.
std::set<uint32> m_timedquests;
diff --git a/src/game/PlayerDump.cpp b/src/game/PlayerDump.cpp
index 12544c62e41..4a34b7f5102 100644
--- a/src/game/PlayerDump.cpp
+++ b/src/game/PlayerDump.cpp
@@ -69,7 +69,7 @@ static bool findtoknth(std::string &str, int n, std::string::size_type &s, std::
{
int i; s = e = 0;
std::string::size_type size = str.size();
- for(i = 1; s < size && i < n; s++) if(str[s] == ' ') ++i;
+ for (i = 1; s < size && i < n; s++) if(str[s] == ' ') ++i;
if (i < n)
return false;
@@ -98,7 +98,7 @@ bool findnth(std::string &str, int n, std::string::size_type &s, std::string::si
if (e == std::string::npos) return false;
} while(str[e-1] == '\\');
- for(int i = 1; i < n; ++i)
+ for (int i = 1; i < n; ++i)
{
do
{
@@ -203,7 +203,7 @@ std::string CreateDumpString(char const* tableName, QueryResult *result)
std::ostringstream ss;
ss << "INSERT INTO "<< _TABLE_SIM_ << tableName << _TABLE_SIM_ << " VALUES (";
Field *fields = result->Fetch();
- for(uint32 i = 0; i < result->GetFieldCount(); ++i)
+ for (uint32 i = 0; i < result->GetFieldCount(); ++i)
{
if (i == 0) ss << "'";
else ss << ", '";
@@ -229,7 +229,7 @@ std::string PlayerDumpWriter::GenerateWhereStr(char const* field, GUIDs const& g
{
std::ostringstream wherestr;
wherestr << field << " IN ('";
- for(; itr != guids.end(); ++itr)
+ for (; itr != guids.end(); ++itr)
{
wherestr << *itr;
@@ -348,7 +348,7 @@ std::string PlayerDumpWriter::GetDump(uint32 guid)
{
QueryFieldNames const& namesMap = result->GetFieldNames();
std::string reqName;
- for(QueryFieldNames::const_iterator itr = namesMap.begin(); itr != namesMap.end(); ++itr)
+ for (QueryFieldNames::const_iterator itr = namesMap.begin(); itr != namesMap.end(); ++itr)
{
if(itr->substr(0,9)=="required_")
{
@@ -370,7 +370,7 @@ std::string PlayerDumpWriter::GetDump(uint32 guid)
else
sLog.outError("Character DB not have 'character_db_version' table, revision guard query not added to pdump.");
*/
- for(int i = 0; i < DUMP_TABLE_COUNT; ++i)
+ for (int i = 0; i < DUMP_TABLE_COUNT; ++i)
DumpTable(dump, guid, dumpTables[i].name, dumpTables[i].name, dumpTables[i].type);
// TODO: Add instance/group..
@@ -508,7 +508,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
DumpTableType type;
uint8 i;
- for(i = 0; i < DUMP_TABLE_COUNT; ++i)
+ for (i = 0; i < DUMP_TABLE_COUNT; ++i)
{
if (tn == dumpTables[i].name)
{
@@ -542,7 +542,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
std::string vals = getnth(line, 3);
if(!changetoknth(vals, OBJECT_FIELD_GUID+1, newguid))
ROLLBACK(DUMP_FILE_BROKEN);
- for(uint16 field = PLAYER_FIELD_INV_SLOT_HEAD; field < PLAYER_FARSIGHT; field++)
+ for (uint16 field = PLAYER_FIELD_INV_SLOT_HEAD; field < PLAYER_FARSIGHT; field++)
if(!changetokGuid(vals, field+1, items, objmgr.m_hiItemGuid, true))
ROLLBACK(DUMP_FILE_BROKEN);
if(!changenth(line, 3, vals.c_str()))
diff --git a/src/game/PoolHandler.cpp b/src/game/PoolHandler.cpp
index 03b09f9a483..e12fc048e97 100644
--- a/src/game/PoolHandler.cpp
+++ b/src/game/PoolHandler.cpp
@@ -329,7 +329,6 @@ bool PoolGroup<Pool>::ReSpawn1Object(uint32 /*guid*/)
return true;
}
-
////////////////////////////////////////////////////////////
// Methods of class PoolHandler
@@ -578,10 +577,10 @@ void PoolHandler::LoadFromDB()
} while( result->NextRow() );
// Now check for circular reference
- for(uint16 i=0; i<max_pool_id; ++i)
+ for (uint16 i=0; i<max_pool_id; ++i)
{
std::set<uint16> checkedPools;
- for(SearchMap::iterator poolItr = mPoolSearchMap.find(i); poolItr != mPoolSearchMap.end(); poolItr = mPoolSearchMap.find(poolItr->second))
+ for (SearchMap::iterator poolItr = mPoolSearchMap.find(i); poolItr != mPoolSearchMap.end(); poolItr = mPoolSearchMap.find(poolItr->second))
{
checkedPools.insert(poolItr->first);
if(checkedPools.find(poolItr->second) != checkedPools.end())
diff --git a/src/game/QueryHandler.cpp b/src/game/QueryHandler.cpp
index ebd5e773c12..37f2887cd20 100644
--- a/src/game/QueryHandler.cpp
+++ b/src/game/QueryHandler.cpp
@@ -51,7 +51,7 @@ void WorldSession::SendNameQueryOpcode(Player *p)
if(DeclinedName const* names = p->GetDeclinedNames())
{
data << uint8(1); // is declined
- for(int i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
+ for (int i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
data << names->name[i];
}
else
@@ -117,7 +117,7 @@ void WorldSession::SendNameQueryOpcodeFromDBCallBack(QueryResult *result, uint32
if(sWorld.getConfig(CONFIG_DECLINED_NAMES_USED) && fields[5].GetCppString() != "")
{
data << uint8(1); // is declined
- for(int i = 5; i < MAX_DECLINED_NAME_CASES+5; ++i)
+ for (int i = 5; i < MAX_DECLINED_NAME_CASES+5; ++i)
data << fields[i].GetCppString();
}
else
@@ -197,7 +197,7 @@ void WorldSession::HandleCreatureQueryOpcode( WorldPacket & recv_data )
data << float(ci->unk16); // unk
data << float(ci->unk17); // unk
data << uint8(ci->RacialLeader);
- for(uint32 i = 0; i < 4; ++i)
+ for (uint32 i = 0; i < 4; ++i)
data << uint32(ci->questItems[i]); // itemId[4], quest drop
data << uint32(ci->movementId); // CreatureMovementInfo.dbc
SendPacket( &data );
@@ -259,7 +259,7 @@ void WorldSession::HandleGameObjectQueryOpcode( WorldPacket & recv_data )
data << info->unk1; // 2.0.3, string
data.append(info->raw.data, 24);
data << float(info->size); // go size
- for(uint32 i = 0; i < 4; ++i)
+ for (uint32 i = 0; i < 4; ++i)
data << uint32(info->questItems[i]); // itemId[4], quest drop
SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE" );
@@ -347,7 +347,7 @@ void WorldSession::HandleNpcTextQueryOpcode( WorldPacket & recv_data )
if (!pGossip)
{
- for(uint32 i = 0; i < 8; ++i)
+ for (uint32 i = 0; i < 8; ++i)
{
data << float(0);
data << "Greetings $N";
@@ -402,7 +402,7 @@ void WorldSession::HandleNpcTextQueryOpcode( WorldPacket & recv_data )
data << pGossip->Options[i].Language;
- for(int j = 0; j < 3; ++j)
+ for (int j = 0; j < 3; ++j)
{
data << pGossip->Options[i].Emotes[j]._Delay;
data << pGossip->Options[i].Emotes[j]._Emote;
diff --git a/src/game/QuestHandler.cpp b/src/game/QuestHandler.cpp
index a803c49d6fd..7589c8a3712 100644
--- a/src/game/QuestHandler.cpp
+++ b/src/game/QuestHandler.cpp
@@ -173,7 +173,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode( WorldPacket & recv_data )
// destroy not required for quest finish quest starting item
bool destroyItem = true;
- for(int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
+ for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
{
if ((qInfo->ReqItemId[i] == ((Item*)pObject)->GetEntry()) && (((Item*)pObject)->GetProto()->MaxCount > 0))
{
@@ -431,7 +431,7 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
{
if (Group* pGroup = _player->GetGroup())
{
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player *pPlayer = itr->getSource();
@@ -526,7 +526,7 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32
return DIALOG_STATUS_NONE;
}
- for(QuestRelations::const_iterator i = qir->lower_bound(questgiver->GetEntry()); i != qir->upper_bound(questgiver->GetEntry()); ++i )
+ for (QuestRelations::const_iterator i = qir->lower_bound(questgiver->GetEntry()); i != qir->upper_bound(questgiver->GetEntry()); ++i )
{
uint32 result2 = 0;
uint32 quest_id = i->second;
@@ -549,7 +549,7 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32
result = result2;
}
- for(QuestRelations::const_iterator i = qr->lower_bound(questgiver->GetEntry()); i != qr->upper_bound(questgiver->GetEntry()); ++i )
+ for (QuestRelations::const_iterator i = qr->lower_bound(questgiver->GetEntry()); i != qr->upper_bound(questgiver->GetEntry()); ++i )
{
uint32 result2 = 0;
uint32 quest_id = i->second;
@@ -597,7 +597,7 @@ void WorldSession::HandleQuestgiverStatusMultipleQuery(WorldPacket& /*recvPacket
WorldPacket data(SMSG_QUESTGIVER_STATUS_MULTIPLE, 4);
data << uint32(count); // placeholder
- for(Player::ClientGUIDs::const_iterator itr = _player->m_clientGUIDs.begin(); itr != _player->m_clientGUIDs.end(); ++itr)
+ for (Player::ClientGUIDs::const_iterator itr = _player->m_clientGUIDs.begin(); itr != _player->m_clientGUIDs.end(); ++itr)
{
uint8 questStatus = DIALOG_STATUS_NONE;
uint8 defstatus = DIALOG_STATUS_NONE;
diff --git a/src/game/RandomMovementGenerator.cpp b/src/game/RandomMovementGenerator.cpp
index f50e6af4709..c8872c6fef6 100644
--- a/src/game/RandomMovementGenerator.cpp
+++ b/src/game/RandomMovementGenerator.cpp
@@ -61,7 +61,7 @@ RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature)
bool is_water_ok = creature.canSwim();
bool is_air_ok = creature.canFly();
- for(uint32 i = 0;; ++i)
+ for (uint32 i = 0; ; ++i)
{
const float angle = rand_norm()*(M_PI*2);
diff --git a/src/game/ReputationMgr.cpp b/src/game/ReputationMgr.cpp
index 35bf2304fe4..bdd6af49ccc 100644
--- a/src/game/ReputationMgr.cpp
+++ b/src/game/ReputationMgr.cpp
@@ -128,7 +128,7 @@ void ReputationMgr::SendForceReactions()
WorldPacket data;
data.Initialize(SMSG_SET_FORCED_REACTIONS, 4+m_forcedReactions.size()*(4+4));
data << uint32(m_forcedReactions.size());
- for(ForcedReactions::const_iterator itr = m_forcedReactions.begin(); itr != m_forcedReactions.end(); ++itr)
+ for (ForcedReactions::const_iterator itr = m_forcedReactions.begin(); itr != m_forcedReactions.end(); ++itr)
{
data << uint32(itr->first); // faction_id (Faction.dbc)
data << uint32(itr->second); // reputation rank
@@ -187,7 +187,7 @@ void ReputationMgr::SendInitialReputations()
void ReputationMgr::SendStates() const
{
- for(FactionStateList::const_iterator itr = m_factions.begin(); itr != m_factions.end(); ++itr)
+ for (FactionStateList::const_iterator itr = m_factions.begin(); itr != m_factions.end(); ++itr)
SendState(&(itr->second));
}
@@ -210,7 +210,7 @@ void ReputationMgr::Initialize()
m_reveredFactionCount = 0;
m_exaltedFactionCount = 0;
- for(unsigned int i = 1; i < sFactionStore.GetNumRows(); i++)
+ for (unsigned int i = 1; i < sFactionStore.GetNumRows(); i++)
{
FactionEntry const *factionEntry = sFactionStore.LookupEntry(i);
@@ -249,14 +249,14 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
towards other reputations for that group.
*/
uint32 team = factionEntry->team;
-
+
int32 sharedStanding = standing; // Here we decide what the amount is to send to the others of the group.
switch(factionEntry->ID)
{
case 1037: // Alliance Vanguard
case 1052: // Horde Expedition
extraTarget = -1; // Make possible to earn rep with this two factions
- break;
+ break;
}
switch(team)
@@ -270,7 +270,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
case 1052: // Horde Expedition
sharedStanding *= 0.5f; // Half of the reputation earned by any of the four subfactions of this team will
extraTarget = 2; // be added to the main faction. (http://www.wowwiki.com/Alliance_Vanguard)
- break;
+ break;
}
FactionEntry const *targetFaction = NULL;
@@ -281,7 +281,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
for (SimpleFactionsList::const_iterator itr = flist->begin(); itr != flist->end(); ++itr)
{
targetFaction = sFactionStore.LookupEntry(*itr);
- ASSERT(targetFaction != NULL);
+ ASSERT(targetFaction != NULL);
res = SetOneFactionReputation(targetFaction, sharedStanding, incremental);
}
return res;
@@ -292,9 +292,9 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
{
if((*itr) == factionEntry->ID) // Not to self
continue;
-
+
targetFaction = sFactionStore.LookupEntry(*itr);
- ASSERT(targetFaction != NULL);
+ ASSERT(targetFaction != NULL);
res = SetOneFactionReputation(targetFaction, sharedStanding, incremental);
}
}break;
@@ -520,7 +520,7 @@ void ReputationMgr::LoadFromDB(QueryResult *result)
void ReputationMgr::SaveToDB()
{
- for(FactionStateList::iterator itr = m_factions.begin(); itr != m_factions.end(); ++itr)
+ for (FactionStateList::iterator itr = m_factions.begin(); itr != m_factions.end(); ++itr)
{
if (itr->second.Changed)
{
diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h
index 0ccab173166..c21ac2069a8 100644
--- a/src/game/SharedDefines.h
+++ b/src/game/SharedDefines.h
@@ -183,7 +183,7 @@ enum SpellSchoolMask
inline SpellSchools GetFirstSchoolInMask(SpellSchoolMask mask)
{
- for(int i = 0; i < MAX_SPELL_SCHOOL; ++i)
+ for (int i = 0; i < MAX_SPELL_SCHOOL; ++i)
if(mask & (1 << i))
return SpellSchools(i);
@@ -221,7 +221,6 @@ const uint32 ItemQualityColors[MAX_ITEM_QUALITY] = {
0xffe6cc80 //LIGHT YELLOW
};
-
// ***********************************
// Spell Attributes definitions
// ***********************************
diff --git a/src/game/SkillDiscovery.cpp b/src/game/SkillDiscovery.cpp
index b1e16897b18..ed6041f216d 100644
--- a/src/game/SkillDiscovery.cpp
+++ b/src/game/SkillDiscovery.cpp
@@ -126,7 +126,7 @@ void LoadSkillDiscoveryTable()
continue;
}
- for(SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
+ for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
SkillDiscoveryStore[-int32(_spell_idx->second->skillId)].push_back( SkillDiscoveryEntry(spellId, reqSkillValue, chance) );
}
else
@@ -146,7 +146,7 @@ void LoadSkillDiscoveryTable()
sLog.outErrorDb("Some items can't be successfully discovered: have in chance field value < 0.000001 in `skill_discovery_template` DB table . List:\n%s",ssNonDiscoverableEntries.str().c_str());
// report about empty data for explicit discovery spells
- for(uint32 spell_id = 1; spell_id < sSpellStore.GetNumRows(); ++spell_id)
+ for (uint32 spell_id = 1; spell_id < sSpellStore.GetNumRows(); ++spell_id)
{
SpellEntry const* spellEntry = sSpellStore.LookupEntry(spell_id);
if (!spellEntry)
@@ -173,7 +173,7 @@ uint32 GetExplicitDiscoverySpell(uint32 spellId, Player* player)
uint32 skillvalue = bounds.first != bounds.second ? player->GetSkillValue(bounds.first->second->skillId) : 0;
float full_chance = 0;
- for(SkillDiscoveryList::const_iterator item_iter = tab->second.begin(); item_iter != tab->second.end(); ++item_iter)
+ for (SkillDiscoveryList::const_iterator item_iter = tab->second.begin(); item_iter != tab->second.end(); ++item_iter)
if (item_iter->reqSkillValue <= skillvalue)
if (!player->HasSpell(item_iter->spellId))
full_chance += item_iter->chance;
@@ -181,7 +181,7 @@ uint32 GetExplicitDiscoverySpell(uint32 spellId, Player* player)
float rate = full_chance / 100.0f;
float roll = rand_chance() * rate; // roll now in range 0..full_chance
- for(SkillDiscoveryList::const_iterator item_iter = tab->second.begin(); item_iter != tab->second.end(); ++item_iter)
+ for (SkillDiscoveryList::const_iterator item_iter = tab->second.begin(); item_iter != tab->second.end(); ++item_iter)
{
if (item_iter->reqSkillValue > skillvalue)
continue;
@@ -207,7 +207,7 @@ uint32 GetSkillDiscoverySpell(uint32 skillId, uint32 spellId, Player* player)
if (tab != SkillDiscoveryStore.end())
{
- for(SkillDiscoveryList::const_iterator item_iter = tab->second.begin(); item_iter != tab->second.end(); ++item_iter)
+ for (SkillDiscoveryList::const_iterator item_iter = tab->second.begin(); item_iter != tab->second.end(); ++item_iter)
{
if (roll_chance_f(item_iter->chance * sWorld.getRate(RATE_SKILL_DISCOVERY)) &&
item_iter->reqSkillValue <= skillvalue &&
@@ -225,7 +225,7 @@ uint32 GetSkillDiscoverySpell(uint32 skillId, uint32 spellId, Player* player)
tab = SkillDiscoveryStore.find(-(int32)skillId);
if (tab != SkillDiscoveryStore.end())
{
- for(SkillDiscoveryList::const_iterator item_iter = tab->second.begin(); item_iter != tab->second.end(); ++item_iter)
+ for (SkillDiscoveryList::const_iterator item_iter = tab->second.begin(); item_iter != tab->second.end(); ++item_iter)
{
if (roll_chance_f(item_iter->chance * sWorld.getRate(RATE_SKILL_DISCOVERY)) &&
item_iter->reqSkillValue <= skillvalue &&
diff --git a/src/game/SkillHandler.cpp b/src/game/SkillHandler.cpp
index e8ee75ab86b..22bbbcf8e3d 100644
--- a/src/game/SkillHandler.cpp
+++ b/src/game/SkillHandler.cpp
@@ -46,7 +46,7 @@ void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket)
uint32 talentId, talentRank;
- for(uint32 i = 0; i < talentsCount; ++i)
+ for (uint32 i = 0; i < talentsCount; ++i)
{
recvPacket >> talentId >> talentRank;
diff --git a/src/game/SocialMgr.cpp b/src/game/SocialMgr.cpp
index 2331b7ad839..482f3e62dd5 100644
--- a/src/game/SocialMgr.cpp
+++ b/src/game/SocialMgr.cpp
@@ -43,7 +43,7 @@ PlayerSocial::~PlayerSocial()
uint32 PlayerSocial::GetNumberOfSocialsWithFlag(SocialFlag flag)
{
uint32 counter = 0;
- for(PlayerSocialMap::const_iterator itr = m_playerSocialMap.begin(); itr != m_playerSocialMap.end(); ++itr)
+ for (PlayerSocialMap::const_iterator itr = m_playerSocialMap.begin(); itr != m_playerSocialMap.end(); ++itr)
{
if(itr->second.Flags & flag)
++counter;
@@ -132,7 +132,7 @@ void PlayerSocial::SendSocialList()
data << uint32(7); // unk flag (0x1, 0x2, 0x4), 0x7 if it include ignore list
data << uint32(size); // friends count
- for(PlayerSocialMap::iterator itr = m_playerSocialMap.begin(); itr != m_playerSocialMap.end(); ++itr)
+ for (PlayerSocialMap::iterator itr = m_playerSocialMap.begin(); itr != m_playerSocialMap.end(); ++itr)
{
sSocialMgr.GetFriendInfo(plr, itr->first, itr->second);
@@ -276,7 +276,7 @@ void SocialMgr::BroadcastToFriendListers(Player *player, WorldPacket *packet)
AccountTypes gmLevelInWhoList = AccountTypes(sWorld.getConfig(CONFIG_GM_LEVEL_IN_WHO_LIST));
bool allowTwoSideWhoList = sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_WHO_LIST);
- for(SocialMap::const_iterator itr = m_socialMap.begin(); itr != m_socialMap.end(); ++itr)
+ for (SocialMap::const_iterator itr = m_socialMap.begin(); itr != m_socialMap.end(); ++itr)
{
PlayerSocialMap::const_iterator itr2 = itr->second.m_playerSocialMap.find(guid);
if(itr2 != itr->second.m_playerSocialMap.end() && (itr2->second.Flags & SOCIAL_FLAG_FRIEND))
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index cb0236967ab..14d142e680b 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -426,7 +426,7 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 origi
if(m_originalCaster && !m_originalCaster->IsInWorld()) m_originalCaster = NULL;
}
- for(int i=0; i <3; ++i)
+ for (int i=0; i <3; ++i)
m_currentBasePoints[i] = m_spellValue->EffectBasePoints[i];
m_spellState = SPELL_STATE_NULL;
@@ -462,7 +462,7 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 origi
if(m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MAGIC && !IsAreaOfEffectSpell(m_spellInfo) && !(m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_CANT_REFLECTED))
{
- for(int j = 0;j < 3; ++j)
+ for (int j = 0; j < 3; ++j)
{
if (m_spellInfo->Effect[j] == 0)
continue;
@@ -520,7 +520,7 @@ WorldObject* Spell::FindCorpseUsing()
void Spell::SelectSpellTargets()
{
- for(uint32 i = 0; i < 3; ++i)
+ for (uint32 i = 0; i < 3; ++i)
{
// not call for empty effect.
// Also some spells use not used effect targets for store targets for dummy effect in triggered spells
@@ -713,7 +713,7 @@ void Spell::SelectSpellTargets()
if(IsChanneledSpell(m_spellInfo))
{
uint8 mask = (1<<i);
- for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
+ for (std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
{
if(ihit->effectMask & mask)
{
@@ -725,7 +725,7 @@ void Spell::SelectSpellTargets()
else if (m_auraScaleMask)
{
bool checkLvl = !m_UniqueTargetInfo.empty();
- for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end();)
+ for (std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); )
{
// remove targets which did not pass min level check
if(m_auraScaleMask && ihit->effectMask == m_auraScaleMask)
@@ -793,7 +793,7 @@ void Spell::prepareDataForTriggerSystem(AuraEffect * triggeredByAura)
}
break;
default:
- if (m_spellInfo->EquippedItemClass == ITEM_CLASS_WEAPON &&
+ if (m_spellInfo->EquippedItemClass == ITEM_CLASS_WEAPON &&
m_spellInfo->EquippedItemSubClassMask & (1<<ITEM_SUBCLASS_WEAPON_WAND)
&& m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_AUTOREPEAT_FLAG) // Wands auto attack
{
@@ -826,7 +826,7 @@ void Spell::prepareDataForTriggerSystem(AuraEffect * triggeredByAura)
// Ranged autorepeat attack is set as triggered spell - ignore it
if (!(m_procAttacker & PROC_FLAG_SUCCESSFUL_RANGED_HIT))
{
- if (m_IsTriggeredSpell &&
+ if (m_IsTriggeredSpell &&
(m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_TRIGGERED_CAN_TRIGGER ||
m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_TRIGGERED_CAN_TRIGGER_2))
m_procEx |= PROC_EX_INTERNAL_CANT_PROC;
@@ -862,7 +862,7 @@ void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex)
uint64 targetGUID = pVictim->GetGUID();
// Lookup target in already in list
- for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
+ for (std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
{
if (targetGUID == ihit->targetGUID) // Found in list
{
@@ -958,7 +958,7 @@ void Spell::AddGOTarget(GameObject* pVictim, uint32 effIndex)
uint64 targetGUID = pVictim->GetGUID();
// Lookup target in already in list
- for(std::list<GOTargetInfo>::iterator ihit = m_UniqueGOTargetInfo.begin(); ihit != m_UniqueGOTargetInfo.end(); ++ihit)
+ for (std::list<GOTargetInfo>::iterator ihit = m_UniqueGOTargetInfo.begin(); ihit != m_UniqueGOTargetInfo.end(); ++ihit)
{
if (targetGUID == ihit->targetGUID) // Found in list
{
@@ -1004,7 +1004,7 @@ void Spell::AddItemTarget(Item* pitem, uint32 effIndex)
return;
// Lookup target in already in list
- for(std::list<ItemTargetInfo>::iterator ihit = m_UniqueItemInfo.begin(); ihit != m_UniqueItemInfo.end(); ++ihit)
+ for (std::list<ItemTargetInfo>::iterator ihit = m_UniqueItemInfo.begin(); ihit != m_UniqueItemInfo.end(); ++ihit)
{
if (pitem == ihit->item) // Found in list
{
@@ -1023,7 +1023,7 @@ void Spell::AddItemTarget(Item* pitem, uint32 effIndex)
void Spell::DoAllEffectOnTarget(TargetInfo *target)
{
- if (target->processed) // Check target
+ if (!target || target->processed) // Check target
return;
target->processed = true; // Target checked in apply effects procedure
@@ -1233,7 +1233,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
// Needs to be called after dealing damage/healing to not remove breaking on damage auras
DoTriggersOnSpellHit(spellHitTarget);
-
+
// if target is fallged for pvp also flag caster if a player
if(unit->IsPvP())
{
@@ -1394,7 +1394,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
}
}
- for(uint32 effectNumber = 0; effectNumber < 3; ++effectNumber)
+ for (uint32 effectNumber = 0; effectNumber < 3; ++effectNumber)
{
if (effectMask & (1<<effectNumber))
HandleEffects(unit,NULL,NULL,effectNumber);
@@ -1425,7 +1425,7 @@ void Spell::DoTriggersOnSpellHit(Unit *unit)
if (m_ChanceTriggerSpells.size() && (!((m_spellInfo->AttributesEx4 & SPELL_ATTR_EX4_CANT_PROC_FROM_SELFCAST) && unit==m_caster)))
{
int _duration=0;
- for(ChanceTriggerSpells::const_iterator i = m_ChanceTriggerSpells.begin(); i != m_ChanceTriggerSpells.end(); ++i)
+ for (ChanceTriggerSpells::const_iterator i = m_ChanceTriggerSpells.begin(); i != m_ChanceTriggerSpells.end(); ++i)
{
// SPELL_AURA_ADD_TARGET_TRIGGER auras shouldn't trigger auras without duration
// set duration equal to triggering spell
@@ -1454,7 +1454,7 @@ void Spell::DoTriggersOnSpellHit(Unit *unit)
if(m_customAttr & SPELL_ATTR_CU_LINK_HIT)
{
if(const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(m_spellInfo->Id + SPELL_LINK_HIT))
- for(std::vector<int32>::const_iterator i = spell_triggered->begin(); i != spell_triggered->end(); ++i)
+ for (std::vector<int32>::const_iterator i = spell_triggered->begin(); i != spell_triggered->end(); ++i)
if(*i < 0)
unit->RemoveAurasDueToSpell(-(*i));
else
@@ -1476,7 +1476,7 @@ void Spell::DoAllEffectOnTarget(GOTargetInfo *target)
if(!go)
return;
- for(uint32 effectNumber = 0; effectNumber < 3; ++effectNumber)
+ for (uint32 effectNumber = 0; effectNumber < 3; ++effectNumber)
if (effectMask & (1 << effectNumber))
HandleEffects(NULL, NULL, go, effectNumber);
@@ -1495,7 +1495,7 @@ void Spell::DoAllEffectOnTarget(ItemTargetInfo *target)
if(!target->item || !effectMask)
return;
- for(uint32 effectNumber = 0; effectNumber < 3; ++effectNumber)
+ for (uint32 effectNumber = 0; effectNumber < 3; ++effectNumber)
if (effectMask & (1 << effectNumber))
HandleEffects(NULL, target->item, NULL, effectNumber);
}
@@ -1522,7 +1522,7 @@ bool Spell::UpdateChanneledTargetList()
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, range, this);
}
- for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
+ for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
{
if( ihit->missCondition == SPELL_MISS_NONE && (needAliveTargetMask & ihit->effectMask) )
{
@@ -1607,7 +1607,7 @@ void Spell::SearchChainTarget(std::list<Unit*> &TagUnitMap, float max_range, uin
// Get spell max affected targets
/*uint32 unMaxTargets = m_spellInfo->MaxAffectedTargets;
Unit::AuraList const& mod = m_caster->GetAurasByType(SPELL_AURA_MOD_MAX_AFFECTED_TARGETS);
- for(Unit::AuraList::const_iterator m = mod.begin(); m != mod.end(); ++m)
+ for (Unit::AuraList::const_iterator m = mod.begin(); m != mod.end(); ++m)
{
if (!(*m)->isAffectedOnSpell(m_spellInfo))
continue;
@@ -1733,12 +1733,12 @@ WorldObject* Spell::SearchNearbyTarget(float range, SpellTargets TargetType)
Creature* creatureScriptTarget = NULL;
GameObject* goScriptTarget = NULL;
- for(SpellScriptTarget::const_iterator i_spellST = bounds.first; i_spellST != bounds.second; ++i_spellST)
+ for (SpellScriptTarget::const_iterator i_spellST = bounds.first; i_spellST != bounds.second; ++i_spellST)
{
switch(i_spellST->second.type)
{
case SPELL_TARGET_TYPE_CONTROLLED:
- for(Unit::ControlList::iterator itr = m_caster->m_Controlled.begin(); itr != m_caster->m_Controlled.end(); ++itr)
+ for (Unit::ControlList::iterator itr = m_caster->m_Controlled.begin(); itr != m_caster->m_Controlled.end(); ++itr)
if ((*itr)->GetEntry() == i_spellST->second.targetEntry && (*itr)->IsWithinDistInMap(m_caster, range))
{
goScriptTarget = NULL;
@@ -1958,7 +1958,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
else
pushType = PUSH_IN_FRONT;
break;
-
+
case TARGET_TYPE_DEST_CASTER: //4+8+2
{
if(cur == TARGET_SRC_CASTER)
@@ -2219,8 +2219,8 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
SearchChainTarget(unitList, range, maxTargets, SPELL_TARGETS_CHAINHEAL);
break;
}
-
- for(std::list<Unit*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
+
+ for (std::list<Unit*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
AddUnitTarget(*itr, i);
}
else
@@ -2299,7 +2299,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
// Search for ghoul if our ghoul or dead body not valid unit target
if (!(m_targets.getUnitTarget() && (m_targets.getUnitTarget()->GetEntry() == 26125 && m_targets.getUnitTarget()->GetOwnerGUID() == m_caster->GetGUID()
|| (m_targets.getUnitTarget()->getDeathState() == CORPSE
- && m_targets.getUnitTarget()->GetDisplayId() == m_targets.getUnitTarget()->GetNativeDisplayId()
+ && m_targets.getUnitTarget()->GetDisplayId() == m_targets.getUnitTarget()->GetNativeDisplayId()
&& m_targets.getUnitTarget()->GetTypeId()== TYPEID_UNIT
&& !((Creature*)m_targets.getUnitTarget())->isDeadByDefault()
&& !(m_targets.getUnitTarget()->GetCreatureTypeMask() & CREATURE_TYPEMASK_MECHANICAL_OR_ELEMENTAL))
@@ -2343,14 +2343,14 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
// let it be done in one check?
else
{
- for(SpellScriptTarget::const_iterator i_spellST = bounds.first; i_spellST != bounds.second; ++i_spellST)
+ for (SpellScriptTarget::const_iterator i_spellST = bounds.first; i_spellST != bounds.second; ++i_spellST)
{
if(i_spellST->second.type == SPELL_TARGET_TYPE_CREATURE)
SearchAreaTarget(unitList, radius, pushType, SPELL_TARGETS_ENTRY, i_spellST->second.targetEntry);
else if (i_spellST->second.type == SPELL_TARGET_TYPE_CONTROLLED)
{
- for(Unit::ControlList::iterator itr = m_caster->m_Controlled.begin(); itr != m_caster->m_Controlled.end(); ++itr)
- if ((*itr)->GetEntry() == i_spellST->second.targetEntry &&
+ for (Unit::ControlList::iterator itr = m_caster->m_Controlled.begin(); itr != m_caster->m_Controlled.end(); ++itr)
+ if ((*itr)->GetEntry() == i_spellST->second.targetEntry &&
/*(*itr)->IsWithinDistInMap(m_caster, radius)*/ (*itr)->IsInMap(m_caster)) // For 60243 and 52173 need skip radius check or use range (no radius entry for effect)
unitList.push_back(*itr);
}
@@ -2390,7 +2390,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
std::list<GameObject*> goList;
Trinity::GameObjectListSearcher<Trinity::GameObjectInRangeCheck> searcher(m_caster, goList, check);
m_caster->GetMap()->VisitGrid(x, y, radius, searcher);
- for(std::list<GameObject*>::iterator itr = goList.begin(); itr != goList.end(); ++itr)
+ for (std::list<GameObject*>::iterator itr = goList.begin(); itr != goList.end(); ++itr)
AddGOTarget(*itr, i);
break;
}
@@ -2411,7 +2411,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
Group* pGroup = targetPlayer ? targetPlayer->GetGroup() : NULL;
if(pGroup)
{
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* Target = itr->getSource();
@@ -2436,7 +2436,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
if(uint32 maxTargets = m_spellValue->MaxAffectedTargets)
{
Unit::AuraEffectList const& Auras = m_caster->GetAurasByType(SPELL_AURA_MOD_MAX_AFFECTED_TARGETS);
- for(Unit::AuraEffectList::const_iterator j = Auras.begin();j != Auras.end(); ++j)
+ for (Unit::AuraEffectList::const_iterator j = Auras.begin(); j != Auras.end(); ++j)
if((*j)->isAffectedOnSpell(m_spellInfo))
maxTargets += (*j)->GetAmount();
@@ -2459,7 +2459,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
{
typedef std::priority_queue<PrioritizeManaUnitWraper, std::vector<PrioritizeManaUnitWraper>, PrioritizeMana> TopMana;
TopMana manaUsers;
- for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();++itr)
+ for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end(); ++itr)
{
if ((*itr)->getPowerType() == POWER_MANA)
{
@@ -2480,7 +2480,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
{
typedef std::priority_queue<PrioritizeHealthUnitWraper, std::vector<PrioritizeHealthUnitWraper>, PrioritizeHealth> TopHealth;
TopHealth healedMembers;
- for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();++itr)
+ for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end(); ++itr)
{
PrioritizeHealthUnitWraper WTarget(*itr);
healedMembers.push(WTarget);
@@ -2500,7 +2500,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
{
typedef std::priority_queue<PrioritizeHealthUnitWraper, std::vector<PrioritizeHealthUnitWraper>, PrioritizeHealth> TopHealth;
TopHealth healedMembers;
- for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();++itr)
+ for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end(); ++itr)
{
if ((*itr)->IsInRaidWith(m_targets.getUnitTarget()))
{
@@ -2525,7 +2525,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && m_spellInfo->SpellFamilyFlags[0] & 0x00080000)
{
Unit * unit_to_add = NULL;
- for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();++itr)
+ for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end(); ++itr)
{
if ((*itr)->GetTypeId() == TYPEID_UNIT
&& (*itr)->GetOwnerGUID() == m_caster->GetGUID()
@@ -2550,7 +2550,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
}
}
}
- for(std::list<Unit*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
+ for (std::list<Unit*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
AddUnitTarget(*itr, i);
}
}
@@ -2701,7 +2701,7 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect* triggeredByAura
if(!m_IsTriggeredSpell && isSpellBreakStealth(m_spellInfo) )
{
m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CAST);
- for(uint32 i = 0; i < 3; ++i)
+ for (uint32 i = 0; i < 3; ++i)
{
if(EffectTargetType[m_spellInfo->Effect[i]] == SPELL_REQUIRE_UNIT)
{
@@ -2745,7 +2745,7 @@ void Spell::cancel()
case SPELL_STATE_CASTING:
{
- for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
+ for (std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
if(ihit->missCondition == SPELL_MISS_NONE)
if(Unit* unit = m_caster->GetGUID() == ihit->targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, ihit->targetGUID))
if(unit->isAlive())
@@ -2784,7 +2784,7 @@ void Spell::cast(bool skipCheck)
if(Unit *target = m_targets.getUnitTarget())
{
// three check: prepare, cast (m_casttime > 0), hit (delayed)
- if(m_casttime && target->isAlive()
+ if(m_casttime && target->isAlive()
&& (target->m_invisibilityMask || m_caster->m_invisibilityMask
|| target->GetVisibility() == VISIBILITY_GROUP_STEALTH)
&& !target->IsFriendlyTo(m_caster) && !m_caster->canSeeOrDetect(target, true))
@@ -2897,7 +2897,7 @@ void Spell::cast(bool skipCheck)
// are there any spells need to be triggered after hit?
// handle SPELL_AURA_ADD_TARGET_TRIGGER auras
Unit::AuraEffectList const& targetTriggers = m_caster->GetAurasByType(SPELL_AURA_ADD_TARGET_TRIGGER);
- for(Unit::AuraEffectList::const_iterator i = targetTriggers.begin(); i != targetTriggers.end(); ++i)
+ for (Unit::AuraEffectList::const_iterator i = targetTriggers.begin(); i != targetTriggers.end(); ++i)
{
if (!(*i)->isAffectedOnSpell(m_spellInfo))
continue;
@@ -2921,7 +2921,7 @@ void Spell::cast(bool skipCheck)
if(m_customAttr & SPELL_ATTR_CU_CHARGE)
{
- for(uint32 i = 0; i < 3; ++i)
+ for (uint32 i = 0; i < 3; ++i)
{
switch(m_spellInfo->Effect[i])
{
@@ -2960,7 +2960,7 @@ void Spell::cast(bool skipCheck)
if(m_customAttr & SPELL_ATTR_CU_LINK_CAST)
{
if(const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(m_spellInfo->Id))
- for(std::vector<int32>::const_iterator i = spell_triggered->begin(); i != spell_triggered->end(); ++i)
+ for (std::vector<int32>::const_iterator i = spell_triggered->begin(); i != spell_triggered->end(); ++i)
if(*i < 0)
m_caster->RemoveAurasDueToSpell(-(*i));
else
@@ -2995,10 +2995,10 @@ void Spell::handle_immediate()
// process immediate effects (items, ground, etc.) also initialize some variables
_handle_immediate_phase();
- for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
+ for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
DoAllEffectOnTarget(&(*ihit));
- for(std::list<GOTargetInfo>::iterator ihit= m_UniqueGOTargetInfo.begin();ihit != m_UniqueGOTargetInfo.end();++ihit)
+ for (std::list<GOTargetInfo>::iterator ihit= m_UniqueGOTargetInfo.begin(); ihit != m_UniqueGOTargetInfo.end(); ++ihit)
DoAllEffectOnTarget(&(*ihit));
// spell is finished, perform some last features of the spell here
@@ -3029,7 +3029,7 @@ uint64 Spell::handle_delayed(uint64 t_offset)
bool single_missile = (m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION);
// now recheck units targeting correctness (need before any effects apply to prevent adding immunity at first effect not allow apply second spell effect and similar cases)
- for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end();++ihit)
+ for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
{
if (ihit->processed == false)
{
@@ -3041,7 +3041,7 @@ uint64 Spell::handle_delayed(uint64 t_offset)
}
// now recheck gameobject targeting correctness
- for(std::list<GOTargetInfo>::iterator ighit= m_UniqueGOTargetInfo.begin(); ighit != m_UniqueGOTargetInfo.end();++ighit)
+ for (std::list<GOTargetInfo>::iterator ighit= m_UniqueGOTargetInfo.begin(); ighit != m_UniqueGOTargetInfo.end(); ++ighit)
{
if (ighit->processed == false)
{
@@ -3079,7 +3079,7 @@ void Spell::_handle_immediate_phase()
HandleThreatSpells(m_spellInfo->Id);
m_needSpellLog = IsNeedSendToClient();
- for(uint32 j = 0; j < 3; ++j)
+ for (uint32 j = 0; j < 3; ++j)
{
if(m_spellInfo->Effect[j] == 0)
continue;
@@ -3101,14 +3101,14 @@ void Spell::_handle_immediate_phase()
m_diminishGroup = DIMINISHING_NONE;
// process items
- for(std::list<ItemTargetInfo>::iterator ihit= m_UniqueItemInfo.begin();ihit != m_UniqueItemInfo.end();++ihit)
+ for (std::list<ItemTargetInfo>::iterator ihit= m_UniqueItemInfo.begin(); ihit != m_UniqueItemInfo.end(); ++ihit)
DoAllEffectOnTarget(&(*ihit));
if(!m_originalCaster)
return;
uint8 oldEffMask = m_effectMask;
// process ground
- for(uint32 j = 0; j < 3; ++j)
+ for (uint32 j = 0; j < 3; ++j)
{
if(EffectTargetType[m_spellInfo->Effect[j]] == SPELL_REQUIRE_DEST)
{
@@ -3263,7 +3263,7 @@ void Spell::update(uint32 difftime)
{
if ( Player* p = m_caster->GetCharmerOrOwnerPlayerOrPlayerItself() )
{
- for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
+ for (std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
{
TargetInfo* target = &*ihit;
if(!IS_CRE_OR_VEH_GUID(target->targetGUID))
@@ -3276,7 +3276,7 @@ void Spell::update(uint32 difftime)
p->CastedCreatureOrGO(unit->GetEntry(), unit->GetGUID(), m_spellInfo->Id);
}
- for(std::list<GOTargetInfo>::iterator ihit = m_UniqueGOTargetInfo.begin(); ihit != m_UniqueGOTargetInfo.end(); ++ihit)
+ for (std::list<GOTargetInfo>::iterator ihit = m_UniqueGOTargetInfo.begin(); ihit != m_UniqueGOTargetInfo.end(); ++ihit)
{
GOTargetInfo* target = &*ihit;
@@ -3509,7 +3509,7 @@ void Spell::SendSpellGo()
// triggered spells with spell visual != 0
if((m_IsTriggeredSpell && !IsAutoRepeatRangedSpell(m_spellInfo)) || m_triggeredByAuraSpell)
- castFlags |= CAST_FLAG_UNKNOWN0;
+ castFlags |= CAST_FLAG_UNKNOWN0;
if(m_spellInfo->Attributes & SPELL_ATTR_REQ_AMMO)
castFlags |= CAST_FLAG_AMMO; // arrows/bullets visual
@@ -3550,7 +3550,7 @@ void Spell::SendSpellGo()
uint8 v2 = ((Player*)m_caster)->GetRunesState();
data << uint8(v1); // runes state before
data << uint8(v2); // runes state after
- for(uint8 i = 0; i < MAX_RUNES; ++i)
+ for (uint8 i = 0; i < MAX_RUNES; ++i)
{
uint8 m = (1 << i);
if(m & v1) // usable before...
@@ -3660,7 +3660,7 @@ void Spell::WriteSpellGoTargets( WorldPacket * data )
// m_needAliveTargetMask req for stop channelig if one target die
uint32 hit = m_UniqueGOTargetInfo.size(); // Always hits on GO
uint32 miss = 0;
- for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
+ for (std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
{
if ((*ihit).effectMask == 0) // No effect apply - all immuned add state
{
@@ -3675,7 +3675,7 @@ void Spell::WriteSpellGoTargets( WorldPacket * data )
}
*data << (uint8)hit;
- for(std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
+ for (std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
{
if ((*ihit).missCondition == SPELL_MISS_NONE) // Add only hits
{
@@ -3684,11 +3684,11 @@ void Spell::WriteSpellGoTargets( WorldPacket * data )
}
}
- for(std::list<GOTargetInfo>::const_iterator ighit = m_UniqueGOTargetInfo.begin(); ighit != m_UniqueGOTargetInfo.end(); ++ighit)
+ for (std::list<GOTargetInfo>::const_iterator ighit = m_UniqueGOTargetInfo.begin(); ighit != m_UniqueGOTargetInfo.end(); ++ighit)
*data << uint64(ighit->targetGUID); // Always hits
*data << (uint8)miss;
- for(std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
+ for (std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
{
if( ihit->missCondition != SPELL_MISS_NONE ) // Add only miss
{
@@ -3717,12 +3717,12 @@ void Spell::SendLogExecute()
data << uint32(m_spellInfo->Id);
uint32 count1 = 1;
data << uint32(count1); // count1 (effect count?)
- for(uint32 i = 0; i < count1; ++i)
+ for (uint32 i = 0; i < count1; ++i)
{
data << uint32(m_spellInfo->Effect[0]); // spell effect
uint32 count2 = 1;
data << uint32(count2); // count2 (target count?)
- for(uint32 j = 0; j < count2; ++j)
+ for (uint32 j = 0; j < count2; ++j)
{
switch(m_spellInfo->Effect[0])
{
@@ -3740,7 +3740,7 @@ void Spell::SendLogExecute()
data.append(unit->GetPackGUID());
else
data << uint8(0);
- data << uint32(m_caster->m_extraAttacks);
+ data << uint32(m_caster->m_extraAttacks);
break;
case SPELL_EFFECT_INTERRUPT_CAST:
if(Unit *unit = m_targets.getUnitTarget())
@@ -3853,7 +3853,7 @@ void Spell::SendChannelStart(uint32 duration)
// select first not resisted target from target list for _0_ effect
if(!m_UniqueTargetInfo.empty())
{
- for(std::list<TargetInfo>::const_iterator itr = m_UniqueTargetInfo.begin(); itr != m_UniqueTargetInfo.end(); ++itr)
+ for (std::list<TargetInfo>::const_iterator itr = m_UniqueTargetInfo.begin(); itr != m_UniqueTargetInfo.end(); ++itr)
{
if( (itr->effectMask & (1 << 0)) && itr->reflectResult == SPELL_MISS_NONE && itr->targetGUID != m_caster->GetGUID())
{
@@ -3864,7 +3864,7 @@ void Spell::SendChannelStart(uint32 duration)
}
else if(!m_UniqueGOTargetInfo.empty())
{
- for(std::list<GOTargetInfo>::const_iterator itr = m_UniqueGOTargetInfo.begin(); itr != m_UniqueGOTargetInfo.end(); ++itr)
+ for (std::list<GOTargetInfo>::const_iterator itr = m_UniqueGOTargetInfo.begin(); itr != m_UniqueGOTargetInfo.end(); ++itr)
{
if(itr->effectMask & (1 << 0) )
{
@@ -3988,7 +3988,7 @@ void Spell::TakePower()
{
if(m_spellInfo->powerType == POWER_RAGE || m_spellInfo->powerType == POWER_ENERGY)
if(uint64 targetGUID = m_targets.getUnitTargetGUID())
- for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
+ for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
if(ihit->targetGUID == targetGUID)
{
if(ihit->missCondition != SPELL_MISS_NONE && ihit->missCondition != SPELL_MISS_MISS/* && ihit->targetGUID!=m_caster->GetGUID()*/)
@@ -4089,19 +4089,19 @@ SpellCastResult Spell::CheckRuneCost(uint32 runeCostID)
int32 runeCost[NUM_RUNE_TYPES]; // blood, frost, unholy, death
- for(uint32 i = 0; i < RUNE_DEATH; ++i)
+ for (uint32 i = 0; i < RUNE_DEATH; ++i)
runeCost[i] = src->RuneCost[i];
runeCost[RUNE_DEATH] = MAX_RUNES; // calculated later
- for(uint32 i = 0; i < MAX_RUNES; ++i)
+ for (uint32 i = 0; i < MAX_RUNES; ++i)
{
RuneType rune = plr->GetCurrentRune(i);
if((plr->GetRuneCooldown(i) == 0) && (runeCost[rune] > 0))
runeCost[rune]--;
}
- for(uint32 i = 0; i < RUNE_DEATH; ++i)
+ for (uint32 i = 0; i < RUNE_DEATH; ++i)
if(runeCost[i] > 0)
runeCost[RUNE_DEATH] += runeCost[i];
@@ -4129,14 +4129,14 @@ void Spell::TakeRunePower()
int32 runeCost[NUM_RUNE_TYPES]; // blood, frost, unholy, death
- for(uint32 i = 0; i < RUNE_DEATH; ++i)
+ for (uint32 i = 0; i < RUNE_DEATH; ++i)
{
runeCost[i] = src->RuneCost[i];
}
runeCost[RUNE_DEATH] = 0; // calculated later
- for(uint32 i = 0; i < MAX_RUNES; ++i)
+ for (uint32 i = 0; i < MAX_RUNES; ++i)
{
RuneType rune = plr->GetCurrentRune(i);
if((plr->GetRuneCooldown(i) == 0) && (runeCost[rune] > 0))
@@ -4151,7 +4151,7 @@ void Spell::TakeRunePower()
if(runeCost[RUNE_DEATH] > 0)
{
- for(uint32 i = 0; i < MAX_RUNES; ++i)
+ for (uint32 i = 0; i < MAX_RUNES; ++i)
{
RuneType rune = plr->GetCurrentRune(i);
if((plr->GetRuneCooldown(i) == 0) && (rune == RUNE_DEATH))
@@ -4167,7 +4167,7 @@ void Spell::TakeRunePower()
// Remove rune from SPELL_AURA_CONVERT_RUNE when rune is used
// To prevent overriding other rune convert effects
Unit::AuraEffectList const& runeconvert = m_caster->GetAurasByType(SPELL_AURA_CONVERT_RUNE);
- for(Unit::AuraEffectList::const_iterator itr = runeconvert.begin(); itr != runeconvert.end(); ++itr)
+ for (Unit::AuraEffectList::const_iterator itr = runeconvert.begin(); itr != runeconvert.end(); ++itr)
{
// Remove rune of aura if avalible
if ((*itr)->GetAmount() & (1<<i))
@@ -4185,7 +4185,7 @@ void Spell::TakeRunePower()
// Decrease used rune count for dk talent auras
// To prevent overriding other rune convert effects
Unit::AuraEffectList const& runeconvert = m_caster->GetAurasByType(SPELL_AURA_CONVERT_RUNE);
- for(Unit::AuraEffectList::const_iterator itr = runeconvert.begin(); itr != runeconvert.end(); ++itr)
+ for (Unit::AuraEffectList::const_iterator itr = runeconvert.begin(); itr != runeconvert.end(); ++itr)
{
if (plr->GetBaseRune(i) != RUNE_DEATH)
{
@@ -4195,7 +4195,7 @@ void Spell::TakeRunePower()
}
// Blood of the North
// Reaping
- else if ((*itr)->GetSpellProto()->SpellIconID != 3041 &&
+ else if ((*itr)->GetSpellProto()->SpellIconID != 3041 &&
(*itr)->GetSpellProto()->SpellIconID != 22)
continue;
@@ -4234,7 +4234,7 @@ void Spell::TakeReagents()
if (p_caster->CanNoReagentCast(m_spellInfo))
return;
- for(uint32 x = 0; x < 8; ++x)
+ for (uint32 x = 0; x < 8; ++x)
{
if(m_spellInfo->Reagent[x] <= 0)
continue;
@@ -4248,7 +4248,7 @@ void Spell::TakeReagents()
ItemPrototype const *proto = m_CastItem->GetProto();
if( proto && proto->ItemId == itemid )
{
- for(int s = 0; s < MAX_ITEM_PROTO_SPELLS; ++s)
+ for (int s = 0; s < MAX_ITEM_PROTO_SPELLS; ++s)
{
// CastItem will be used up and does not count as reagent
int32 charges = m_CastItem->GetSpellCharges(s);
@@ -4319,7 +4319,7 @@ void Spell::HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTar
void Spell::TriggerSpell()
{
- for(TriggerSpells::iterator si=m_TriggerSpells.begin(); si!=m_TriggerSpells.end(); ++si)
+ for (TriggerSpells::iterator si=m_TriggerSpells.begin(); si!=m_TriggerSpells.end(); ++si)
{
Spell* spell = new Spell(m_caster, (*si), true, m_originalCasterGUID, m_selfContainer, true);
spell->prepare(&m_targets); // use original spell original targets
@@ -4357,7 +4357,7 @@ SpellCastResult Spell::CheckCast(bool strict)
bool checkForm = true;
// Ignore form req aura
Unit::AuraEffectList const& ignore = m_caster->GetAurasByType(SPELL_AURA_MOD_IGNORE_SHAPESHIFT);
- for(Unit::AuraEffectList::const_iterator i = ignore.begin(); i != ignore.end(); ++i)
+ for (Unit::AuraEffectList::const_iterator i = ignore.begin(); i != ignore.end(); ++i)
{
if (!(*i)->isAffectedOnSpell(m_spellInfo))
continue;
@@ -4378,7 +4378,7 @@ SpellCastResult Spell::CheckCast(bool strict)
bool reqCombat=true;
Unit::AuraEffectList const& stateAuras = m_caster->GetAurasByType(SPELL_AURA_ABILITY_IGNORE_AURASTATE);
- for(Unit::AuraEffectList::const_iterator j = stateAuras.begin();j != stateAuras.end(); ++j)
+ for (Unit::AuraEffectList::const_iterator j = stateAuras.begin(); j != stateAuras.end(); ++j)
{
if((*j)->isAffectedOnSpell(m_spellInfo))
{
@@ -4390,7 +4390,7 @@ SpellCastResult Spell::CheckCast(bool strict)
}
}
- // caster state requirements
+ // caster state requirements
// not for triggered spells (needed by execute)
if (!m_IsTriggeredSpell)
{
@@ -4470,7 +4470,7 @@ SpellCastResult Spell::CheckCast(bool strict)
}
// check pet presents
- for(int j = 0; j < 3; ++j)
+ for (int j = 0; j < 3; ++j)
{
if(m_spellInfo->EffectImplicitTargetA[j] == TARGET_UNIT_PET)
{
@@ -4595,7 +4595,7 @@ SpellCastResult Spell::CheckCast(bool strict)
/*//ImpliciteTargetA-B = 38, If fact there is 0 Spell with ImpliciteTargetB=38
if(m_UniqueTargetInfo.empty()) // skip second CheckCast apply (for delayed spells for example)
{
- for(uint8 j = 0; j < 3; ++j)
+ for (uint8 j = 0; j < 3; ++j)
{
if( m_spellInfo->EffectImplicitTargetA[j] == TARGET_UNIT_NEARBY_ENTRY ||
m_spellInfo->EffectImplicitTargetB[j] == TARGET_UNIT_NEARBY_ENTRY && m_spellInfo->EffectImplicitTargetA[j] != TARGET_UNIT_CASTER ||
@@ -4613,7 +4613,7 @@ SpellCastResult Spell::CheckCast(bool strict)
Creature* creatureScriptTarget = NULL;
GameObject* goScriptTarget = NULL;
- for(SpellScriptTarget::const_iterator i_spellST = bounds.first; i_spellST != bounds.second; ++i_spellST)
+ for (SpellScriptTarget::const_iterator i_spellST = bounds.first; i_spellST != bounds.second; ++i_spellST)
{
switch(i_spellST->second.type)
{
@@ -5231,7 +5231,7 @@ SpellCastResult Spell::CheckPetCast(Unit* target)
if(!target && m_targets.getUnitTarget())
target = m_targets.getUnitTarget();
- for(uint32 i = 0; i < 3; ++i)
+ for (uint32 i = 0; i < 3; ++i)
{
if(SpellTargetType[m_spellInfo->EffectImplicitTargetA[i]] == TARGET_TYPE_UNIT_TARGET
|| SpellTargetType[m_spellInfo->EffectImplicitTargetA[i]] == TARGET_TYPE_DEST_TARGET)
@@ -5274,7 +5274,7 @@ SpellCastResult Spell::CheckCasterAuras() const
// We use bitmasks so the loop is done only once and not on every aura check below.
if ( m_spellInfo->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY )
{
- for(int i = 0; i < 3; ++i)
+ for (int i = 0; i < 3; ++i)
{
if(m_spellInfo->EffectApplyAuraName[i] == SPELL_AURA_SCHOOL_IMMUNITY)
school_immune |= uint32(m_spellInfo->EffectMiscValue[i]);
@@ -5310,7 +5310,7 @@ SpellCastResult Spell::CheckCasterAuras() const
{
//Checking auras is needed now, because you are prevented by some state but the spell grants immunity.
Unit::AuraMap const& auras = m_caster->GetAuras();
- for(Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
+ for (Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
{
if(itr->second)
{
@@ -5323,7 +5323,7 @@ SpellCastResult Spell::CheckCasterAuras() const
//Make a second check for spell failed so the right SPELL_FAILED message is returned.
//That is needed when your casting is prevented by multiple states and you are only immune to some of them.
- for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i)
+ for (uint8 i=0; i<MAX_SPELL_EFFECTS; ++i)
{
if (AuraEffect * part = itr->second->GetPartAura(i))
{
@@ -5367,7 +5367,7 @@ bool Spell::CanAutoCast(Unit* target)
{
uint64 targetguid = target->GetGUID();
- for(uint32 j = 0; j < 3; ++j)
+ for (uint32 j = 0; j < 3; ++j)
{
if(m_spellInfo->Effect[j] == SPELL_EFFECT_APPLY_AURA)
{
@@ -5396,7 +5396,7 @@ bool Spell::CanAutoCast(Unit* target)
{
SelectSpellTargets();
//check if among target units, our WANTED target is as well (->only self cast spells return false)
- for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
+ for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
if( ihit->targetGUID == targetguid )
return true;
}
@@ -5481,7 +5481,7 @@ SpellCastResult Spell::CheckPower()
sLog.outError("Spell::CheckPower: Unknown power type '%d'", m_spellInfo->powerType);
return SPELL_FAILED_UNKNOWN;
}
-
+
//check rune cost only if a spell has PowerType == POWER_RUNE
if(m_spellInfo->powerType == POWER_RUNE)
{
@@ -5624,7 +5624,7 @@ SpellCastResult Spell::CheckItems()
// check reagents (ignore triggered spells with reagents processed by original spell) and special reagent ignore case.
if (!m_IsTriggeredSpell && !p_caster->CanNoReagentCast(m_spellInfo))
{
- for(uint32 i=0;i<8;i++)
+ for (uint32 i=0; i<8; i++)
{
if(m_spellInfo->Reagent[i] <= 0)
continue;
@@ -5638,7 +5638,7 @@ SpellCastResult Spell::CheckItems()
ItemPrototype const *proto = m_CastItem->GetProto();
if(!proto)
return SPELL_FAILED_ITEM_NOT_READY;
- for(int s=0; s < MAX_ITEM_PROTO_SPELLS; ++s)
+ for (int s=0; s < MAX_ITEM_PROTO_SPELLS; ++s)
{
// CastItem will be used up and does not count as reagent
int32 charges = m_CastItem->GetSpellCharges(s);
@@ -5656,7 +5656,7 @@ SpellCastResult Spell::CheckItems()
// check totem-item requirements (items presence in inventory)
uint32 totems = 2;
- for(int i = 0; i < 2 ; ++i)
+ for (int i = 0; i < 2 ; ++i)
{
if(m_spellInfo->Totem[i] != 0)
{
@@ -5673,7 +5673,7 @@ SpellCastResult Spell::CheckItems()
// Check items for TotemCategory (items presence in inventory)
uint32 TotemCategory = 2;
- for(int i= 0; i < 2; ++i)
+ for (int i= 0; i < 2; ++i)
{
if(m_spellInfo->TotemCategory[i] != 0)
{
@@ -5691,7 +5691,7 @@ SpellCastResult Spell::CheckItems()
}
// special checks for spell effects
- for(int i = 0; i < 3; i++)
+ for (int i = 0; i < 3; i++)
{
switch (m_spellInfo->Effect[i])
{
@@ -5710,7 +5710,7 @@ SpellCastResult Spell::CheckItems()
break;
}
case SPELL_EFFECT_ENCHANT_ITEM:
- if(m_spellInfo->EffectItemType[i] && m_targets.getItemTarget()
+ if(m_spellInfo->EffectItemType[i] && m_targets.getItemTarget()
&& (m_targets.getItemTarget()->IsWeaponVellum() || m_targets.getItemTarget()->IsArmorVellum()))
{
// cannot enchant vellum for other player
@@ -6015,7 +6015,7 @@ void Spell::DelayedChannel()
sLog.outDebug("Spell %u partially interrupted for %i ms, new duration: %u ms", m_spellInfo->Id, delaytime, m_timer);
- for(std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
+ for (std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
{
if ((*ihit).missCondition == SPELL_MISS_NONE)
{
@@ -6213,15 +6213,15 @@ bool Spell::IsNeedSendToClient() const
bool Spell::HaveTargetsForEffect( uint8 effect ) const
{
- for(std::list<TargetInfo>::const_iterator itr = m_UniqueTargetInfo.begin(); itr != m_UniqueTargetInfo.end(); ++itr)
+ for (std::list<TargetInfo>::const_iterator itr = m_UniqueTargetInfo.begin(); itr != m_UniqueTargetInfo.end(); ++itr)
if(itr->effectMask & (1 << effect))
return true;
- for(std::list<GOTargetInfo>::const_iterator itr = m_UniqueGOTargetInfo.begin(); itr != m_UniqueGOTargetInfo.end(); ++itr)
+ for (std::list<GOTargetInfo>::const_iterator itr = m_UniqueGOTargetInfo.begin(); itr != m_UniqueGOTargetInfo.end(); ++itr)
if(itr->effectMask & (1 << effect))
return true;
- for(std::list<ItemTargetInfo>::const_iterator itr = m_UniqueItemInfo.begin(); itr != m_UniqueItemInfo.end(); ++itr)
+ for (std::list<ItemTargetInfo>::const_iterator itr = m_UniqueItemInfo.begin(); itr != m_UniqueItemInfo.end(); ++itr)
if(itr->effectMask & (1 << effect))
return true;
@@ -6367,7 +6367,7 @@ bool Spell::IsValidSingleTargetEffect(Unit const* target, Targets type) const
bool Spell::IsValidSingleTargetSpell(Unit const* target) const
{
- for(int i = 0; i < 3; ++i)
+ for (int i = 0; i < 3; ++i)
{
if(!IsValidSingleTargetEffect(target, Targets(m_spellInfo->EffectImplicitTargetA[i])))
return false;
@@ -6381,7 +6381,7 @@ bool Spell::IsValidSingleTargetSpell(Unit const* target) const
void Spell::CalculateDamageDoneForAllTargets()
{
float multiplier[3];
- for(int i = 0; i < 3; ++i)
+ for (int i = 0; i < 3; ++i)
{
if ( m_applyMultiplierMask & (1 << i) )
{
@@ -6396,13 +6396,13 @@ void Spell::CalculateDamageDoneForAllTargets()
bool usesAmmo=true;
Unit::AuraEffectList const& Auras = m_caster->GetAurasByType(SPELL_AURA_ABILITY_CONSUME_NO_AMMO);
- for(Unit::AuraEffectList::const_iterator j = Auras.begin();j != Auras.end(); ++j)
+ for (Unit::AuraEffectList::const_iterator j = Auras.begin(); j != Auras.end(); ++j)
{
if((*j)->isAffectedOnSpell(m_spellInfo))
usesAmmo=false;
}
- for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
+ for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
{
TargetInfo &target = *ihit;
@@ -6417,7 +6417,7 @@ void Spell::CalculateDamageDoneForAllTargets()
if (usesAmmo)
{
bool ammoTaken=false;
- for (uint8 i=0;i<3;i++)
+ for (uint8 i=0; i<3; i++)
{
if (!(mask & 1<<i))
continue;
@@ -6456,7 +6456,7 @@ int32 Spell::CalculateDamageDone(Unit *unit, const uint32 effectMask, float *mul
{
int32 damageDone = 0;
unitTarget = unit;
- for(uint32 i = 0; i < 3; ++i)
+ for (uint32 i = 0; i < 3; ++i)
{
if (effectMask & (1<<i))
{
@@ -6513,7 +6513,7 @@ SpellCastResult Spell::CanOpenLock(uint32 effIndex, uint32 lockId, SkillType& sk
bool reqKey = false; // some locks not have reqs
- for(int j = 0; j < 8; ++j)
+ for (int j = 0; j < 8; ++j)
{
switch(lockInfo->Type[j])
{
@@ -6627,7 +6627,7 @@ void Spell::SelectTrajTargets()
float bestDist = GetSpellMaxRange(m_spellInfo, false);
UnitList::const_iterator itr = unitList.begin();
- for(; itr != unitList.end(); ++itr)
+ for (; itr != unitList.end(); ++itr)
{
if(m_caster == *itr || m_caster->IsOnVehicle(*itr) || (*itr)->GetVehicle())//(*itr)->IsOnVehicle(m_caster))
continue;
@@ -6732,7 +6732,7 @@ void Spell::FillRaidOrPartyTargets( UnitList &TagUnitMap, Unit* target, float ra
{
uint8 subgroup = pTarget->GetSubGroup();
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* Target = itr->getSource();
@@ -6772,7 +6772,7 @@ void Spell::FillRaidOrPartyManaPriorityTargets( UnitList &TagUnitMap, Unit* targ
FillRaidOrPartyTargets(TagUnitMap,target,radius,raid,withPets,withCaster);
PrioritizeManaUnitQueue manaUsers;
- for(UnitList::const_iterator itr = TagUnitMap.begin(); itr != TagUnitMap.end() && manaUsers.size() < count; ++itr)
+ for (UnitList::const_iterator itr = TagUnitMap.begin(); itr != TagUnitMap.end() && manaUsers.size() < count; ++itr)
if ((*itr)->getPowerType() == POWER_MANA && !(*itr)->isDead())
manaUsers.push(PrioritizeManaUnitWraper(*itr));
@@ -6789,7 +6789,7 @@ void Spell::FillRaidOrPartyHealthPriorityTargets( UnitList &TagUnitMap, Unit* ta
FillRaidOrPartyTargets(TagUnitMap,target,radius,raid,withPets,withCaster);
PrioritizeHealthUnitQueue healthQueue;
- for(UnitList::const_iterator itr = TagUnitMap.begin(); itr != TagUnitMap.end() && healthQueue.size() < count; ++itr)
+ for (UnitList::const_iterator itr = TagUnitMap.begin(); itr != TagUnitMap.end() && healthQueue.size() < count; ++itr)
if (!(*itr)->isDead())
healthQueue.push(PrioritizeHealthUnitWraper(*itr));
diff --git a/src/game/Spell.h b/src/game/Spell.h
index f045a1415e0..ecf6ed90c2a 100644
--- a/src/game/Spell.h
+++ b/src/game/Spell.h
@@ -206,7 +206,7 @@ struct SpellValue
{
explicit SpellValue(SpellEntry const *proto)
{
- for(uint32 i = 0; i < 3; ++i)
+ for (uint32 i = 0; i < 3; ++i)
EffectBasePoints[i] = proto->EffectBasePoints[i];
MaxAffectedTargets = proto->MaxAffectedTargets;
RadiusMod = 1.0f;
@@ -682,7 +682,7 @@ namespace Trinity
template<class T> inline void Visit(GridRefManager<T> &m)
{
- for(typename GridRefManager<T>::iterator itr = m.begin(); itr != m.end(); ++itr)
+ for (typename GridRefManager<T>::iterator itr = m.begin(); itr != m.end(); ++itr)
{
Unit *target = (Unit*)itr->getSource();
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 77b21f17562..799e54fccfa 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -401,7 +401,7 @@ Aura::Aura(SpellEntry const* spellproto, uint32 effMask, Unit *target, WorldObje
!(m_spellProto->AttributesEx2 & SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT) &&
!(m_spellProto->Attributes & SPELL_ATTR_NOT_SHAPESHIFT));
- for (uint8 i=0 ;i<MAX_SPELL_EFFECTS;++i)
+ for (uint8 i=0 ; i<MAX_SPELL_EFFECTS; ++i)
{
if (m_auraFlags & (uint8(1) << i))
{
@@ -422,7 +422,7 @@ Aura::Aura(SpellEntry const* spellproto, uint32 effMask, Unit *target, WorldObje
else
m_positive = !caster->IsHostileTo(m_target);
- for(uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
if((1<<i & GetEffectMask()) && m_positive == IsPositiveEffect(GetId(), i))
{
@@ -437,7 +437,7 @@ Aura::Aura(SpellEntry const* spellproto, uint32 effMask, Unit *target, WorldObje
Aura::~Aura()
{
// free part auras memory
- for (uint8 i=0 ; i<MAX_SPELL_EFFECTS;++i)
+ for (uint8 i=0 ; i<MAX_SPELL_EFFECTS; ++i)
if (m_partAuras[i])
delete m_partAuras[i];
}
@@ -753,7 +753,7 @@ void AreaAuraEffect::Update(uint32 diff)
}
}
- for(std::list<Unit*>::iterator tIter = targets.begin(); tIter != targets.end(); tIter++)
+ for (std::list<Unit*>::iterator tIter = targets.begin(); tIter != targets.end(); tIter++)
{
if(Aura *aur = (*tIter)->GetAura(GetId(), GetCasterGUID()))
{
@@ -763,7 +763,7 @@ void AreaAuraEffect::Update(uint32 diff)
else
{
bool skip = false;
- for(Unit::AuraMap::iterator iter = (*tIter)->GetAuras().begin(); iter != (*tIter)->GetAuras().end();++iter)
+ for (Unit::AuraMap::iterator iter = (*tIter)->GetAuras().begin(); iter != (*tIter)->GetAuras().end(); ++iter)
{
if(!spellmgr.CanAurasStack(GetSpellProto(), iter->second->GetSpellProto(), iter->second->GetCasterGUID() == GetCasterGUID()))
{
@@ -933,7 +933,7 @@ void AuraEffect::CleanupTriggeredSpells()
void Aura::ApplyAllModifiers(bool apply, bool Real)
{
- for (uint8 i = 0; i<MAX_SPELL_EFFECTS;++i)
+ for (uint8 i = 0; i<MAX_SPELL_EFFECTS; ++i)
if (m_partAuras[i])
m_partAuras[i]->ApplyModifier(apply, Real);
}
@@ -958,7 +958,7 @@ void Aura::HandleAuraSpecificMods(bool apply)
uint32 zone, area;
m_target->GetZoneAndAreaId(zone,area);
- for(SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
+ for (SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
{
// some auras remove at aura remove
if(!itr->second->IsFitToRequirements((Player*)m_target,zone,area))
@@ -1046,7 +1046,7 @@ void Aura::HandleAuraSpecificMods(bool apply)
caster->CastCustomSpell(m_target, 63675, &basepoints0, NULL, NULL, true, NULL, GetPartAura(0));
}
}
- // Renew
+ // Renew
else if (GetSpellProto()->SpellFamilyFlags[0] & 0x00000040 && GetPartAura(0))
{
Unit * caster = GetCaster();
@@ -1084,7 +1084,7 @@ void Aura::HandleAuraSpecificMods(bool apply)
AuraEffect * aurEff = NULL;
// Ebon Plaguebringer / Crypt Fever
Unit::AuraEffectList const& TalentAuras = caster->GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
- for(Unit::AuraEffectList::const_iterator itr = TalentAuras.begin(); itr != TalentAuras.end(); ++itr)
+ for (Unit::AuraEffectList::const_iterator itr = TalentAuras.begin(); itr != TalentAuras.end(); ++itr)
{
if ((*itr)->GetMiscValue() == 7282)
{
@@ -1191,7 +1191,7 @@ void Aura::HandleAuraSpecificMods(bool apply)
// Improved Presences
Unit::AuraEffectList const& vDummyAuras = m_target->GetAurasByType(SPELL_AURA_DUMMY);
- for(Unit::AuraEffectList::const_iterator itr = vDummyAuras.begin(); itr != vDummyAuras.end(); ++itr)
+ for (Unit::AuraEffectList::const_iterator itr = vDummyAuras.begin(); itr != vDummyAuras.end(); ++itr)
{
switch((*itr)->GetId())
{
@@ -1293,7 +1293,7 @@ void Aura::HandleAuraSpecificMods(bool apply)
// aura remove - remove auras from all party members
std::list<Unit*> PartyMembers;
m_target->GetPartyMembers(PartyMembers);
- for (std::list<Unit*>::iterator itr = PartyMembers.begin();itr!=PartyMembers.end();++itr)
+ for (std::list<Unit*>::iterator itr = PartyMembers.begin(); itr!=PartyMembers.end(); ++itr)
{
if ((*itr)!= m_target)
(*itr)->RemoveAurasWithFamily(SPELLFAMILY_WARRIOR, 0, 0x2, 0, GetCasterGUID());
@@ -1632,7 +1632,7 @@ bool Aura::IsVisible() const
return true;
bool noneAreaAura = true;
- for(uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
if(m_partAuras[i])
{
@@ -1690,7 +1690,7 @@ void Aura::_AddAura()
Unit::VisibleAuraMap const * visibleAuras= m_target->GetVisibleAuras();
// lookup for free slots in units visibleAuras
Unit::VisibleAuraMap::const_iterator itr = visibleAuras->find(0);
- for(uint32 freeSlot = 0; freeSlot < MAX_AURAS; ++itr , ++freeSlot)
+ for (uint32 freeSlot = 0; freeSlot < MAX_AURAS; ++itr , ++freeSlot)
{
if(itr == visibleAuras->end() || itr->first != freeSlot)
{
@@ -1730,7 +1730,7 @@ void Aura::_AddAura()
if(spellmgr.GetSpellCustomAttr(id) & SPELL_ATTR_CU_LINK_AURA)
{
if(const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(id + SPELL_LINK_AURA))
- for(std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
+ for (std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
{
if(*itr < 0)
m_target->ApplySpellImmune(id, IMMUNITY_ID, -(*itr), true);
@@ -1806,7 +1806,7 @@ void Aura::_RemoveAura()
if(customAttr & SPELL_ATTR_CU_LINK_REMOVE)
{
if(const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(-(int32)id))
- for(std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
+ for (std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
{
if(*itr < 0)
m_target->RemoveAurasDueToSpell(-(*itr));
@@ -1817,7 +1817,7 @@ void Aura::_RemoveAura()
if(customAttr & SPELL_ATTR_CU_LINK_AURA)
{
if(const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(id + SPELL_LINK_AURA))
- for(std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
+ for (std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
{
if(*itr < 0)
m_target->ApplySpellImmune(id, IMMUNITY_ID, -(*itr), false);
@@ -1861,7 +1861,7 @@ void Aura::SetStackAmount(uint8 stackAmount, bool applied)
if (stackAmount != m_stackAmount)
{
m_stackAmount = stackAmount;
- for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i)
+ for (uint8 i=0; i<MAX_SPELL_EFFECTS; ++i)
{
if (AuraEffect * part = GetPartAura(i))
{
@@ -1959,7 +1959,7 @@ bool Aura::IsPersistent() const
{
return IS_DYNAMICOBJECT_GUID(m_sourceGuid);
/*
- for(uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
if(m_partAuras[i] && m_partAuras[i]->IsPersistent())
return true;
return false;
@@ -1968,7 +1968,7 @@ bool Aura::IsPersistent() const
bool Aura::IsAreaAura() const
{
- for(uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
if(m_partAuras[i] && m_partAuras[i]->IsAreaAura())
return true;
return false;
@@ -1976,7 +1976,7 @@ bool Aura::IsAreaAura() const
bool Aura::IsAuraType(AuraType type) const
{
- for(uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
if(m_partAuras[i] && m_partAuras[i]->GetAuraName() == type)
return true;
@@ -1991,7 +1991,7 @@ void Aura::SetLoadedState(uint64 caster_guid,int32 maxduration,int32 duration,in
m_duration = duration;
m_procCharges = charges;
m_stackAmount = stackamount;
- for(uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
if(m_partAuras[i])
m_partAuras[i]->SetAmount(amount[i]);
}
@@ -2110,7 +2110,7 @@ void AuraEffect::HandleShapeshiftBoosts(bool apply)
if (HotWSpellId)
{
Unit::AuraEffectList const& mModTotalStatPct = m_target->GetAurasByType(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE);
- for(Unit::AuraEffectList::const_iterator i = mModTotalStatPct.begin(); i != mModTotalStatPct.end(); ++i)
+ for (Unit::AuraEffectList::const_iterator i = mModTotalStatPct.begin(); i != mModTotalStatPct.end(); ++i)
{
if ((*i)->GetSpellProto()->SpellIconID == 240 && (*i)->GetMiscValue() == 3)
{
@@ -2190,7 +2190,7 @@ void AuraEffect::HandleShapeshiftBoosts(bool apply)
m_target->RemoveAurasDueToSpell(spellId2);
Unit::AuraMap& tAuras = m_target->GetAuras();
- for (Unit::AuraMap::iterator itr = tAuras.begin(); itr != tAuras.end();)
+ for (Unit::AuraMap::iterator itr = tAuras.begin(); itr != tAuras.end(); )
{
if (itr->second->IsRemovedOnShapeLost())
{
@@ -2280,7 +2280,7 @@ void AuraEffect::HandleAddModifier(bool apply, bool Real, bool changeAmount)
{
uint64 guid = m_target->GetGUID();
Unit::AuraMap & auras = m_target->GetAuras();
- for(Unit::AuraMap::iterator iter = auras.begin(); iter != auras.end();++iter)
+ for (Unit::AuraMap::iterator iter = auras.begin(); iter != auras.end(); ++iter)
{
Aura * aur = iter->second;
// only passive auras-active auras should have amount set on spellcast and not be affected
@@ -2289,7 +2289,7 @@ void AuraEffect::HandleAddModifier(bool apply, bool Real, bool changeAmount)
{
if (modOp == SPELLMOD_ALL_EFFECTS)
{
- for (uint8 i = 0; i<MAX_SPELL_EFFECTS;++i)
+ for (uint8 i = 0; i<MAX_SPELL_EFFECTS; ++i)
{
if (AuraEffect * aurEff = aur->GetPartAura(i))
aurEff->RecalculateAmount();
@@ -2465,9 +2465,9 @@ void AuraEffect::TriggerSpell()
case 34229:
{
// cast 24 spells 34269-34289, 34314-34316
- for(uint32 spell_id = 34269; spell_id != 34290; ++spell_id)
+ for (uint32 spell_id = 34269; spell_id != 34290; ++spell_id)
caster->CastSpell(m_target,spell_id,true, NULL, this);
- for(uint32 spell_id = 34314; spell_id != 34317; ++spell_id)
+ for (uint32 spell_id = 34314; spell_id != 34317; ++spell_id)
caster->CastSpell(m_target,spell_id,true, NULL, this);
return;
}
@@ -2587,7 +2587,7 @@ void AuraEffect::TriggerSpell()
case 38443:
{
bool all = true;
- for(int i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i)
+ for (int i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i)
{
if(!caster->m_SummonSlot[i])
{
@@ -2695,7 +2695,7 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real, bool changeAmount)
if(apply)
{
// Overpower
- if (caster && m_spellProto->SpellFamilyName == SPELLFAMILY_WARRIOR &&
+ if (caster && m_spellProto->SpellFamilyName == SPELLFAMILY_WARRIOR &&
m_spellProto->SpellFamilyFlags[0] & 0x4)
{
// Must be casting target
@@ -3182,7 +3182,7 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real, bool changeAmount)
// final heal
//if(m_target->IsInWorld())
// This may be a hack, but we need a way to count healing bonus three times
- //for(uint8 i = 0; i < GetParentAura()->GetStackAmount(); ++i)
+ //for (uint8 i = 0; i < GetParentAura()->GetStackAmount(); ++i)
// Update: apparently not anymore, it should only count once, so.. commented out.
m_target->CastCustomSpell(m_target,33778,&m_amount,NULL,NULL,true,NULL,this,GetCasterGUID());
@@ -3242,7 +3242,7 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real, bool changeAmount)
uint32 zone, area;
m_target->GetZoneAndAreaId(zone,area);
- for(SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
+ for (SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
{
// some auras remove at aura remove
if(!itr->second->IsFitToRequirements((Player*)m_target,zone,area))
@@ -3284,7 +3284,7 @@ void AuraEffect::HandleAuraMounted(bool apply, bool Real, bool /*changeAmount*/)
display_id = minfo->modelid;
//some spell has one aura of mount and one of vehicle
- for(uint32 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ for (uint32 i = 0; i < MAX_SPELL_EFFECTS; ++i)
if(GetSpellProto()->Effect[i] == SPELL_EFFECT_SUMMON
&& GetSpellProto()->EffectMiscValue[i] == GetMiscValue())
display_id = 0;
@@ -3591,7 +3591,7 @@ void AuraEffect::HandleAuraModShapeshift(bool apply, bool Real, bool changeAmoun
{
// add dash if in cat-from
Unit::AuraMap & auras = m_target->GetAuras();
- for (Unit::AuraMap::iterator iter = auras.begin(); iter != auras.end();++iter)
+ for (Unit::AuraMap::iterator iter = auras.begin(); iter != auras.end(); ++iter)
{
Aura * aur = iter->second;
if (aur->GetSpellProto()->SpellFamilyName==SPELLFAMILY_DRUID && aur->GetSpellProto()->SpellFamilyFlags[2] & 0x8)
@@ -3610,7 +3610,7 @@ void AuraEffect::HandleAuraModShapeshift(bool apply, bool Real, bool changeAmoun
{
SpellShapeshiftEntry const *shapeInfo = sSpellShapeshiftStore.LookupEntry(form);
// Learn spells for shapeshift form - no need to send action bars or add spells to spellbook
- for (uint8 i = 0;i<MAX_SHAPESHIFT_SPELLS;++i)
+ for (uint8 i = 0; i<MAX_SHAPESHIFT_SPELLS; ++i)
{
if (!shapeInfo->stanceSpell[i])
continue;
@@ -3748,7 +3748,7 @@ void AuraEffect::HandleAuraTransform(bool apply, bool Real, bool /*changeAmount*
{
// look for other transform auras
AuraEffect* handledAura = *otherTransforms.begin();
- for(Unit::AuraEffectList::const_iterator i = otherTransforms.begin();i != otherTransforms.end(); ++i)
+ for (Unit::AuraEffectList::const_iterator i = otherTransforms.begin(); i != otherTransforms.end(); ++i)
{
// negative auras are preferred
if (!IsPositiveSpell((*i)->GetSpellProto()->Id))
@@ -3914,7 +3914,7 @@ void AuraEffect::HandleAuraModPetTalentsPoints(bool Apply, bool Real, bool chang
// Recalculate pet tlaent points
if (Pet *pet = ((Player*)m_target)->GetPet())
- pet->InitTalentForLevel();
+ pet->InitTalentForLevel();
}
void AuraEffect::HandleModConfuse(bool apply, bool Real, bool /*changeAmount*/)
@@ -3956,12 +3956,12 @@ void AuraEffect::HandleFeignDeath(bool apply, bool Real, bool /*changeAmount*/)
Trinity::AnyUnfriendlyUnitInObjectRangeCheck u_check(m_target, m_target, m_target->GetMap()->GetVisibilityDistance());
Trinity::UnitListSearcher<Trinity::AnyUnfriendlyUnitInObjectRangeCheck> searcher(m_target, targets, u_check);
m_target->VisitNearbyObject(m_target->GetMap()->GetVisibilityDistance(), searcher);
- for(std::list<Unit*>::iterator iter = targets.begin(); iter != targets.end(); ++iter)
+ for (std::list<Unit*>::iterator iter = targets.begin(); iter != targets.end(); ++iter)
{
if(!(*iter)->hasUnitState(UNIT_STAT_CASTING))
continue;
- for(uint32 i = CURRENT_FIRST_NON_MELEE_SPELL; i < CURRENT_MAX_SPELL; i++)
+ for (uint32 i = CURRENT_FIRST_NON_MELEE_SPELL; i < CURRENT_MAX_SPELL; i++)
{
if((*iter)->GetCurrentSpell(i)
&& (*iter)->GetCurrentSpell(i)->m_targets.getUnitTargetGUID() == m_target->GetGUID())
@@ -4112,7 +4112,7 @@ void AuraEffect::HandleInvisibility(bool apply, bool Real, bool /*changeAmount*/
// recalculate value at modifier remove (current aura already removed)
m_target->m_invisibilityMask = 0;
Unit::AuraEffectList const& auras = m_target->GetAurasByType(SPELL_AURA_MOD_INVISIBILITY);
- for(Unit::AuraEffectList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
+ for (Unit::AuraEffectList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
m_target->m_invisibilityMask |= (1 << GetMiscValue());
// only at real aura remove and if not have different invisibility auras.
@@ -4138,7 +4138,7 @@ void AuraEffect::HandleInvisibilityDetect(bool apply, bool Real, bool /*changeAm
// recalculate value at modifier remove (current aura already removed)
m_target->m_detectInvisibilityMask = 0;
Unit::AuraEffectList const& auras = m_target->GetAurasByType(SPELL_AURA_MOD_INVISIBILITY_DETECTION);
- for(Unit::AuraEffectList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
+ for (Unit::AuraEffectList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
m_target->m_detectInvisibilityMask |= (1 << GetMiscValue());
}
if(Real && m_target->GetTypeId()==TYPEID_PLAYER)
@@ -4208,7 +4208,7 @@ void AuraEffect::HandleModThreat(bool apply, bool Real, bool changeAmount)
}
if (m_target->GetTypeId() == TYPEID_PLAYER)
- for(int8 x=0;x < MAX_SPELL_SCHOOL;x++)
+ for (int8 x=0; x < MAX_SPELL_SCHOOL; x++)
if (GetMiscValue() & int32(1<<x))
ApplyPercentModFloatVar(m_target->m_threatModifier[x], m_amount, apply);
}
@@ -4383,12 +4383,12 @@ void AuraEffect::HandleModStateImmunityMask(bool apply, bool Real, bool /*change
if(apply && GetSpellProto()->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY)
{
- for (std::list <AuraType>::iterator iter = immunity_list.begin(); iter != immunity_list.end();++iter)
+ for (std::list <AuraType>::iterator iter = immunity_list.begin(); iter != immunity_list.end(); ++iter)
{
m_target->RemoveAurasByType(*iter);
}
}
- for (std::list <AuraType>::iterator iter = immunity_list.begin(); iter != immunity_list.end();++iter)
+ for (std::list <AuraType>::iterator iter = immunity_list.begin(); iter != immunity_list.end(); ++iter)
{
m_target->ApplySpellImmune(GetId(),IMMUNITY_STATE,*iter,apply);
}
@@ -4415,7 +4415,7 @@ void AuraEffect::HandleModMechanicImmunity(bool apply, bool Real, bool /*changeA
if(apply && GetSpellProto()->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY)
{
Unit::AuraMap& Auras = m_target->GetAuras();
- for(Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end();)
+ for (Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end(); )
{
SpellEntry const *spell = iter->second->GetSpellProto();
if (spell->Id != GetId())
@@ -4496,7 +4496,7 @@ void AuraEffect::HandleAuraModSchoolImmunity(bool apply, bool Real, bool /*chang
{
uint32 school_mask = GetMiscValue();
Unit::AuraMap& Auras = m_target->GetAuras();
- for(Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end();)
+ for (Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end(); )
{
SpellEntry const *spell = iter->second->GetSpellProto();
if((GetSpellSchoolMask(spell) & school_mask)//Check for school mask
@@ -4684,7 +4684,7 @@ void AuraEffect::HandlePeriodicHealthFunnel(bool apply, bool Real, bool /*change
void AuraEffect::HandleAuraModResistanceExclusive(bool apply, bool Rea, bool /*changeAmount*/)
{
- for(int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL;x++)
+ for (int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL; x++)
{
if(GetMiscValue() & int32(1<<x))
{
@@ -4697,7 +4697,7 @@ void AuraEffect::HandleAuraModResistanceExclusive(bool apply, bool Rea, bool /*c
void AuraEffect::HandleAuraModResistance(bool apply, bool Real, bool /*changeAmount*/)
{
- for(int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL;x++)
+ for (int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL; x++)
{
if(GetMiscValue() & int32(1<<x))
{
@@ -4719,7 +4719,7 @@ void AuraEffect::HandleAuraModBaseResistancePCT(bool apply, bool Real, bool /*ch
}
else
{
- for(int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL;x++)
+ for (int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL; x++)
{
if(GetMiscValue() & int32(1<<x))
m_target->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + x), BASE_PCT, float(m_amount), apply);
@@ -4729,7 +4729,7 @@ void AuraEffect::HandleAuraModBaseResistancePCT(bool apply, bool Real, bool /*ch
void AuraEffect::HandleModResistancePercent(bool apply, bool Real, bool /*changeAmount*/)
{
- for(int8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++)
+ for (int8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++)
{
if(GetMiscValue() & int32(1<<i))
{
@@ -4754,7 +4754,7 @@ void AuraEffect::HandleModBaseResistance(bool apply, bool Real, bool /*changeAmo
}
else
{
- for(int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++)
+ for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++)
if(GetMiscValue() & (1<<i))
m_target->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + i), TOTAL_VALUE, float(m_amount), apply);
}
@@ -4772,7 +4772,7 @@ void AuraEffect::HandleAuraModStat(bool apply, bool Real, bool /*changeAmount*/)
return;
}
- for(int32 i = STAT_STRENGTH; i < MAX_STATS; i++)
+ for (int32 i = STAT_STRENGTH; i < MAX_STATS; i++)
{
// -1 or -2 is all stats ( misc < -2 checked in function beginning )
if (GetMiscValue() < 0 || GetMiscValue() == i)
@@ -5118,7 +5118,7 @@ void AuraEffect::HandleAuraModWeaponCritPercent(bool apply, bool Real, bool chan
// apply item specific bonuses for already equipped weapon
if(Real || changeAmount)
{
- for(int i = 0; i < MAX_ATTACK; ++i)
+ for (int i = 0; i < MAX_ATTACK; ++i)
if(Item* pItem = ((Player*)m_target)->GetWeaponForAttack(WeaponAttackType(i)))
((Player*)m_target)->_ApplyWeaponDependentAuraCritMod(pItem,WeaponAttackType(i),this,apply);
}
@@ -5182,7 +5182,7 @@ void AuraEffect::HandleModSpellCritChanceShool(bool /*apply*/, bool Real, bool c
if(m_target->GetTypeId() != TYPEID_PLAYER)
return;
- for(int school = SPELL_SCHOOL_NORMAL; school < MAX_SPELL_SCHOOL; ++school)
+ for (int school = SPELL_SCHOOL_NORMAL; school < MAX_SPELL_SCHOOL; ++school)
if (GetMiscValue() & (1<<school))
((Player*)m_target)->UpdateSpellCritChance(school);
}
@@ -5310,7 +5310,7 @@ void AuraEffect::HandleModDamageDone(bool apply, bool Real, bool changeAmount)
// apply item specific bonuses for already equipped weapon
if((Real || changeAmount) && m_target->GetTypeId()==TYPEID_PLAYER)
{
- for(int i = 0; i < MAX_ATTACK; ++i)
+ for (int i = 0; i < MAX_ATTACK; ++i)
if(Item* pItem = ((Player*)m_target)->GetWeaponForAttack(WeaponAttackType(i)))
((Player*)m_target)->_ApplyWeaponDependentAuraDamageMod(pItem,WeaponAttackType(i),this,apply);
}
@@ -5366,7 +5366,7 @@ void AuraEffect::HandleModDamageDone(bool apply, bool Real, bool changeAmount)
{
if(m_amount > 0)
{
- for(int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; i++)
+ for (int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; i++)
{
if((GetMiscValue() & (1<<i)) != 0)
m_target->ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS+i,m_amount,apply);
@@ -5374,7 +5374,7 @@ void AuraEffect::HandleModDamageDone(bool apply, bool Real, bool changeAmount)
}
else
{
- for(int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; i++)
+ for (int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; i++)
{
if((GetMiscValue() & (1<<i)) != 0)
m_target->ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG+i,m_amount,apply);
@@ -5392,7 +5392,7 @@ void AuraEffect::HandleModDamagePercentDone(bool apply, bool Real, bool changeAm
// apply item specific bonuses for already equipped weapon
if((Real || changeAmount) && m_target->GetTypeId()==TYPEID_PLAYER)
{
- for(int i = 0; i < MAX_ATTACK; ++i)
+ for (int i = 0; i < MAX_ATTACK; ++i)
if(Item* pItem = ((Player*)m_target)->GetWeaponForAttack(WeaponAttackType(i)))
((Player*)m_target)->_ApplyWeaponDependentAuraDamageMod(pItem,WeaponAttackType(i),this,apply);
}
@@ -5440,7 +5440,7 @@ void AuraEffect::HandleModDamagePercentDone(bool apply, bool Real, bool changeAm
// Magic damage percent modifiers implemented in Unit::SpellDamageBonus
// Send info to client
if(m_target->GetTypeId() == TYPEID_PLAYER)
- for(int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
+ for (int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
m_target->ApplyModSignedFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT+i,m_amount/100.0f,apply);
}
@@ -5466,7 +5466,7 @@ void AuraEffect::HandleModPowerCostPCT(bool apply, bool Real, bool changeAmount)
return;
float amount = m_amount /100.0f;
- for(int i = 0; i < MAX_SPELL_SCHOOL; ++i)
+ for (int i = 0; i < MAX_SPELL_SCHOOL; ++i)
if(GetMiscValue() & (1<<i))
m_target->ApplyModSignedFloatValue(UNIT_FIELD_POWER_COST_MULTIPLIER+i,amount,apply);
}
@@ -5477,7 +5477,7 @@ void AuraEffect::HandleModPowerCost(bool apply, bool Real, bool changeAmount)
if(!Real && !changeAmount)
return;
- for(int i = 0; i < MAX_SPELL_SCHOOL; ++i)
+ for (int i = 0; i < MAX_SPELL_SCHOOL; ++i)
if(GetMiscValue() & (1<<i))
m_target->ApplyModInt32Value(UNIT_FIELD_POWER_COST_MODIFIER+i,m_amount,apply);
}
@@ -5491,7 +5491,7 @@ void AuraEffect::HandleNoReagentUseAura(bool Apply, bool Real, bool /*changeAmou
return;
flag96 mask;
Unit::AuraEffectList const& noReagent = m_target->GetAurasByType(SPELL_AURA_NO_REAGENT_USE);
- for(Unit::AuraEffectList::const_iterator i = noReagent.begin(); i != noReagent.end(); ++i)
+ for (Unit::AuraEffectList::const_iterator i = noReagent.begin(); i != noReagent.end(); ++i)
mask |= (*i)->m_spellProto->EffectSpellClassMask[(*i)->m_effIndex];
m_target->SetUInt32Value(PLAYER_NO_REAGENT_COST_1 , mask[0]);
@@ -5584,7 +5584,7 @@ void AuraEffect::HandleAuraAllowFlight(bool apply, bool Real, bool /*changeAmoun
if(m_target->GetTypeId() == TYPEID_UNIT)
m_target->SetFlying(apply);
-
+
if(Player *plr = m_target->m_movedPlayer)
{
// allow fly
@@ -6678,7 +6678,7 @@ void AuraEffect::PeriodicDummyTick()
return;
// Remove death rune added on proc
- for (uint8 i=0;i<MAX_RUNES && m_amount;++i)
+ for (uint8 i=0; i<MAX_RUNES && m_amount; ++i)
{
if (m_spellProto->SpellIconID == 2622)
{
@@ -6788,7 +6788,7 @@ void AuraEffect::HandleAuraConvertRune(bool apply, bool Real, bool changeAmount)
uint32 runes = 0;
// convert number of runes specified in aura amount of rune type in miscvalue to runetype in miscvalueb
- for(uint32 i = 0; i < MAX_RUNES && m_amount; ++i)
+ for (uint32 i = 0; i < MAX_RUNES && m_amount; ++i)
{
if(apply)
{
@@ -7074,7 +7074,7 @@ int32 AuraEffect::CalculateCrowdControlAuraAmount(Unit * caster)
// Glyphs increasing damage cap
Unit::AuraEffectList const& overrideClassScripts = caster->GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
- for(Unit::AuraEffectList::const_iterator itr = overrideClassScripts.begin();itr != overrideClassScripts.end(); ++itr)
+ for (Unit::AuraEffectList::const_iterator itr = overrideClassScripts.begin(); itr != overrideClassScripts.end(); ++itr)
{
if((*itr)->isAffectedOnSpell(m_spellProto))
{
@@ -7092,7 +7092,7 @@ int32 AuraEffect::CalculateCrowdControlAuraAmount(Unit * caster)
bool AuraEffect::IsPeriodicTickCrit(Unit const * pCaster) const
{
Unit::AuraEffectList const& mPeriodicCritAuras= pCaster->GetAurasByType(SPELL_AURA_ABILITY_PERIODIC_CRIT);
- for(Unit::AuraEffectList::const_iterator itr = mPeriodicCritAuras.begin(); itr != mPeriodicCritAuras.end(); ++itr)
+ for (Unit::AuraEffectList::const_iterator itr = mPeriodicCritAuras.begin(); itr != mPeriodicCritAuras.end(); ++itr)
{
if ((*itr)->isAffectedOnSpell(m_spellProto) && pCaster->isSpellCrit(m_target, m_spellProto, GetSpellSchoolMask(m_spellProto)))
return true;
diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h
index 821e208d6b7..3730107461a 100644
--- a/src/game/SpellAuras.h
+++ b/src/game/SpellAuras.h
@@ -45,7 +45,7 @@ typedef void(AuraEffect::*pAuraHandler)(bool Apply, bool Real, bool changeAmount
// each setting object update field code line moved under if(Real) check is significant Trinity speedup, and less server->client data sends
// each packet sending code moved under if(Real) check is _large_ Trinity speedup, and lot less server->client data sends
//
-// changeAmount == true at changing existing aura amount - called wit real == false
+// changeAmount == true at changing existing aura amount - called wit real == false
// if aura has amount dependant effect handler has to allow proceeding it
// example: change speed aura, modifier aura
@@ -113,7 +113,7 @@ class TRINITY_DLL_SPEC Aura
bool HasEffect(uint8 effIndex) const {return bool (m_partAuras[effIndex]);}
inline void HandleEffects(bool apply)
{
- for (uint8 i = 0; i<MAX_SPELL_EFFECTS;++i)
+ for (uint8 i = 0; i<MAX_SPELL_EFFECTS; ++i)
if (m_partAuras[i])
m_target->HandleAuraEffect(m_partAuras[i], apply);
}
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index d9aedd5fc98..1954976b824 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -327,7 +327,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
if (m_customAttr & SPELL_ATTR_CU_SHARE_DAMAGE)
{
uint32 count = 0;
- for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
+ for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
if (ihit->effectMask & (1<<effect_idx))
++count;
@@ -346,7 +346,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
if (unitTarget == m_caster)
{
uint8 count = 0;
- for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
+ for (std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
if(ihit->targetGUID != m_caster->GetGUID())
if(Player *target = ObjectAccessor::FindPlayer(ihit->targetGUID))
if(target->HasAura(m_triggeredByAuraSpell->Id))
@@ -467,7 +467,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
AuraEffect const* aura = NULL; // found req. aura for damage calculation
Unit::AuraEffectList const &mPeriodic = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
- for(Unit::AuraEffectList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i)
+ for (Unit::AuraEffectList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i)
{
// for caster applied auras only
if ((*i)->GetSpellProto()->SpellFamilyName != SPELLFAMILY_WARLOCK ||
@@ -612,7 +612,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
// TODO: should this be put on taken but not done?
if(found)
damage += m_spellInfo->EffectBasePoints[1];
-
+
if (m_caster->GetTypeId() == TYPEID_PLAYER)
{
// Add Ammo and Weapon damage plus RAP * 0.1
@@ -689,7 +689,7 @@ void Spell::EffectDummy(uint32 i)
case 42784:
{
uint32 count = 0;
- for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
+ for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
if(ihit->effectMask & (1<<i))
++count;
@@ -699,7 +699,7 @@ void Spell::EffectDummy(uint32 i)
SpellEntry const *spellInfo = sSpellStore.LookupEntry(42784);
// now deal the damage
- for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
+ for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
if(ihit->effectMask & (1<<i))
{
if (Unit* casttarget = Unit::GetUnit((*unitTarget), ihit->targetGUID))
@@ -1252,7 +1252,7 @@ void Spell::EffectDummy(uint32 i)
SearchAreaTarget(unitList, 99, PUSH_DST_CENTER, SPELL_TARGETS_ENTRY, 33114);
float minDist = 99 * 99;
Vehicle *target = NULL;
- for(std::list<Unit*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
+ for (std::list<Unit*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
{
if(Vehicle *seat = (*itr)->GetVehicleKit())
if(!seat->GetPassenger(0))
@@ -1316,7 +1316,7 @@ void Spell::EffectDummy(uint32 i)
// immediately finishes the cooldown on Frost spells
const SpellCooldowns& cm = ((Player *)m_caster)->GetSpellCooldownMap();
- for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
+ for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end(); )
{
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
@@ -1552,7 +1552,7 @@ void Spell::EffectDummy(uint32 i)
if(!pEnchant)
return;
- for (int s=0;s<3;s++)
+ for (int s=0; s<3; s++)
{
if(pEnchant->type[s]!=ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
continue;
@@ -1574,7 +1574,7 @@ void Spell::EffectDummy(uint32 i)
//immediately finishes the cooldown on certain Rogue abilities
const SpellCooldowns& cm = ((Player *)m_caster)->GetSpellCooldownMap();
- for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
+ for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end(); )
{
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
@@ -1602,7 +1602,7 @@ void Spell::EffectDummy(uint32 i)
// immediately finishes the cooldown on your other Hunter abilities except Bestial Wrath
const SpellCooldowns& cm = ((Player*)m_caster)->GetSpellCooldownMap();
- for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
+ for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end(); )
{
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
@@ -1716,7 +1716,7 @@ void Spell::EffectDummy(uint32 i)
// Righteous Defense (step 2) (in old version 31980 dummy effect)
// Clear targets for eff 1
- for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
+ for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
ihit->effectMask &= ~(1<<1);
// not empty (checked)
@@ -1725,7 +1725,7 @@ void Spell::EffectDummy(uint32 i)
// chance to be selected from list
float chance = 100.0f / attackers.size();
uint32 count = 0;
- for(Unit::AttackerSet::const_iterator aItr = attackers.begin(); aItr != attackers.end() && count < 3; ++aItr)
+ for (Unit::AttackerSet::const_iterator aItr = attackers.begin(); aItr != attackers.end() && count < 3; ++aItr)
{
if(!roll_chance_f(chance))
continue;
@@ -1785,7 +1785,7 @@ void Spell::EffectDummy(uint32 i)
if(m_caster->GetTypeId() != TYPEID_PLAYER)
return;
- for(uint8 j = BASE_ATTACK; j <= OFF_ATTACK; ++j)
+ for (uint8 j = BASE_ATTACK; j <= OFF_ATTACK; ++j)
{
if(Item* item = ((Player*)m_caster)->GetWeaponForAttack(WeaponAttackType(j)))
{
@@ -1862,7 +1862,7 @@ void Spell::EffectDummy(uint32 i)
{
uint32 count = 0;
Unit::AuraMap const& auras = unitTarget->GetAuras();
- for(Unit::AuraMap::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr)
+ for (Unit::AuraMap::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr)
{
if(itr->second->GetSpellProto()->Dispel == DISPEL_DISEASE &&
itr->second->GetCasterGUID() == m_caster->GetGUID())
@@ -2208,7 +2208,7 @@ void Spell::EffectTriggerSpell(uint32 effIndex)
{
uint32 dispelMask = GetDispellMask(DISPEL_ALL);
Unit::AuraMap& Auras = unitTarget->GetAuras();
- for(Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end();)
+ for (Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end(); )
{
// remove all harmful spells on you...
SpellEntry const* spell = iter->second->GetSpellProto();
@@ -2631,7 +2631,7 @@ void Spell::SpellDamageHeal(uint32 /*i*/)
Unit::AuraEffectList const& RejorRegr = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_HEAL);
// find most short by duration
AuraEffect *targetAura = NULL;
- for(Unit::AuraEffectList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i)
+ for (Unit::AuraEffectList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i)
{
if((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID
&& (*i)->GetSpellProto()->SpellFamilyFlags[0] & 0x50)
@@ -2905,7 +2905,7 @@ void Spell::DoCreateItem(uint32 i, uint32 itemtype)
if(BattleGround* bg = sBattleGroundMgr.GetBattleGroundTemplate(BattleGroundTypeId(bgType)))
bg->SendRewardMarkByMail(player, newitemid, no_space);
}
-*/
+*/
}
void Spell::EffectCreateItem(uint32 i)
@@ -3032,7 +3032,7 @@ void Spell::EffectEnergize(uint32 i)
// find elixirs on target
uint32 elixir_mask = 0;
Unit::AuraMap& Auras = unitTarget->GetAuras();
- for(Unit::AuraMap::iterator itr = Auras.begin(); itr != Auras.end(); ++itr)
+ for (Unit::AuraMap::iterator itr = Auras.begin(); itr != Auras.end(); ++itr)
{
uint32 spell_id = itr->second->GetId();
if(uint32 mask = spellmgr.GetSpellElixirMask(spell_id))
@@ -3045,7 +3045,7 @@ void Spell::EffectEnergize(uint32 i)
// get all available elixirs by mask and spell level
std::vector<uint32> elixirs;
SpellElixirMap const& m_spellElixirs = spellmgr.GetSpellElixirMap();
- for(SpellElixirMap::const_iterator itr = m_spellElixirs.begin(); itr != m_spellElixirs.end(); ++itr)
+ for (SpellElixirMap::const_iterator itr = m_spellElixirs.begin(); itr != m_spellElixirs.end(); ++itr)
{
if (itr->second & elixir_mask)
{
@@ -3295,7 +3295,7 @@ void Spell::EffectSummonChangeItem(uint32 i)
if( !pNewItem )
return;
- for(uint8 j= PERM_ENCHANTMENT_SLOT; j<=TEMP_ENCHANTMENT_SLOT; ++j)
+ for (uint8 j= PERM_ENCHANTMENT_SLOT; j<=TEMP_ENCHANTMENT_SLOT; ++j)
{
if(m_CastItem->GetEnchantmentId(EnchantmentSlot(j)))
pNewItem->SetEnchantment(EnchantmentSlot(j), m_CastItem->GetEnchantmentId(EnchantmentSlot(j)), m_CastItem->GetEnchantmentDuration(EnchantmentSlot(j)), m_CastItem->GetEnchantmentCharges(EnchantmentSlot(j)));
@@ -3506,7 +3506,7 @@ void Spell::EffectSummonType(uint32 i)
if (m_spellInfo->Id == 18662) // Curse of Doom
amount = 1;
- for(uint32 count = 0; count < amount; ++count)
+ for (uint32 count = 0; count < amount; ++count)
{
GetSummonPosition(i, pos, radius, count);
@@ -3586,7 +3586,7 @@ void Spell::EffectDispel(uint32 i)
uint32 dispel_type = m_spellInfo->EffectMiscValue[i];
uint32 dispelMask = GetDispellMask( DispelType(dispel_type) );
Unit::AuraMap const& auras = unitTarget->GetAuras();
- for(Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
+ for (Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
{
Aura *aur = itr->second;
if ((1<<aur->GetSpellProto()->Dispel) & dispelMask)
@@ -3907,7 +3907,7 @@ void Spell::EffectEnchantItemPrismatic(uint32 effect_idx)
// support only enchantings with add socket in this slot
{
bool add_socket = false;
- for(uint8 i = 0; i < 3; ++i)
+ for (uint8 i = 0; i < 3; ++i)
{
if(pEnchant->type[i]==ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET)
{
@@ -4118,7 +4118,7 @@ void Spell::EffectTameCreature(uint32 /*i*/)
// caster have pet now
m_caster->SetMinion(pet, true);
-
+
pet->InitTalentForLevel();
if(m_caster->GetTypeId() == TYPEID_PLAYER)
@@ -4313,7 +4313,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
stack = aur->GetStackAmount();
}
- for(uint8 j = 0; j < 3; j++)
+ for (uint8 j = 0; j < 3; j++)
{
if(m_spellInfo->Effect[j] == SPELL_EFFECT_NORMALIZED_WEAPON_DMG)
{
@@ -4351,7 +4351,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
// Glyph of Devastate
if (AuraEffect * aurEff = m_caster->GetAuraEffect(58388, 0))
count += aurEff->GetAmount();
- for (;count>0;count--)
+ for (; count>0; count--)
m_caster->CastSpell(unitTarget, spellInfo, true);
if (stack)
spell_bonus += stack * CalculateDamage(2, unitTarget);
@@ -4386,7 +4386,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
else
{
Unit::AuraMap const& auras = unitTarget->GetAuras();
- for(Unit::AuraMap::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr)
+ for (Unit::AuraMap::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr)
{
if(itr->second->GetSpellProto()->Dispel == DISPEL_POISON)
{
@@ -4759,14 +4759,14 @@ void Spell::EffectScriptEffect(uint32 effIndex)
Player* plr = ((Player*)m_caster);
if(plr && plr->GetLastPetNumber())
{
- PetType NewPetType = (plr->getClass()==CLASS_HUNTER) ? HUNTER_PET : SUMMON_PET;
+ PetType NewPetType = (plr->getClass()==CLASS_HUNTER) ? HUNTER_PET : SUMMON_PET;
if (Pet* NewPet = new Pet(plr,NewPetType))
{
if(NewPet->LoadPetFromDB(plr, 0, plr->GetLastPetNumber(), true))
{
NewPet->SetHealth(NewPet->GetMaxHealth());
NewPet->SetPower(NewPet->getPowerType(),NewPet->GetMaxPower(NewPet->getPowerType()));
-
+
switch (NewPet->GetEntry())
{
case 11859:
@@ -4872,7 +4872,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
uint32 spells[4] = { 26272, 26157, 26273, 26274 };
// check presence
- for(uint8 j = 0; j < 4; ++j)
+ for (uint8 j = 0; j < 4; ++j)
if(unitTarget->HasAuraEffect(spells[j],0))
return;
@@ -5222,7 +5222,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
float x, y, z;
float radius = GetSpellRadius(m_spellInfo, effIndex, true);
- for(uint32 i = 0; i < 15; ++i)
+ for (uint32 i = 0; i < 15; ++i)
{
m_caster->GetRandomPoint(m_targets.m_dstPos, radius, x, y, z);
m_caster->CastSpell(x, y, z, 54522, true);
@@ -5292,7 +5292,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
case 58941: // Rock Shards
if(unitTarget && m_originalCaster)
{
- for(uint32 i = 0; i < 3; ++i)
+ for (uint32 i = 0; i < 3; ++i)
{
m_originalCaster->CastSpell(unitTarget, 58689, true);
m_originalCaster->CastSpell(unitTarget, 58692, true);
@@ -5417,7 +5417,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
{
int32 basepoints0 = damage;
// Cast Absorb on totems
- for(uint8 slot = SUMMON_SLOT_TOTEM; slot < MAX_TOTEM_SLOT; ++slot)
+ for (uint8 slot = SUMMON_SLOT_TOTEM; slot < MAX_TOTEM_SLOT; ++slot)
{
if(!unitTarget->m_SummonSlot[slot])
continue;
@@ -5598,7 +5598,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
uint32 spellId = 0;
int32 basePoint = 0;
Unit::AuraMap& Auras = unitTarget->GetAuras();
- for(Unit::AuraMap::iterator i = Auras.begin(); i != Auras.end(); ++i)
+ for (Unit::AuraMap::iterator i = Auras.begin(); i != Auras.end(); ++i)
{
Aura *aura = (*i).second;
if (aura->GetCasterGUID() != m_caster->GetGUID())
@@ -5684,7 +5684,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
}
// all seals have aura dummy in 2 effect
Unit::AuraMap & sealAuras = m_caster->GetAuras();
- for(Unit::AuraMap::iterator iter = sealAuras.begin(); iter != sealAuras.end();)
+ for (Unit::AuraMap::iterator iter = sealAuras.begin(); iter != sealAuras.end(); )
{
if (IsSealSpell(iter->second->GetSpellProto()))
{
@@ -5745,7 +5745,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
const uint32 spellid = 28703;
// don't overwrite an existing aura
- for(uint8 i = 0; i < 5; ++i)
+ for (uint8 i = 0; i < 5; ++i)
if(unitTarget->HasAura(spellid + i))
return;
unitTarget->CastSpell(unitTarget, spellid+urand(0, 4), true);
@@ -5789,7 +5789,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
case SPELLFAMILY_WARRIOR:
{
// Shattering Throw
- if ( m_spellInfo->SpellFamilyFlags[1] & 0x1 )
+ if ( m_spellInfo->SpellFamilyFlags[1] & 0x1 )
{
if(!unitTarget)
return;
@@ -5815,12 +5815,12 @@ void Spell::EffectSanctuary(uint32 /*i*/)
Trinity::AnyUnfriendlyUnitInObjectRangeCheck u_check(unitTarget, unitTarget, m_caster->GetMap()->GetVisibilityDistance());
Trinity::UnitListSearcher<Trinity::AnyUnfriendlyUnitInObjectRangeCheck> searcher(unitTarget, targets, u_check);
unitTarget->VisitNearbyObject(m_caster->GetMap()->GetVisibilityDistance(), searcher);
- for(std::list<Unit*>::iterator iter = targets.begin(); iter != targets.end(); ++iter)
+ for (std::list<Unit*>::iterator iter = targets.begin(); iter != targets.end(); ++iter)
{
if(!(*iter)->hasUnitState(UNIT_STAT_CASTING))
continue;
- for(uint32 i = CURRENT_FIRST_NON_MELEE_SPELL; i < CURRENT_MAX_SPELL; i++)
+ for (uint32 i = CURRENT_FIRST_NON_MELEE_SPELL; i < CURRENT_MAX_SPELL; i++)
{
if((*iter)->GetCurrentSpell(i)
&& (*iter)->GetCurrentSpell(i)->m_targets.getUnitTargetGUID() == unitTarget->GetGUID())
@@ -6343,7 +6343,7 @@ void Spell::EffectLeapForward(uint32 i)
}
int j = 0;
- for(j; j<10 ;j++)
+ for (j; j<10 ; j++)
{
if(fabs(z - destz) > 6)
{
@@ -6573,7 +6573,7 @@ void Spell::EffectDispelMechanic(uint32 i)
std::queue < std::pair < uint32, uint64 > > dispel_list;
Unit::AuraMap& Auras = unitTarget->GetAuras();
- for(Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end(); iter++)
+ for (Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end(); iter++)
{
if((GetAllSpellMechanicMask(iter->second->GetSpellProto()) & (1<<(mechanic))) && GetDispelChance(iter->second->GetCaster(), iter->second->GetId()))
{
@@ -6581,7 +6581,7 @@ void Spell::EffectDispelMechanic(uint32 i)
}
}
- for(;dispel_list.size();dispel_list.pop())
+ for (; dispel_list.size(); dispel_list.pop())
{
unitTarget->RemoveAura(dispel_list.front().first, dispel_list.front().second, AURA_REMOVE_BY_ENEMY_SPELL);
}
@@ -6614,7 +6614,7 @@ void Spell::EffectSummonDeadPet(uint32 /*i*/)
void Spell::EffectDestroyAllTotems(uint32 /*i*/)
{
int32 mana = 0;
- for(uint8 slot = SUMMON_SLOT_TOTEM; slot < MAX_TOTEM_SLOT; ++slot)
+ for (uint8 slot = SUMMON_SLOT_TOTEM; slot < MAX_TOTEM_SLOT; ++slot)
{
if(!m_caster->m_SummonSlot[slot])
continue;
@@ -6735,7 +6735,7 @@ void Spell::EffectTransmitted(uint32 effIndex)
{
fx = 36.69+irand(-8,8);//random place for the bobber
fy = -416.38+irand(-8,8);
- fz = -19.9645;//serpentshrine water level
+ fz = -19.9645;//serpentshrine water level
}else if ( !cMap->IsInWater(fx, fy, fz-0.5f, 0.5f)) // Hack to prevent fishing bobber from failing to land on fishing hole
{ // but this is not proper, we really need to ignore not materialized objects
SendCastResult(SPELL_FAILED_NOT_HERE);
@@ -6933,7 +6933,7 @@ void Spell::EffectStealBeneficialBuff(uint32 i)
// Create dispel mask by dispel type
uint32 dispelMask = GetDispellMask( DispelType(m_spellInfo->EffectMiscValue[i]) );
Unit::AuraMap const& auras = unitTarget->GetAuras();
- for(Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
+ for (Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
{
Aura *aur = (*itr).second;
if (aur && (1<<aur->GetSpellProto()->Dispel) & dispelMask)
@@ -6953,7 +6953,7 @@ void Spell::EffectStealBeneficialBuff(uint32 i)
{
// Random select buff for dispel
std::list < Aura * > ::iterator itr = steal_list.begin();
- for (uint32 i=urand(0, list_size-1);i>0;--i)
+ for (uint32 i=urand(0, list_size-1); i>0; --i)
itr++;
success_list.push_back(*itr);
steal_list.erase(itr);
@@ -6966,7 +6966,7 @@ void Spell::EffectStealBeneficialBuff(uint32 i)
data << uint32(m_spellInfo->Id); // dispel spell id
data << uint8(0); // not used
data << uint32(success_list.size()); // count
- for (std::list < Aura * > ::iterator itr = success_list.begin();itr!=success_list.end();++itr)
+ for (std::list < Aura * > ::iterator itr = success_list.begin(); itr!=success_list.end(); ++itr)
{
data << uint32((*itr)->GetId()); // Spell Id
data << uint8(0); // 0 - steals !=0 transfers
@@ -7019,7 +7019,7 @@ void Spell::EffectActivateRune(uint32 eff_idx)
if(plr->getClass() != CLASS_DEATH_KNIGHT)
return;
- for(uint32 j = 0; j < MAX_RUNES; ++j)
+ for (uint32 j = 0; j < MAX_RUNES; ++j)
{
if(plr->GetRuneCooldown(j) && plr->GetCurrentRune(j) == RuneType(m_spellInfo->EffectMiscValue[eff_idx]))
{
@@ -7105,7 +7105,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const *
TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN;
Map *map = caster->GetMap();
- for(uint32 count = 0; count < amount; ++count)
+ for (uint32 count = 0; count < amount; ++count)
{
Position pos;
GetSummonPosition(i, pos, radius, count);
diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp
index b8aa4469472..c4be996de66 100644
--- a/src/game/SpellHandler.cpp
+++ b/src/game/SpellHandler.cpp
@@ -98,7 +98,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
if (pUser->isInCombat())
{
- for(int i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
+ for (int i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
{
if (SpellEntry const *spellInfo = sSpellStore.LookupEntry(proto->Spells[i].SpellId))
{
@@ -135,12 +135,12 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
// send spell error
if (SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellid))
{
- // for implicit area/coord target spells
+ // for implicit area/coord target spells
if(!targets.getUnitTarget())
Spell::SendCastResult(_player,spellInfo,cast_count,SPELL_FAILED_NO_VALID_TARGETS);
- // for explicit target spells
+ // for explicit target spells
else
- Spell::SendCastResult(_player,spellInfo,cast_count,SPELL_FAILED_BAD_TARGETS);
+ Spell::SendCastResult(_player,spellInfo,cast_count,SPELL_FAILED_BAD_TARGETS);
}
return;
}
@@ -523,7 +523,7 @@ void WorldSession::HandleSpellClick( WorldPacket & recv_data )
// this will get something not in world. crash
Creature *unit = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
-
+
if(!unit)
return;
@@ -536,7 +536,7 @@ void WorldSession::HandleSpellClick( WorldPacket & recv_data )
}
SpellClickInfoMapBounds clickPair = objmgr.GetSpellClickInfoMapBounds(unit->GetEntry());
- for(SpellClickInfoMap::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
+ for (SpellClickInfoMap::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
{
if(itr->second.IsFitToRequirements(_player, unit))
{
@@ -584,7 +584,7 @@ void WorldSession::HandleMirrrorImageDataRequest( WorldPacket & recv_data )
data << (uint8)pCreator->GetByteValue(PLAYER_BYTES_2, 0); // facialhair
data << (uint32)pCreator->GetGuildId(); // unk
- static const EquipmentSlots ItemSlots[] =
+ static const EquipmentSlots ItemSlots[] =
{
EQUIPMENT_SLOT_HEAD,
EQUIPMENT_SLOT_SHOULDERS,
@@ -600,7 +600,7 @@ void WorldSession::HandleMirrrorImageDataRequest( WorldPacket & recv_data )
EQUIPMENT_SLOT_END
};
// Display items in visible slots
- for (EquipmentSlots const* itr = &ItemSlots[0];*itr!=EQUIPMENT_SLOT_END;++itr)
+ for (EquipmentSlots const* itr = &ItemSlots[0]; *itr!=EQUIPMENT_SLOT_END; ++itr)
{
if (*itr == EQUIPMENT_SLOT_HEAD && pCreator->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_HELM))
data << (uint32)0;
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index ef42f0d50ac..24d785853b4 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -35,7 +35,7 @@ SpellSelectTargetTypes SpellTargetType[TOTAL_SPELL_TARGETS];
SpellMgr::SpellMgr()
{
- for(int i = 0; i < TOTAL_SPELL_EFFECTS; ++i)
+ for (int i = 0; i < TOTAL_SPELL_EFFECTS; ++i)
{
switch(i)
{
@@ -98,7 +98,7 @@ SpellMgr::SpellMgr()
}
}
- for(int i = 0; i < TOTAL_SPELL_TARGETS; ++i)
+ for (int i = 0; i < TOTAL_SPELL_TARGETS; ++i)
{
switch(i)
{
@@ -211,7 +211,7 @@ SpellMgr::SpellMgr()
}
}
- for(int i = 0; i < TOTAL_SPELL_TARGETS; ++i)
+ for (int i = 0; i < TOTAL_SPELL_TARGETS; ++i)
{
switch(i)
{
@@ -239,7 +239,6 @@ SpellMgr::SpellMgr()
}
}
-
SpellMgr::~SpellMgr()
{
}
@@ -449,7 +448,7 @@ AuraState GetSpellAuraState(SpellEntry const * spellInfo)
if(GetSpellSchoolMask(spellInfo) & SPELL_SCHOOL_MASK_FROST)
{
- for (uint8 i = 0;i<MAX_SPELL_EFFECTS;++i)
+ for (uint8 i = 0; i<MAX_SPELL_EFFECTS; ++i)
{
if (spellInfo->EffectApplyAuraName[i]==SPELL_AURA_MOD_STUN
|| spellInfo->EffectApplyAuraName[i]==SPELL_AURA_MOD_ROOT)
@@ -474,7 +473,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
{
bool food = false;
bool drink = false;
- for(int i = 0; i < 3; ++i)
+ for (int i = 0; i < 3; ++i)
{
switch(spellInfo->EffectApplyAuraName[i])
{
@@ -632,7 +631,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
break;
}
- for(int i = 0; i < 3; ++i)
+ for (int i = 0; i < 3; ++i)
{
if(spellInfo->Effect[i] == SPELL_EFFECT_APPLY_AURA)
{
@@ -777,7 +776,7 @@ bool SpellMgr::_isPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) con
}
// Special case: effects which determine positivity of whole spell
- for (uint8 i = 0;i<MAX_SPELL_EFFECTS;++i)
+ for (uint8 i = 0; i<MAX_SPELL_EFFECTS; ++i)
{
if (spellproto->EffectApplyAuraName[i] == SPELL_AURA_MOD_STEALTH)
return true;
@@ -855,7 +854,7 @@ bool SpellMgr::_isPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) con
if(spellTriggeredProto)
{
// non-positive targets of main spell return early
- for(int i = 0; i < 3; ++i)
+ for (int i = 0; i < 3; ++i)
{
if (!spellTriggeredProto->Effect[i])
continue;
@@ -947,7 +946,7 @@ bool SpellMgr::_isPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) con
if (!deep)
{
bool negative = true;
- for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i)
+ for (uint8 i=0; i<MAX_SPELL_EFFECTS; ++i)
{
if (i != effIndex)
if (_isPositiveEffect(spellId, i, true))
@@ -1173,7 +1172,7 @@ void SpellMgr::LoadSpellTargetPositions()
}
bool found = false;
- for(int i = 0; i < 3; ++i)
+ for (int i = 0; i < 3; ++i)
{
if( spellInfo->EffectImplicitTargetA[i]==TARGET_DST_DB || spellInfo->EffectImplicitTargetB[i]==TARGET_DST_DB )
{
@@ -1206,14 +1205,14 @@ void SpellMgr::LoadSpellTargetPositions()
} while( result->NextRow() );
// Check all spells
- for(uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
+ for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
{
SpellEntry const * spellInfo = sSpellStore.LookupEntry(i);
if(!spellInfo)
continue;
bool found = false;
- for(int j = 0; j < 3; ++j)
+ for (int j = 0; j < 3; ++j)
{
switch(spellInfo->EffectImplicitTargetA[j])
{
@@ -1653,7 +1652,6 @@ bool SpellMgr::canStackSpellRanks(SpellEntry const *spellInfo)
return true;
}
-
bool SpellMgr::IsProfessionOrRidingSpell(uint32 spellId)
{
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
@@ -1705,7 +1703,7 @@ bool SpellMgr::IsSkillBonusSpell(uint32 spellId) const
{
SkillLineAbilityMapBounds bounds = GetSkillLineAbilityMapBounds(spellId);
- for(SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
+ for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
{
SkillLineAbilityEntry const *pAbility = _spell_idx->second;
if (!pAbility || pAbility->learnOnGetSkill != ABILITY_LEARNED_ON_GET_PROFESSION_SKILL)
@@ -1725,7 +1723,7 @@ SpellEntry const* SpellMgr::SelectAuraRankForPlayerLevel(SpellEntry const* spell
return spellInfo;
bool needRankSelection = false;
- for(int i=0;i<3;++i)
+ for (int i=0; i<3; ++i)
{
if( IsPositiveEffect(spellInfo->Id, i) && (
spellInfo->Effect[i] == SPELL_EFFECT_APPLY_AURA ||
@@ -1742,7 +1740,7 @@ SpellEntry const* SpellMgr::SelectAuraRankForPlayerLevel(SpellEntry const* spell
if(!needRankSelection)
return spellInfo;
- for(uint32 nextSpellId = spellInfo->Id; nextSpellId != 0; nextSpellId = GetPrevSpellInChain(nextSpellId))
+ for (uint32 nextSpellId = spellInfo->Id; nextSpellId != 0; nextSpellId = GetPrevSpellInChain(nextSpellId))
{
SpellEntry const *nextSpellInfo = sSpellStore.LookupEntry(nextSpellId);
if(!nextSpellInfo)
@@ -1759,7 +1757,6 @@ SpellEntry const* SpellMgr::SelectAuraRankForPlayerLevel(SpellEntry const* spell
return NULL;
}
-
void SpellMgr::LoadSpellLearnSkills()
{
mSpellLearnSkills.clear(); // need for reload case
@@ -1767,7 +1764,7 @@ void SpellMgr::LoadSpellLearnSkills()
// search auto-learned skills and add its to map also for use in unlearn spells/talents
uint32 dbc_count = 0;
barGoLink bar( sSpellStore.GetNumRows() );
- for(uint32 spell = 0; spell < sSpellStore.GetNumRows(); ++spell)
+ for (uint32 spell = 0; spell < sSpellStore.GetNumRows(); ++spell)
{
bar.step();
SpellEntry const* entry = sSpellStore.LookupEntry(spell);
@@ -1775,7 +1772,7 @@ void SpellMgr::LoadSpellLearnSkills()
if(!entry)
continue;
- for(int i = 0; i < 3; ++i)
+ for (int i = 0; i < 3; ++i)
{
if(entry->Effect[i]==SPELL_EFFECT_SKILL)
{
@@ -1859,14 +1856,14 @@ void SpellMgr::LoadSpellLearnSpells()
// search auto-learned spells and add its to map also for use in unlearn spells/talents
uint32 dbc_count = 0;
- for(uint32 spell = 0; spell < sSpellStore.GetNumRows(); ++spell)
+ for (uint32 spell = 0; spell < sSpellStore.GetNumRows(); ++spell)
{
SpellEntry const* entry = sSpellStore.LookupEntry(spell);
if(!entry)
continue;
- for(int i = 0; i < 3; ++i)
+ for (int i = 0; i < 3; ++i)
{
if(entry->Effect[i]==SPELL_EFFECT_LEARN_SPELL)
{
@@ -1886,7 +1883,7 @@ void SpellMgr::LoadSpellLearnSpells()
SpellLearnSpellMapBounds db_node_bounds = GetSpellLearnSpellMapBounds(spell);
bool found = false;
- for(SpellLearnSpellMap::const_iterator itr = db_node_bounds.first; itr != db_node_bounds.second; ++itr)
+ for (SpellLearnSpellMap::const_iterator itr = db_node_bounds.first; itr != db_node_bounds.second; ++itr)
{
if(itr->second.spell == dbc_node.spell)
{
@@ -1949,7 +1946,7 @@ void SpellMgr::LoadSpellScriptTarget()
}
/*bool targetfound = false;
- for(int i = 0; i <3; ++i)
+ for (int i = 0; i <3; ++i)
{
if( spellProto->EffectImplicitTargetA[i]==TARGET_UNIT_NEARBY_ENTRY ||
spellProto->EffectImplicitTargetB[i]==TARGET_UNIT_NEARBY_ENTRY ||
@@ -2021,14 +2018,14 @@ void SpellMgr::LoadSpellScriptTarget()
delete result;
// Check all spells
- for(uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
+ for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
{
SpellEntry const * spellInfo = sSpellStore.LookupEntry(i);
if(!spellInfo)
continue;
bool found = false;
- for(int j = 0; j < 3; ++j)
+ for (int j = 0; j < 3; ++j)
{
switch(spellInfo->EffectImplicitTargetA[j])
{
@@ -2186,7 +2183,7 @@ void SpellMgr::LoadPetLevelupSpellMap()
if(spellSet.empty())
++family_count;
- spellSet.insert(PetLevelupSpellSet::value_type(spell->spellLevel,spell->Id));
+ spellSet.insert(PetLevelupSpellSet::value_type(spell->spellLevel,spell->Id));
count++;
}
}
@@ -2200,7 +2197,7 @@ bool LoadPetDefaultSpells_helper(CreatureInfo const* cInfo, PetDefaultSpellsEntr
{
// skip empty list;
bool have_spell = false;
- for(int j = 0; j < MAX_CREATURE_SPELL_DATA_SLOT; ++j)
+ for (int j = 0; j < MAX_CREATURE_SPELL_DATA_SLOT; ++j)
{
if(petDefSpells.spellid[j])
{
@@ -2214,12 +2211,12 @@ bool LoadPetDefaultSpells_helper(CreatureInfo const* cInfo, PetDefaultSpellsEntr
// remove duplicates with levelupSpells if any
if(PetLevelupSpellSet const *levelupSpells = cInfo->family ? spellmgr.GetPetLevelupSpellList(cInfo->family) : NULL)
{
- for(int j = 0; j < MAX_CREATURE_SPELL_DATA_SLOT; ++j)
+ for (int j = 0; j < MAX_CREATURE_SPELL_DATA_SLOT; ++j)
{
if(!petDefSpells.spellid[j])
continue;
- for(PetLevelupSpellSet::const_iterator itr = levelupSpells->begin(); itr != levelupSpells->end(); ++itr)
+ for (PetLevelupSpellSet::const_iterator itr = levelupSpells->begin(); itr != levelupSpells->end(); ++itr)
{
if (itr->second == petDefSpells.spellid[j])
{
@@ -2232,7 +2229,7 @@ bool LoadPetDefaultSpells_helper(CreatureInfo const* cInfo, PetDefaultSpellsEntr
// skip empty list;
have_spell = false;
- for(int j = 0; j < MAX_CREATURE_SPELL_DATA_SLOT; ++j)
+ for (int j = 0; j < MAX_CREATURE_SPELL_DATA_SLOT; ++j)
{
if(petDefSpells.spellid[j])
{
@@ -2251,7 +2248,7 @@ void SpellMgr::LoadPetDefaultSpells()
uint32 countCreature = 0;
uint32 countData = 0;
- for(uint32 i = 0; i < sCreatureStorage.MaxEntry; ++i )
+ for (uint32 i = 0; i < sCreatureStorage.MaxEntry; ++i )
{
CreatureInfo const* cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(i);
if(!cInfo)
@@ -2267,7 +2264,7 @@ void SpellMgr::LoadPetDefaultSpells()
int32 petSpellsId = -(int32)cInfo->PetSpellDataId;
PetDefaultSpellsEntry petDefSpells;
- for(int j = 0; j < MAX_CREATURE_SPELL_DATA_SLOT; ++j)
+ for (int j = 0; j < MAX_CREATURE_SPELL_DATA_SLOT; ++j)
petDefSpells.spellid[j] = spellDataEntry->spellId[j];
if(LoadPetDefaultSpells_helper(cInfo, petDefSpells))
@@ -2278,13 +2275,13 @@ void SpellMgr::LoadPetDefaultSpells()
}
// different summon spells
- for(uint32 i = 0; i < sSpellStore.GetNumRows(); ++i )
+ for (uint32 i = 0; i < sSpellStore.GetNumRows(); ++i )
{
SpellEntry const* spellEntry = sSpellStore.LookupEntry(i);
if(!spellEntry)
continue;
- for(int k = 0; k < 3; ++k)
+ for (int k = 0; k < 3; ++k)
{
if(spellEntry->Effect[k]==SPELL_EFFECT_SUMMON || spellEntry->Effect[k]==SPELL_EFFECT_SUMMON_PET)
{
@@ -2303,7 +2300,7 @@ void SpellMgr::LoadPetDefaultSpells()
continue;
PetDefaultSpellsEntry petDefSpells;
- for(int j = 0; j < MAX_CREATURE_SPELL_DATA_SLOT; ++j)
+ for (int j = 0; j < MAX_CREATURE_SPELL_DATA_SLOT; ++j)
petDefSpells.spellid[j] = cInfo->spells[j];
if(LoadPetDefaultSpells_helper(cInfo, petDefSpells))
@@ -2329,7 +2326,7 @@ bool SpellMgr::IsSpellValid(SpellEntry const* spellInfo, Player* pl, bool msg)
bool need_check_reagents = false;
// check effects
- for(int i=0; i<3; ++i)
+ for (int i=0; i<3; ++i)
{
switch(spellInfo->Effect[i])
{
@@ -2376,7 +2373,7 @@ bool SpellMgr::IsSpellValid(SpellEntry const* spellInfo, Player* pl, bool msg)
if(need_check_reagents)
{
- for(int j = 0; j < 8; ++j)
+ for (int j = 0; j < 8; ++j)
{
if(spellInfo->Reagent[j] > 0 && !ObjectMgr::GetItemPrototype( spellInfo->Reagent[j] ))
{
@@ -2453,7 +2450,7 @@ void SpellMgr::LoadSpellAreas()
{
bool ok = true;
SpellAreaMapBounds sa_bounds = GetSpellAreaMapBounds(spellArea.spellId);
- for(SpellAreaMap::const_iterator itr = sa_bounds.first; itr != sa_bounds.second; ++itr)
+ for (SpellAreaMap::const_iterator itr = sa_bounds.first; itr != sa_bounds.second; ++itr)
{
if (spellArea.spellId != itr->second.spellId)
continue;
@@ -2539,7 +2536,7 @@ void SpellMgr::LoadSpellAreas()
{
bool chain = false;
SpellAreaForAuraMapBounds saBound = GetSpellAreaForAuraMapBounds(spellArea.spellId);
- for(SpellAreaForAuraMap::const_iterator itr = saBound.first; itr != saBound.second; ++itr)
+ for (SpellAreaForAuraMap::const_iterator itr = saBound.first; itr != saBound.second; ++itr)
{
if(itr->second->autocast && itr->second->auraSpell > 0)
{
@@ -2555,7 +2552,7 @@ void SpellMgr::LoadSpellAreas()
}
SpellAreaMapBounds saBound2 = GetSpellAreaMapBounds(spellArea.auraSpell);
- for(SpellAreaMap::const_iterator itr2 = saBound2.first; itr2 != saBound2.second; ++itr2)
+ for (SpellAreaMap::const_iterator itr2 = saBound2.first; itr2 != saBound2.second; ++itr2)
{
if(itr2->second.autocast && itr2->second.auraSpell > 0)
{
@@ -2633,7 +2630,7 @@ SpellCastResult SpellMgr::GetSpellAllowedInLocationError(SpellEntry const *spell
// Try search in next group
groupEntry = sAreaGroupStore.LookupEntry(groupEntry->nextGroup);
}
-
+
if (!found)
return SPELL_FAILED_INCORRECT_AREA;
}
@@ -2659,7 +2656,7 @@ SpellCastResult SpellMgr::GetSpellAllowedInLocationError(SpellEntry const *spell
SpellAreaMapBounds saBounds = spellmgr.GetSpellAreaMapBounds(spellInfo->Id);
if (saBounds.first != saBounds.second)
{
- for(SpellAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
+ for (SpellAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
{
if(itr->second.IsFitToRequirements(player,zone_id,area_id))
return SPELL_CAST_OK;
@@ -3071,9 +3068,9 @@ bool SpellMgr::CanAurasStack(SpellEntry const *spellInfo_1, SpellEntry const *sp
if(spellInfo_1->AttributesEx & SPELL_ATTR_EX_STACK_FOR_DIFF_CASTERS
|| spellInfo_1->AttributesEx3 & SPELL_ATTR_EX3_STACK_FOR_DIFF_CASTERS)
return true;
-
+
// check same periodic auras
- for(uint32 i = 0; i < 3; ++i)
+ for (uint32 i = 0; i < 3; ++i)
{
// area auras should not stack (shaman totem)
if(spellInfo_1->Effect[i] != SPELL_EFFECT_APPLY_AURA
@@ -3138,7 +3135,7 @@ bool SpellMgr::CanAurasStack(SpellEntry const *spellInfo_1, SpellEntry const *sp
spellInfo_2 = sSpellStore.LookupEntry(spellId_2);
//if spells do not have the same effect or aura or miscvalue, they will stack
- for(uint32 i = 0; i < 3; ++i)
+ for (uint32 i = 0; i < 3; ++i)
if(spellInfo_1->Effect[i] != spellInfo_2->Effect[i]
|| spellInfo_1->EffectApplyAuraName[i] != spellInfo_2->EffectApplyAuraName[i]
|| spellInfo_1->EffectMiscValue[i] != spellInfo_2->EffectMiscValue[i]) // paladin resist aura
@@ -3302,7 +3299,7 @@ void SpellMgr::LoadSpellChains()
mSpellChains.clear(); // need for reload case
std::vector<uint32> ChainedSpells;
- for (uint32 ability_id=0;ability_id<sSkillLineAbilityStore.GetNumRows();ability_id++)
+ for (uint32 ability_id=0; ability_id<sSkillLineAbilityStore.GetNumRows(); ability_id++)
{
SkillLineAbilityEntry const *AbilityInfo=sSkillLineAbilityStore.LookupEntry(ability_id);
if (!AbilityInfo)
@@ -3314,7 +3311,7 @@ void SpellMgr::LoadSpellChains()
std::multimap<SpellRankEntry, SpellRankValue> RankMap;
- for (uint32 ability_id=0;ability_id<sSkillLineAbilityStore.GetNumRows();ability_id++)
+ for (uint32 ability_id=0; ability_id<sSkillLineAbilityStore.GetNumRows(); ability_id++)
{
SkillLineAbilityEntry const *AbilityInfo=sSkillLineAbilityStore.LookupEntry(ability_id);
if (!AbilityInfo)
@@ -3356,7 +3353,7 @@ void SpellMgr::LoadSpellChains()
entry.ManaCost=SpellInfo->manaCost;
entry.CastingTimeIndex=0;
entry.TalentID=0;
- for (;;)
+ for (; ; )
{
AbilityInfo=mSkillLineAbilityMap.lower_bound(spell_id)->second;
value.Id=spell_id;
@@ -3374,12 +3371,12 @@ void SpellMgr::LoadSpellChains()
uint32 count=0;
- for (std::multimap<SpellRankEntry, SpellRankValue>::iterator itr = RankMap.begin();itr!=RankMap.end();)
+ for (std::multimap<SpellRankEntry, SpellRankValue>::iterator itr = RankMap.begin(); itr!=RankMap.end(); )
{
SpellRankEntry entry=itr->first;
//trac errors in extracted data
std::multimap<char const *, std::multimap<SpellRankEntry, SpellRankValue>::iterator> RankErrorMap;
- for (std::multimap<SpellRankEntry, SpellRankValue>::iterator itr2 = RankMap.lower_bound(entry);itr2!=RankMap.upper_bound(entry);itr2++)
+ for (std::multimap<SpellRankEntry, SpellRankValue>::iterator itr2 = RankMap.lower_bound(entry); itr2!=RankMap.upper_bound(entry); itr2++)
{
bar.step();
RankErrorMap.insert(std::pair<char const *, std::multimap<SpellRankEntry, SpellRankValue>::iterator>(itr2->second.Rank,itr2));
@@ -3389,7 +3386,7 @@ void SpellMgr::LoadSpellChains()
//if strict == true strict check is not needed
if (!itr->second.strict)
//check for rank duplicates, if there are any do strict check
- for (std::multimap<char const *, std::multimap<SpellRankEntry, SpellRankValue>::iterator>::iterator itr2 = RankErrorMap.begin();itr2!=RankErrorMap.end();)
+ for (std::multimap<char const *, std::multimap<SpellRankEntry, SpellRankValue>::iterator>::iterator itr2 = RankErrorMap.begin(); itr2!=RankErrorMap.end(); )
{
char const * err_entry=itr2->first;
uint32 rank_count=RankErrorMap.count(itr2->first);
@@ -3405,7 +3402,7 @@ void SpellMgr::LoadSpellChains()
if (error)
{
std::list<uint32> ConflictedSpells;
- for (std::multimap<SpellRankEntry, SpellRankValue>::iterator itr2 = RankMap.lower_bound(entry);itr2!=RankMap.upper_bound(entry);itr2=RankMap.lower_bound(entry))
+ for (std::multimap<SpellRankEntry, SpellRankValue>::iterator itr2 = RankMap.lower_bound(entry); itr2!=RankMap.upper_bound(entry); itr2=RankMap.lower_bound(entry))
{
ConflictedSpells.push_back(itr2->second.Id);
if (!GetTalentSpellPos(itr2->second.Id))
@@ -3413,7 +3410,7 @@ void SpellMgr::LoadSpellChains()
RankMap.erase(itr2);
}
SpellRankEntry nextEntry, currEntry;
- for (;!ConflictedSpells.empty();ConflictedSpells.pop_front())
+ for (; !ConflictedSpells.empty(); ConflictedSpells.pop_front())
{
SpellEntry const *SpellInfo=sSpellStore.LookupEntry(ConflictedSpells.front());
currEntry.SkillId=entry.SkillId;
@@ -3452,12 +3449,12 @@ void SpellMgr::LoadSpellChains()
continue;
}
else
- for (std::multimap<char const *, std::multimap<SpellRankEntry, SpellRankValue>::iterator>::iterator itr2 = RankErrorMap.begin();itr2!=RankErrorMap.end();)
+ for (std::multimap<char const *, std::multimap<SpellRankEntry, SpellRankValue>::iterator>::iterator itr2 = RankErrorMap.begin(); itr2!=RankErrorMap.end(); )
{
char const * err_entry=itr2->first;
uint32 rank_count=RankErrorMap.count(itr2->first);
if (rank_count>1)
- for (itr2 = RankErrorMap.lower_bound(err_entry);itr2!=RankErrorMap.upper_bound(err_entry);itr2++)
+ for (itr2 = RankErrorMap.lower_bound(err_entry); itr2!=RankErrorMap.upper_bound(err_entry); itr2++)
{
sLog.outDebug("There is a duplicate rank entry (%s) for spell: %u",itr2->first,itr2->second->second.Id);
if (!(itr2->second->second.Id==47541 || itr2->second->second.Id==45902 || itr2->second->second.Id==7620))
@@ -3474,9 +3471,9 @@ void SpellMgr::LoadSpellChains()
std::list<uint32> RankedSpells;
uint32 min_spell_lvl=0;
std::multimap<SpellRankEntry, SpellRankValue>::iterator min_itr;
- for (;RankMap.count(entry);)
+ for (; RankMap.count(entry); )
{
- for (std::multimap<SpellRankEntry, SpellRankValue>::iterator itr2 = RankMap.lower_bound(entry);itr2!=RankMap.upper_bound(entry);itr2++)
+ for (std::multimap<SpellRankEntry, SpellRankValue>::iterator itr2 = RankMap.lower_bound(entry); itr2!=RankMap.upper_bound(entry); itr2++)
{
SpellEntry const *SpellInfo=sSpellStore.LookupEntry(itr2->second.Id);
if (SpellInfo->spellLevel<min_spell_lvl || itr2==RankMap.lower_bound(entry))
@@ -3491,7 +3488,7 @@ void SpellMgr::LoadSpellChains()
//use data from talent.dbc
uint16 talent_id=0;
- for(std::list<uint32>::iterator itr2 = RankedSpells.begin();itr2!=RankedSpells.end();)
+ for (std::list<uint32>::iterator itr2 = RankedSpells.begin(); itr2!=RankedSpells.end(); )
{
if (TalentSpellPos const* TalentPos=GetTalentSpellPos(*itr2))
{
@@ -3505,7 +3502,7 @@ void SpellMgr::LoadSpellChains()
if (talent_id)
{
TalentEntry const *TalentInfo = sTalentStore.LookupEntry(talent_id);
- for (uint8 rank=5;rank;rank--)
+ for (uint8 rank=5; rank; rank--)
{
if (TalentInfo->RankID[rank-1])
RankedSpells.push_front(TalentInfo->RankID[rank-1]);
@@ -3520,7 +3517,7 @@ void SpellMgr::LoadSpellChains()
count++;
uint32 spell_rank=1;
- for(std::list<uint32>::iterator itr2 = RankedSpells.begin();itr2!=RankedSpells.end();spell_rank++)
+ for (std::list<uint32>::iterator itr2 = RankedSpells.begin(); itr2!=RankedSpells.end(); spell_rank++)
{
uint32 spell_id=*itr2;
mSpellChains[spell_id].rank=spell_rank;
@@ -3542,7 +3539,7 @@ void SpellMgr::LoadSpellChains()
}
//uncomment these two lines to print yourself list of spell_chains on startup
- //for (UNORDERED_MAP<uint32, SpellChainNode>::iterator itr=mSpellChains.begin();itr!=mSpellChains.end();itr++)
+ //for (UNORDERED_MAP<uint32, SpellChainNode>::iterator itr=mSpellChains.begin(); itr!=mSpellChains.end(); itr++)
//sLog.outString( "Id: %u, Rank: %d , %s, %u, %u, %u, %u",itr->first,itr->second.rank, sSpellStore.LookupEntry(itr->first)->Rank[sWorld.GetDefaultDbcLocale()], itr->second.first, itr->second.last,itr->second.next ,itr->second.prev);
sLog.outString();
@@ -3555,14 +3552,14 @@ void SpellMgr::LoadSpellCustomAttr()
mSpellCustomAttr.resize(GetSpellStore()->GetNumRows());
SpellEntry *spellInfo;
- for(uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i)
+ for (uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i)
{
mSpellCustomAttr[i] = 0;
spellInfo = (SpellEntry*)GetSpellStore()->LookupEntry(i);
if(!spellInfo)
continue;
- for(uint32 j = 0; j < 3; ++j)
+ for (uint32 j = 0; j < 3; ++j)
{
switch(spellInfo->EffectApplyAuraName[j])
{
@@ -3615,7 +3612,7 @@ void SpellMgr::LoadSpellCustomAttr()
}
}
- for(uint32 j = 0; j < 3; ++j)
+ for (uint32 j = 0; j < 3; ++j)
{
switch(spellInfo->EffectApplyAuraName[j])
{
@@ -3837,10 +3834,10 @@ void SpellMgr::LoadEnchantCustomAttr()
uint32 size = sSpellItemEnchantmentStore.GetNumRows();
mEnchantCustomAttr.resize(size);
- for (uint32 i = 0;i<size; ++i)
+ for (uint32 i = 0; i<size; ++i)
mEnchantCustomAttr[i] = 0;
- for(uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i)
+ for (uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i)
{
SpellEntry * spellInfo = (SpellEntry*)GetSpellStore()->LookupEntry(i);
if(!spellInfo)
@@ -3850,7 +3847,7 @@ void SpellMgr::LoadEnchantCustomAttr()
if (!(spellInfo->AttributesEx2 & SPELL_ATTR_EX2_UNK13) || !(spellInfo->Attributes & SPELL_ATTR_NOT_SHAPESHIFT))
continue;
- for(uint32 j = 0; j < 3; ++j)
+ for (uint32 j = 0; j < 3; ++j)
{
if(spellInfo->Effect[j] == SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY)
{
@@ -3869,7 +3866,7 @@ bool SpellMgr::IsSkillTypeSpell(uint32 spellId, SkillType type) const
{
SkillLineAbilityMapBounds bounds = GetSkillLineAbilityMapBounds(spellId);
- for(SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
+ for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
if (_spell_idx->second->skillId == type)
return true;
diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h
index 9c7f4aca16a..da5a6affde7 100644
--- a/src/game/SpellMgr.h
+++ b/src/game/SpellMgr.h
@@ -205,7 +205,7 @@ inline float GetSpellMaxRange(uint32 id, bool positive)
inline bool IsSpellHaveEffect(SpellEntry const *spellInfo, SpellEffects effect)
{
- for(int i= 0; i < 3; ++i)
+ for (int i= 0; i < 3; ++i)
if(SpellEffects(spellInfo->Effect[i])==effect)
return true;
return false;
@@ -213,7 +213,7 @@ inline bool IsSpellHaveEffect(SpellEntry const *spellInfo, SpellEffects effect)
inline bool IsSpellHaveAura(SpellEntry const *spellInfo, AuraType aura)
{
- for(int i= 0; i < 3; ++i)
+ for (int i= 0; i < 3; ++i)
if(AuraType(spellInfo->EffectApplyAuraName[i])==aura)
return true;
return false;
@@ -267,7 +267,6 @@ inline bool IsPassiveSpellStackableWithRanks(SpellEntry const* spellProto)
return !IsSpellHaveEffect(spellProto,SPELL_EFFECT_APPLY_AURA);
}
-
inline bool IsDeathPersistentSpell(SpellEntry const *spellInfo)
{
return spellInfo->AttributesEx3 & SPELL_ATTR_EX3_DEATH_PERSISTENT;
@@ -321,7 +320,7 @@ inline bool IsPositionTarget(uint32 target)
inline bool IsSpellWithCasterSourceTargetsOnly(SpellEntry const* spellInfo)
{
- for(int i = 0; i < 3; ++i)
+ for (int i = 0; i < 3; ++i)
{
uint32 targetA = spellInfo->EffectImplicitTargetA[i];
if(targetA && !IsCasterSourceTarget(targetA))
@@ -699,7 +698,6 @@ typedef std::pair<SpellAreaForQuestMap::const_iterator,SpellAreaForQuestMap::con
typedef std::pair<SpellAreaForAuraMap::const_iterator, SpellAreaForAuraMap::const_iterator> SpellAreaForAuraMapBounds;
typedef std::pair<SpellAreaForAreaMap::const_iterator, SpellAreaForAreaMap::const_iterator> SpellAreaForAreaMapBounds;
-
// Spell rank chain (accessed using SpellMgr functions)
struct SpellChainNode
{
@@ -751,7 +749,6 @@ struct PetDefaultSpellsEntry
// < 0 for petspelldata id, > 0 for creature_id
typedef std::map<int32, PetDefaultSpellsEntry> PetDefaultSpellsMap;
-
inline bool IsPrimaryProfessionSkill(uint32 skill)
{
SkillLineEntry const *pSkill = sSkillLineStore.LookupEntry(skill);
@@ -975,7 +972,7 @@ class SpellMgr
return false;
// check present in same rank chain
- for(; itr != mSpellChains.end(); itr = mSpellChains.find(itr->second.prev))
+ for (; itr != mSpellChains.end(); itr = mSpellChains.find(itr->second.prev))
if(itr->second.prev==spell2)
return true;
@@ -1011,7 +1008,7 @@ class SpellMgr
bool IsSpellLearnToSpell(uint32 spell_id1,uint32 spell_id2) const
{
SpellLearnSpellMapBounds bounds = GetSpellLearnSpellMapBounds(spell_id1);
- for(SpellLearnSpellMap::const_iterator i = bounds.first; i != bounds.second; ++i)
+ for (SpellLearnSpellMap::const_iterator i = bounds.first; i != bounds.second; ++i)
if (i->second.spell==spell_id2)
return true;
return false;
@@ -1025,7 +1022,6 @@ class SpellMgr
bool IsSkillBonusSpell(uint32 spellId) const;
bool IsSkillTypeSpell(uint32 spellId, SkillType type) const;
-
// Spell script targets
SpellScriptTargetBounds GetSpellScriptTargetBounds(uint32 spell_id) const
{
@@ -1128,7 +1124,7 @@ class SpellMgr
inline bool IsSpellWithCasterSourceTargetsOnly(SpellEntry const* spellInfo)
{
- for(int i = 0; i < 3; ++i)
+ for (int i = 0; i < 3; ++i)
if(uint32 target = spellInfo->EffectImplicitTargetA[i])
if(!IsCasterSourceTarget(target))
return false;
diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp
index 56bde0e5442..1f0e828699c 100644
--- a/src/game/StatSystem.cpp
+++ b/src/game/StatSystem.cpp
@@ -98,7 +98,7 @@ bool Player::UpdateStats(Stats stat)
// Update ratings in exist SPELL_AURA_MOD_RATING_FROM_STAT and only depends from stat
uint32 mask = 0;
AuraEffectList const& modRatingFromStat = GetAurasByType(SPELL_AURA_MOD_RATING_FROM_STAT);
- for(AuraEffectList::const_iterator i = modRatingFromStat.begin();i != modRatingFromStat.end(); ++i)
+ for (AuraEffectList::const_iterator i = modRatingFromStat.begin(); i != modRatingFromStat.end(); ++i)
if (Stats((*i)->GetMiscBValue()) == stat)
mask |= (*i)->GetMiscValue();
if (mask)
@@ -116,7 +116,7 @@ void Player::ApplySpellPowerBonus(int32 amount, bool apply)
// For speed just update for client
ApplyModUInt32Value(PLAYER_FIELD_MOD_HEALING_DONE_POS, amount, apply);
- for(int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
+ for (int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS+i, amount, apply);;
}
@@ -127,7 +127,7 @@ void Player::UpdateSpellDamageAndHealingBonus()
// Get healing bonus for all schools
SetStatInt32Value(PLAYER_FIELD_MOD_HEALING_DONE_POS, SpellBaseHealingBonus(SPELL_SCHOOL_MASK_ALL));
// Get damage bonus for all schools
- for(int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
+ for (int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
SetStatInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS+i, SpellBaseDamageBonus(SpellSchoolMask(1 << i)));
}
@@ -144,7 +144,7 @@ bool Player::UpdateAllStats()
UpdateAttackPowerAndDamage(true);
UpdateMaxHealth();
- for(int i = POWER_MANA; i < MAX_POWERS; ++i)
+ for (int i = POWER_MANA; i < MAX_POWERS; ++i)
UpdateMaxPower(Powers(i));
UpdateAllCritPercentages();
@@ -189,7 +189,7 @@ void Player::UpdateArmor()
//add dynamic flat mods
AuraEffectList const& mResbyIntellect = GetAurasByType(SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT);
- for(AuraEffectList::const_iterator i = mResbyIntellect.begin();i != mResbyIntellect.end(); ++i)
+ for (AuraEffectList::const_iterator i = mResbyIntellect.begin(); i != mResbyIntellect.end(); ++i)
{
if((*i)->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL)
value += int32(GetStat(Stats((*i)->GetMiscBValue())) * (*i)->GetAmount() / 100.0f);
@@ -316,7 +316,7 @@ void Player::UpdateAttackPowerAndDamage(bool ranged )
case FORM_MOONKIN:
{
Unit::AuraEffectList const& mDummy = GetAurasByType(SPELL_AURA_DUMMY);
- for(Unit::AuraEffectList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr)
+ for (Unit::AuraEffectList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr)
{
// Predatory Strikes (effect 0)
if ((*itr)->GetEffIndex()==0 && (*itr)->GetSpellProto()->SpellIconID == 1563)
@@ -361,18 +361,18 @@ void Player::UpdateAttackPowerAndDamage(bool ranged )
if ((getClassMask() & CLASSMASK_WAND_USERS)==0)
{
AuraEffectList const& mRAPbyStat = GetAurasByType(SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT);
- for(AuraEffectList::const_iterator i = mRAPbyStat.begin();i != mRAPbyStat.end(); ++i)
+ for (AuraEffectList::const_iterator i = mRAPbyStat.begin(); i != mRAPbyStat.end(); ++i)
attPowerMod += int32(GetStat(Stats((*i)->GetMiscValue())) * (*i)->GetAmount() / 100.0f);
}
}
else
{
AuraEffectList const& mAPbyStat = GetAurasByType(SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT);
- for(AuraEffectList::const_iterator i = mAPbyStat.begin();i != mAPbyStat.end(); ++i)
+ for (AuraEffectList::const_iterator i = mAPbyStat.begin(); i != mAPbyStat.end(); ++i)
attPowerMod += int32(GetStat(Stats((*i)->GetMiscValue())) * (*i)->GetAmount() / 100.0f);
AuraEffectList const& mAPbyArmor = GetAurasByType(SPELL_AURA_MOD_ATTACK_POWER_OF_ARMOR);
- for(AuraEffectList::const_iterator iter = mAPbyArmor.begin(); iter != mAPbyArmor.end(); ++iter)
+ for (AuraEffectList::const_iterator iter = mAPbyArmor.begin(); iter != mAPbyArmor.end(); ++iter)
// always: ((*i)->GetModifier()->m_miscvalue == 1 == SPELL_SCHOOL_MASK_NORMAL)
attPowerMod += int32(GetArmor() / (*iter)->GetAmount());
}
@@ -666,7 +666,7 @@ void Player::UpdateExpertise(WeaponAttackType attack)
Item *weapon = GetWeaponForAttack(attack);
AuraEffectList const& expAuras = GetAurasByType(SPELL_AURA_MOD_EXPERTISE);
- for(AuraEffectList::const_iterator itr = expAuras.begin(); itr != expAuras.end(); ++itr)
+ for (AuraEffectList::const_iterator itr = expAuras.begin(); itr != expAuras.end(); ++itr)
{
// item neutral spell
if((*itr)->GetSpellProto()->EquippedItemClass == -1)
@@ -706,7 +706,7 @@ void Player::UpdateManaRegen()
// Get bonus from SPELL_AURA_MOD_MANA_REGEN_FROM_STAT aura
AuraEffectList const& regenAura = GetAurasByType(SPELL_AURA_MOD_MANA_REGEN_FROM_STAT);
- for(AuraEffectList::const_iterator i = regenAura.begin();i != regenAura.end(); ++i)
+ for (AuraEffectList::const_iterator i = regenAura.begin(); i != regenAura.end(); ++i)
{
power_regen_mp5 += GetStat(Stats((*i)->GetMiscValue())) * (*i)->GetAmount() / 500.0f;
}
@@ -761,10 +761,10 @@ bool Creature::UpdateAllStats()
UpdateAttackPowerAndDamage();
UpdateAttackPowerAndDamage(true);
- for(int i = POWER_MANA; i < MAX_POWERS; ++i)
+ for (int i = POWER_MANA; i < MAX_POWERS; ++i)
UpdateMaxPower(Powers(i));
- for(int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i)
+ for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i)
UpdateResistances(i);
return true;
@@ -955,7 +955,7 @@ bool Guardian::UpdateAllStats()
for (int i = STAT_STRENGTH; i < MAX_STATS; ++i)
UpdateStats(Stats(i));
- for(int i = POWER_MANA; i < MAX_POWERS; ++i)
+ for (int i = POWER_MANA; i < MAX_POWERS; ++i)
UpdateMaxPower(Powers(i));
for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i)
diff --git a/src/game/TaxiHandler.cpp b/src/game/TaxiHandler.cpp
index 45c3cbd871b..a1f0bedf329 100644
--- a/src/game/TaxiHandler.cpp
+++ b/src/game/TaxiHandler.cpp
@@ -174,7 +174,7 @@ void WorldSession::HandleActivateTaxiExpressOpcode ( WorldPacket & recv_data )
}
std::vector<uint32> nodes;
- for(uint32 i = 0; i < node_count; ++i)
+ for (uint32 i = 0; i < node_count; ++i)
{
uint32 node;
recv_data >> node;
diff --git a/src/game/ThreatManager.cpp b/src/game/ThreatManager.cpp
index 11e4f2ab61e..7b8f8ec7432 100644
--- a/src/game/ThreatManager.cpp
+++ b/src/game/ThreatManager.cpp
@@ -201,7 +201,7 @@ Unit* HostilReference::getSourceUnit()
void ThreatContainer::clearReferences()
{
- for(std::list<HostilReference*>::const_iterator i = iThreatList.begin(); i != iThreatList.end(); ++i)
+ for (std::list<HostilReference*>::const_iterator i = iThreatList.begin(); i != iThreatList.end(); ++i)
{
(*i)->unlink();
delete (*i);
@@ -214,9 +214,9 @@ void ThreatContainer::clearReferences()
HostilReference* ThreatContainer::getReferenceByTarget(Unit* pVictim)
{
HostilReference* result = NULL;
-
+
uint64 guid = pVictim->GetGUID();
- for(std::list<HostilReference*>::const_iterator i = iThreatList.begin(); i != iThreatList.end(); ++i)
+ for (std::list<HostilReference*>::const_iterator i = iThreatList.begin(); i != iThreatList.end(); ++i)
{
if((*i)->getUnitGuid() == guid)
{
@@ -280,7 +280,7 @@ HostilReference* ThreatContainer::selectNextVictim(Creature* pAttacker, HostilRe
std::list<HostilReference*>::const_iterator lastRef = iThreatList.end();
lastRef--;
- for(std::list<HostilReference*>::const_iterator iter = iThreatList.begin(); iter != iThreatList.end() && !found;)
+ for (std::list<HostilReference*>::const_iterator iter = iThreatList.begin(); iter != iThreatList.end() && !found; )
{
currentRef = (*iter);
diff --git a/src/game/TicketHandler.cpp b/src/game/TicketHandler.cpp
index 2ac0c601edc..ac6675beba0 100644
--- a/src/game/TicketHandler.cpp
+++ b/src/game/TicketHandler.cpp
@@ -47,7 +47,7 @@ void WorldSession::HandleGMTicketCreateOpcode( WorldPacket & recv_data )
recv_data >> ticketText;
recv_data >> ticketText2;
- GM_Ticket *ticket = new GM_Ticket;
+ GM_Ticket *ticket = new GM_Ticket;
ticket->name = GetPlayer()->GetName();
ticket->guid = objmgr.GenerateGMTicketId();
ticket->playerGuid = GetPlayer()->GetGUID();
diff --git a/src/game/Totem.cpp b/src/game/Totem.cpp
index f841ac2fd9c..106efdfd5a8 100644
--- a/src/game/Totem.cpp
+++ b/src/game/Totem.cpp
@@ -90,7 +90,7 @@ void Totem::InitSummon()
SendMessageToSet(&data, true);
if(m_type == TOTEM_PASSIVE)
- CastSpell(this, GetSpell(), true);
+ CastSpell(this, GetSpell(), true);
// Some totems can have both instant effect and passive spell
if (GetSpell(1))
@@ -105,7 +105,7 @@ void Totem::UnSummon()
RemoveAurasDueToSpell(GetSpell());
// clear owenr's totem slot
- for(int i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i)
+ for (int i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i)
{
if(m_owner->m_SummonSlot[i]==GetGUID())
{
@@ -124,7 +124,7 @@ void Totem::UnSummon()
pGroup = ((Player*)m_owner)->GetGroup();
if (pGroup)
{
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* Target = itr->getSource();
if(Target && pGroup->SameSubGroup((Player*)m_owner, Target))
diff --git a/src/game/TradeHandler.cpp b/src/game/TradeHandler.cpp
index b4cc62ba39a..e09e1abb812 100644
--- a/src/game/TradeHandler.cpp
+++ b/src/game/TradeHandler.cpp
@@ -134,7 +134,7 @@ void WorldSession::SendUpdateTrade()
data << (uint32) _player->pTrader->tradeGold; // trader gold
data << (uint32) 0; // spell casted on lowest slot item
- for(uint8 i = 0; i < TRADE_SLOT_COUNT; ++i)
+ for (uint8 i = 0; i < TRADE_SLOT_COUNT; ++i)
{
item = (_player->pTrader->tradeItems[i] != NULL_SLOT ? _player->pTrader->GetItemByPos( _player->pTrader->tradeItems[i] ) : NULL);
@@ -151,7 +151,7 @@ void WorldSession::SendUpdateTrade()
// gift creator
data << (uint64) item->GetUInt64Value(ITEM_FIELD_GIFTCREATOR);
data << (uint32) item->GetEnchantmentId(PERM_ENCHANTMENT_SLOT);
- for(uint8 j = 0; j < 3; ++j)
+ for (uint8 j = 0; j < 3; ++j)
data << (uint32) 0; // enchantment id (permanent/gems?)
// creator
data << (uint64) item->GetUInt64Value(ITEM_FIELD_CREATOR);
@@ -167,7 +167,7 @@ void WorldSession::SendUpdateTrade()
}
else
{
- for(uint8 j = 0; j < 18; j++)
+ for (uint8 j = 0; j < 18; j++)
data << uint32(0);
}
}
@@ -179,7 +179,7 @@ void WorldSession::SendUpdateTrade()
void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
{
- for(int i=0; i<TRADE_SLOT_TRADED_COUNT; ++i)
+ for (int i=0; i<TRADE_SLOT_TRADED_COUNT; ++i)
{
ItemPosCountVec traderDst;
ItemPosCountVec playerDst;
@@ -278,7 +278,7 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
}
// not accept if some items now can't be trade (cheating)
- for(int i=0; i<TRADE_SLOT_TRADED_COUNT; ++i)
+ for (int i=0; i<TRADE_SLOT_TRADED_COUNT; ++i)
{
if(_player->tradeItems[i] != NULL_SLOT )
{
@@ -311,7 +311,7 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
_player->pTrader->GetSession()->SendTradeStatus(TRADE_STATUS_TRADE_ACCEPT);
// store items in local list and set 'in-trade' flag
- for(int i=0; i<TRADE_SLOT_TRADED_COUNT; ++i)
+ for (int i=0; i<TRADE_SLOT_TRADED_COUNT; ++i)
{
if(_player->tradeItems[i] != NULL_SLOT )
{
@@ -336,7 +336,7 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
myCanCompleteTrade = (_player->CanStoreItems( hisItems,TRADE_SLOT_TRADED_COUNT ) == EQUIP_ERR_OK);
// clear 'in-trade' flag
- for(int i=0; i<TRADE_SLOT_TRADED_COUNT; ++i)
+ for (int i=0; i<TRADE_SLOT_TRADED_COUNT; ++i)
{
if(myItems[i]) myItems[i]->SetInTrade(false);
if(hisItems[i]) hisItems[i]->SetInTrade(false);
@@ -361,7 +361,7 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
}
// execute trade: 1. remove
- for(int i=0; i<TRADE_SLOT_TRADED_COUNT; ++i)
+ for (int i=0; i<TRADE_SLOT_TRADED_COUNT; ++i)
{
if(myItems[i])
{
@@ -603,7 +603,7 @@ void WorldSession::HandleSetTradeItemOpcode(WorldPacket& recvPacket)
uint16 pos = (bag << 8) | slot;
// prevent place single item into many trade slots using cheating and client bugs
- for(int i = 0; i < TRADE_SLOT_COUNT; ++i)
+ for (int i = 0; i < TRADE_SLOT_COUNT; ++i)
{
if(_player->tradeItems[i]==pos)
{
diff --git a/src/game/Transports.cpp b/src/game/Transports.cpp
index 25248b7b9d2..03f6fced048 100644
--- a/src/game/Transports.cpp
+++ b/src/game/Transports.cpp
@@ -440,7 +440,7 @@ void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z)
Map const* oldMap = GetMap();
Relocate(x, y, z);
- for(PlayerSet::const_iterator itr = m_passengers.begin(); itr != m_passengers.end();)
+ for (PlayerSet::const_iterator itr = m_passengers.begin(); itr != m_passengers.end(); )
{
Player *plr = *itr;
++itr;
@@ -536,7 +536,7 @@ void Transport::Update(uint32 /*p_time*/)
}
*/
/*
- for(PlayerSet::const_iterator itr = m_passengers.begin(); itr != m_passengers.end();)
+ for (PlayerSet::const_iterator itr = m_passengers.begin(); itr != m_passengers.end(); )
{
PlayerSet::const_iterator it2 = itr;
++itr;
@@ -565,7 +565,7 @@ void Transport::UpdateForMap(Map const* targetMap)
if(GetMapId()==targetMap->GetId())
{
- for(Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
{
if(this != itr->getSource()->GetTransport())
{
@@ -584,7 +584,7 @@ void Transport::UpdateForMap(Map const* targetMap)
WorldPacket out_packet;
transData.BuildPacket(&out_packet);
- for(Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
+ for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
if(this != itr->getSource()->GetTransport())
itr->getSource()->SendDirectMessage(&out_packet);
}
diff --git a/src/game/Traveller.h b/src/game/Traveller.h
index 279af30428a..22200c719ec 100644
--- a/src/game/Traveller.h
+++ b/src/game/Traveller.h
@@ -104,7 +104,6 @@ inline float Traveller<Creature>::GetMoveDestinationTo(float x, float y, float z
// return sqrt((dx*dx) + (dy*dy));
}
-
template<>
inline void Traveller<Creature>::MoveTo(float x, float y, float z, uint32 t)
{
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 94a88fba710..c7ec4527fd6 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -121,7 +121,7 @@ Unit::Unit()
m_addDmgOnce = 0;
- for(uint8 i = 0; i < MAX_SUMMON_SLOT; ++i)
+ for (uint8 i = 0; i < MAX_SUMMON_SLOT; ++i)
m_SummonSlot[i] = 0;
m_ObjectSlot[0] = m_ObjectSlot[1] = m_ObjectSlot[2] = m_ObjectSlot[3] = 0;
@@ -182,7 +182,7 @@ Unit::Unit()
m_misdirectionTargetGUID = 0;
// remove aurastates allowing special moves
- for(uint8 i = 0; i < MAX_REACTIVE; ++i)
+ for (uint8 i = 0; i < MAX_REACTIVE; ++i)
m_reactiveTimer[i] = 0;
}
@@ -516,7 +516,7 @@ void Unit::RemoveMovementImpairingAuras()
RemoveAurasWithMechanic((1<<MECHANIC_SNARE)|(1<<MECHANIC_ROOT));
return;
- for(AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end();)
+ for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); )
{
if(spellmgr.GetSpellCustomAttr(iter->second->GetId()) & SPELL_ATTR_CU_MOVEMENT_IMPAIR)
RemoveAura(iter);
@@ -531,7 +531,7 @@ void Unit::RemoveAurasWithInterruptFlags(uint32 flag, uint32 except)
return;
// interrupt auras
- for (AuraList::iterator iter = m_interruptableAuras.begin(); iter != m_interruptableAuras.end();)
+ for (AuraList::iterator iter = m_interruptableAuras.begin(); iter != m_interruptableAuras.end(); )
{
Aura * aur = *iter;
++iter;
@@ -556,7 +556,7 @@ void Unit::RemoveAurasWithInterruptFlags(uint32 flag, uint32 except)
void Unit::RemoveAurasWithFamily(uint32 family, uint32 familyFlag1, uint32 familyFlag2, uint32 familyFlag3, uint64 casterGUID)
{
- for(AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end();)
+ for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); )
{
if (!casterGUID || iter->second->GetCasterGUID() == casterGUID)
{
@@ -573,7 +573,7 @@ void Unit::RemoveAurasWithFamily(uint32 family, uint32 familyFlag1, uint32 famil
void Unit::RemoveAurasWithMechanic(uint32 mechanic_mask, AuraRemoveMode removemode, uint32 except)
{
- for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end();)
+ for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); )
{
if (!except || iter->second->GetId() != except)
{
@@ -590,7 +590,7 @@ void Unit::RemoveAurasWithMechanic(uint32 mechanic_mask, AuraRemoveMode removemo
void Unit::UpdateInterruptMask()
{
m_interruptMask = 0;
- for(AuraList::const_iterator i = m_interruptableAuras.begin(); i != m_interruptableAuras.end(); ++i)
+ for (AuraList::const_iterator i = m_interruptableAuras.begin(); i != m_interruptableAuras.end(); ++i)
m_interruptMask |= (*i)->GetSpellProto()->AuraInterruptFlags;
if(Spell* spell = m_currentSpells[CURRENT_CHANNELED_SPELL])
@@ -602,7 +602,7 @@ bool Unit::HasAuraTypeWithFamilyFlags(AuraType auraType, uint32 familyName, uint
{
if(!HasAuraType(auraType)) return false;
AuraEffectList const &auras = GetAurasByType(auraType);
- for(AuraEffectList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
+ for (AuraEffectList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
if(SpellEntry const *iterSpellProto = (*itr)->GetSpellProto())
if(iterSpellProto->SpellFamilyName == familyName && iterSpellProto->SpellFamilyFlags[0] & familyFlags)
return true;
@@ -761,7 +761,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
if (pVictim->GetTypeId() == TYPEID_PLAYER)
((Player*)pVictim)->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HIT_RECEIVED, damage);
- else if(!pVictim->IsControlledByPlayer())
+ else if(!pVictim->IsControlledByPlayer())
{
//!pVictim->HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_OTHER_TAGGER)
if(!((Creature*)pVictim)->hasLootRecipient())
@@ -770,7 +770,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
if(IsControlledByPlayer())
((Creature*)pVictim)->LowerPlayerDamageReq(health < damage ? health : damage);
}
-
+
if (health <= damage)
{
DEBUG_LOG("DealDamage: victim just died");
@@ -933,7 +933,7 @@ void Unit::CastSpell(Unit* Victim,SpellEntry const *spellInfo, bool triggered, I
SpellCastTargets targets;
uint32 targetMask = spellInfo->Targets;
//if(targetMask & (TARGET_FLAG_UNIT|TARGET_FLAG_UNK2))
- for(uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
if(SpellTargetType[spellInfo->EffectImplicitTargetA[i]] == TARGET_TYPE_UNIT_TARGET)
{
@@ -1005,7 +1005,7 @@ void Unit::CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit*
uint32 targetMask = spellInfo->Targets;
//check unit target
- for(uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
if(SpellTargetType[spellInfo->EffectImplicitTargetA[i]] == TARGET_TYPE_UNIT_TARGET)
{
@@ -1042,7 +1042,7 @@ void Unit::CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit*
spell->m_CastItem = castItem;
}
- for(CustomSpellValues::const_iterator itr = value.begin(); itr != value.end(); ++itr)
+ for (CustomSpellValues::const_iterator itr = value.begin(); itr != value.end(); ++itr)
spell->SetSpellValue(itr->first, itr->second);
spell->prepare(&targets, triggeredByAura);
@@ -1578,7 +1578,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
std::set<AuraEffect*> alreadyDone;
uint32 removedAuras = pVictim->m_removedAurasCount;
AuraEffectList const& vDamageShields = pVictim->GetAurasByType(SPELL_AURA_DAMAGE_SHIELD);
- for(AuraEffectList::const_iterator i = vDamageShields.begin(), next = vDamageShields.begin(); i != vDamageShields.end(); i = next)
+ for (AuraEffectList::const_iterator i = vDamageShields.begin(), next = vDamageShields.begin(); i != vDamageShields.end(); i = next)
{
++next;
if (alreadyDone.find(*i) == alreadyDone.end())
@@ -1615,7 +1615,6 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
}
}
-
void Unit::HandleEmoteCommand(uint32 anim_id)
{
WorldPacket data( SMSG_EMOTE, 4 + 8 );
@@ -1637,7 +1636,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit* pVictim, const uint32 damage, SpellEnt
modOwner->ApplySpellMod(spellInfo->Id, SPELLMOD_IGNORE_ARMOR, armor);
AuraEffectList const& ResIgnoreAurasAb = GetAurasByType(SPELL_AURA_MOD_ABILITY_IGNORE_TARGET_RESIST);
- for(AuraEffectList::const_iterator j = ResIgnoreAurasAb.begin();j != ResIgnoreAurasAb.end(); ++j)
+ for (AuraEffectList::const_iterator j = ResIgnoreAurasAb.begin(); j != ResIgnoreAurasAb.end(); ++j)
{
if( (*j)->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL
&& (*j)->isAffectedOnSpell(spellInfo))
@@ -1645,7 +1644,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit* pVictim, const uint32 damage, SpellEnt
}
AuraEffectList const& ResIgnoreAuras = GetAurasByType(SPELL_AURA_MOD_IGNORE_TARGET_RESIST);
- for(AuraEffectList::const_iterator j = ResIgnoreAuras.begin();j != ResIgnoreAuras.end(); ++j)
+ for (AuraEffectList::const_iterator j = ResIgnoreAuras.begin(); j != ResIgnoreAuras.end(); ++j)
{
if( (*j)->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL)
armor= int32(float(armor) * (float(100-(*j)->GetAmount())/100.0f));
@@ -1654,7 +1653,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit* pVictim, const uint32 damage, SpellEnt
if ( GetTypeId() == TYPEID_PLAYER )
{
AuraEffectList const& ResIgnoreAuras = GetAurasByType(SPELL_AURA_MOD_ARMOR_PENETRATION_PCT);
- for(AuraEffectList::const_iterator itr = ResIgnoreAuras.begin();itr != ResIgnoreAuras.end(); ++itr)
+ for (AuraEffectList::const_iterator itr = ResIgnoreAuras.begin(); itr != ResIgnoreAuras.end(); ++itr)
{
// item neutral spell
if((*itr)->GetSpellProto()->EquippedItemClass == -1)
@@ -1664,7 +1663,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit* pVictim, const uint32 damage, SpellEnt
}
// item dependent spell - check curent weapons
- for(int i = 0; i < MAX_ATTACK; ++i)
+ for (int i = 0; i < MAX_ATTACK; ++i)
{
Item *weapon = ((Player *)this)->GetWeaponForAttack(WeaponAttackType(i));
@@ -1684,7 +1683,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit* pVictim, const uint32 damage, SpellEnt
if (getLevel()<60)
maxArmorPen=400+85*pVictim->getLevel();
else
- maxArmorPen=400+85*pVictim->getLevel()+4.5*85*(pVictim->getLevel()-59);
+ maxArmorPen=400+85*pVictim->getLevel()+4.5*85*(pVictim->getLevel()-59);
// Cap armor penetration to this number
maxArmorPen = std::min(((armor+maxArmorPen)/3),armor);
// Figure out how much armor do we ignore
@@ -1694,7 +1693,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit* pVictim, const uint32 damage, SpellEnt
}
// Ignore enemy armor by SPELL_AURA_MOD_TARGET_ARMOR_PCT
//armor *= 1.0f - GetTotalAuraModifier(SPELL_AURA_MOD_ARMOR_PENETRATION_PCT) / 100.0f;
-
+
if (armor < 0.0f)
armor = 0.0f;
@@ -1753,7 +1752,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
*resist = damage;
AuraEffectList const& ResIgnoreAurasAb = GetAurasByType(SPELL_AURA_MOD_ABILITY_IGNORE_TARGET_RESIST);
- for(AuraEffectList::const_iterator j = ResIgnoreAurasAb.begin();j != ResIgnoreAurasAb.end(); ++j)
+ for (AuraEffectList::const_iterator j = ResIgnoreAurasAb.begin(); j != ResIgnoreAurasAb.end(); ++j)
{
if( (*j)->GetMiscValue() & schoolMask
&& (*j)->isAffectedOnSpell(spellInfo))
@@ -1761,7 +1760,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
}
AuraEffectList const& ResIgnoreAuras = GetAurasByType(SPELL_AURA_MOD_IGNORE_TARGET_RESIST);
- for(AuraEffectList::const_iterator j = ResIgnoreAuras.begin();j != ResIgnoreAuras.end(); ++j)
+ for (AuraEffectList::const_iterator j = ResIgnoreAuras.begin(); j != ResIgnoreAuras.end(); ++j)
{
if( (*j)->GetMiscValue() & schoolMask)
*resist= int32(float(*resist) * (float(100-(*j)->GetAmount())/100.0f));
@@ -1782,7 +1781,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
TriggeredSpellInfoVct triggeredSpells;
// absorb without mana cost
AuraEffectList const& vSchoolAbsorb = pVictim->GetAurasByType(SPELL_AURA_SCHOOL_ABSORB);
- for(AuraEffectList::const_iterator i = vSchoolAbsorb.begin(); i != vSchoolAbsorb.end() && RemainingDamage > 0; ++i)
+ for (AuraEffectList::const_iterator i = vSchoolAbsorb.begin(); i != vSchoolAbsorb.end() && RemainingDamage > 0; ++i)
{
if (!((*i)->GetMiscValue() & schoolMask))
continue;
@@ -1907,7 +1906,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
{
case 5065: // Rank 1
case 5064: // Rank 2
- triggeredSpells.push_back(TriggeredSpellInfo(33619, pVictim, this,
+ triggeredSpells.push_back(TriggeredSpellInfo(33619, pVictim, this,
std::min(RemainingDamage, currentAbsorb) * aurEff->GetAmount() / 100, *i));
break;
default:
@@ -1993,7 +1992,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
existExpired = true;
}
- for(TriggeredSpellInfoVct::const_iterator itr = triggeredSpells.begin(); itr != triggeredSpells.end(); ++itr)
+ for (TriggeredSpellInfoVct::const_iterator itr = triggeredSpells.begin(); itr != triggeredSpells.end(); ++itr)
{
if(itr->spell)
{
@@ -2010,7 +2009,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
// Remove all expired absorb auras
if (existExpired)
{
- for(AuraEffectList::const_iterator i = vSchoolAbsorb.begin(); i != vSchoolAbsorb.end();)
+ for (AuraEffectList::const_iterator i = vSchoolAbsorb.begin(); i != vSchoolAbsorb.end(); )
{
Aura *aura=(*i)->GetParentAura();
AuraEffect *auraeff =(*i);
@@ -2027,7 +2026,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
// absorb by mana cost
AuraEffectList const& vManaShield = pVictim->GetAurasByType(SPELL_AURA_MANA_SHIELD);
- for(AuraEffectList::const_iterator i = vManaShield.begin(), next; i != vManaShield.end() && RemainingDamage > 0; i = next)
+ for (AuraEffectList::const_iterator i = vManaShield.begin(), next; i != vManaShield.end() && RemainingDamage > 0; i = next)
{
next = i; ++next;
@@ -2066,7 +2065,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
if(pVictim != this)
{
AuraEffectList const& vSplitDamageFlat = pVictim->GetAurasByType(SPELL_AURA_SPLIT_DAMAGE_FLAT);
- for(AuraEffectList::const_iterator i = vSplitDamageFlat.begin(), next; i != vSplitDamageFlat.end() && RemainingDamage >= 0; i = next)
+ for (AuraEffectList::const_iterator i = vSplitDamageFlat.begin(), next; i != vSplitDamageFlat.end() && RemainingDamage >= 0; i = next)
{
next = i; ++next;
@@ -2087,7 +2086,6 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
RemainingDamage -= currentAbsorb;
-
uint32 splitted = currentAbsorb;
uint32 splitted_absorb = 0;
DealDamageMods(caster,splitted,&splitted_absorb);
@@ -2099,7 +2097,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
}
AuraEffectList const& vSplitDamagePct = pVictim->GetAurasByType(SPELL_AURA_SPLIT_DAMAGE_PCT);
- for(AuraEffectList::const_iterator i = vSplitDamagePct.begin(), next; i != vSplitDamagePct.end() && RemainingDamage >= 0; i = next)
+ for (AuraEffectList::const_iterator i = vSplitDamagePct.begin(), next; i != vSplitDamagePct.end() && RemainingDamage >= 0; i = next)
{
next = i; ++next;
@@ -2130,7 +2128,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
// TODO: School should be checked for absorbing auras or for attacks?
int32 auraAbsorbMod = GetMaxPositiveAuraModifier(SPELL_AURA_MOD_TARGET_ABSORB_SCHOOL);
AuraEffectList const& AbsIgnoreAurasAb = GetAurasByType(SPELL_AURA_MOD_TARGET_ABILITY_ABSORB_SCHOOL);
- for(AuraEffectList::const_iterator i = AbsIgnoreAurasAb.begin();i != AbsIgnoreAurasAb.end(); ++i)
+ for (AuraEffectList::const_iterator i = AbsIgnoreAurasAb.begin(); i != AbsIgnoreAurasAb.end(); ++i)
{
if ((*i)->GetAmount() > auraAbsorbMod
&& (*i)->isAffectedOnSpell(spellInfo))
@@ -2184,7 +2182,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
// Get total damage bonus from auras
int32 current_dmg = 0;
std::pair<AuraMap::const_iterator, AuraMap::const_iterator> range = pVictim->GetAuras().equal_range(44413);
- for(AuraMap::const_iterator iter = range.first; iter != range.second; ++iter)
+ for (AuraMap::const_iterator iter = range.first; iter != range.second; ++iter)
if (AuraEffect const * bonusEff = iter->second->GetPartAura(0))
current_dmg += bonusEff->GetAmount();
@@ -2523,7 +2521,7 @@ bool Unit::isSpellBlocked(Unit *pVictim, SpellEntry const * /*spellProto*/, Weap
/* Currently not exist spells with ignore block
// Ignore combat result aura (parry/dodge check on prepare)
AuraList const& ignore = GetAurasByType(SPELL_AURA_IGNORE_COMBAT_RESULT);
- for(AuraList::const_iterator i = ignore.begin(); i != ignore.end(); ++i)
+ for (AuraList::const_iterator i = ignore.begin(); i != ignore.end(); ++i)
{
if (!(*i)->isAffectedOnSpell(spellProto))
continue;
@@ -2597,13 +2595,12 @@ bool Unit::isBlockCritical()
return miss_chance;
}*/
-
int32 Unit::GetMechanicResistChance(const SpellEntry *spell)
{
if(!spell)
return 0;
int32 resist_mech = 0;
- for(uint8 eff = 0; eff < MAX_SPELL_EFFECTS; ++eff)
+ for (uint8 eff = 0; eff < MAX_SPELL_EFFECTS; ++eff)
{
if(spell->Effect[eff] == 0)
break;
@@ -2623,7 +2620,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
{
WeaponAttackType attType = BASE_ATTACK;
- // Check damage class instead of attack type to correctly handle judgements
+ // Check damage class instead of attack type to correctly handle judgements
// - they are meele, but can't be dodged/parried/deflected because of ranged dmg class
if (spell->DmgClass == SPELL_DAMAGE_CLASS_RANGED)
attType = RANGED_ATTACK;
@@ -2633,7 +2630,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
if (spell->DmgClass == SPELL_DAMAGE_CLASS_RANGED && !IsRangedWeaponSpell(spell))
attackerWeaponSkill = getLevel() * 5;
// bonus from skills is 0.04% per skill Diff
- else
+ else
attackerWeaponSkill = int32(GetWeaponSkillValue(attType,pVictim));
int32 skillDiff = attackerWeaponSkill - int32(pVictim->GetMaxSkillValueForLevel(this));
@@ -2650,7 +2647,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
// Chance resist mechanic (select max value from every mechanic spell effect)
int32 resist_mech = 0;
// Get effects mechanic and chance
- for(uint8 eff = 0; eff < MAX_SPELL_EFFECTS; ++eff)
+ for (uint8 eff = 0; eff < MAX_SPELL_EFFECTS; ++eff)
{
int32 effect_mech = GetEffectMechanic(spell, eff);
if (effect_mech)
@@ -2715,7 +2712,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
}
// Ignore combat result aura
AuraEffectList const& ignore = GetAurasByType(SPELL_AURA_IGNORE_COMBAT_RESULT);
- for(AuraEffectList::const_iterator i = ignore.begin(); i != ignore.end(); ++i)
+ for (AuraEffectList::const_iterator i = ignore.begin(); i != ignore.end(); ++i)
{
if (!(*i)->isAffectedOnSpell(spell))
continue;
@@ -2831,14 +2828,14 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit *pVictim, SpellEntry const *spell)
// Chance resist mechanic (select max value from every mechanic spell effect)
int32 resist_chance = pVictim->GetMechanicResistChance(spell);
tmp += resist_chance;
-
+
// Chance resist debuff
tmp -= pVictim->GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DEBUFF_RESISTANCE, int32(spell->Dispel));
-
+
// Roll chance
if (rand < tmp)
return SPELL_MISS_RESIST;
-
+
// cast by caster in front of victim
if (pVictim->HasInArc(M_PI,this) || pVictim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION))
{
@@ -2886,7 +2883,7 @@ SpellMissInfo Unit::SpellHitResult(Unit *pVictim, SpellEntry const *spell, bool
{
int32 reflectchance = pVictim->GetTotalAuraModifier(SPELL_AURA_REFLECT_SPELLS);
Unit::AuraEffectList const& mReflectSpellsSchool = pVictim->GetAurasByType(SPELL_AURA_REFLECT_SPELLS_SCHOOL);
- for(Unit::AuraEffectList::const_iterator i = mReflectSpellsSchool.begin(); i != mReflectSpellsSchool.end(); ++i)
+ for (Unit::AuraEffectList::const_iterator i = mReflectSpellsSchool.begin(); i != mReflectSpellsSchool.end(); ++i)
if((*i)->GetMiscValue() & GetSpellSchoolMask(spell))
reflectchance += (*i)->GetAmount();
if (reflectchance > 0 && roll_chance_i(reflectchance))
@@ -3196,7 +3193,7 @@ void Unit::_UpdateSpells( uint32 time )
// update auras
// m_AurasUpdateIterator can be updated in inderect called code at aura remove to skip next planned to update but removed auras
- for (m_AurasUpdateIterator = m_Auras.begin(); m_AurasUpdateIterator != m_Auras.end();)
+ for (m_AurasUpdateIterator = m_Auras.begin(); m_AurasUpdateIterator != m_Auras.end(); )
{
Aura* i_aura = m_AurasUpdateIterator->second;
++m_AurasUpdateIterator; // need shift to next for allow update if need into aura update
@@ -3204,7 +3201,7 @@ void Unit::_UpdateSpells( uint32 time )
}
// remove expired auras
- for(AuraMap::iterator i = m_Auras.begin(); i != m_Auras.end();)
+ for (AuraMap::iterator i = m_Auras.begin(); i != m_Auras.end(); )
{
if(i->second->IsExpired())
RemoveAura(i, AURA_REMOVE_BY_EXPIRE);
@@ -3217,7 +3214,7 @@ void Unit::_UpdateSpells( uint32 time )
if(!m_gameObj.empty())
{
GameObjectList::iterator itr;
- for(itr = m_gameObj.begin(); itr != m_gameObj.end();)
+ for (itr = m_gameObj.begin(); itr != m_gameObj.end(); )
{
if( !(*itr)->isSpawned() )
{
@@ -3477,7 +3474,7 @@ int32 Unit::GetTotalAuraModifier(AuraType auratype) const
int32 modifier = 0;
AuraEffectList const& mTotalAuraList = GetAurasByType(auratype);
- for(AuraEffectList::const_iterator i = mTotalAuraList.begin();i != mTotalAuraList.end(); ++i)
+ for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
modifier += (*i)->GetAmount();
return modifier;
@@ -3488,7 +3485,7 @@ float Unit::GetTotalAuraMultiplier(AuraType auratype) const
float multiplier = 1.0f;
AuraEffectList const& mTotalAuraList = GetAurasByType(auratype);
- for(AuraEffectList::const_iterator i = mTotalAuraList.begin();i != mTotalAuraList.end(); ++i)
+ for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
multiplier *= (100.0f + (*i)->GetAmount())/100.0f;
return multiplier;
@@ -3499,7 +3496,7 @@ int32 Unit::GetMaxPositiveAuraModifier(AuraType auratype)
int32 modifier = 0;
AuraEffectList const& mTotalAuraList = GetAurasByType(auratype);
- for(AuraEffectList::const_iterator i = mTotalAuraList.begin();i != mTotalAuraList.end(); ++i)
+ for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
{
if ((*i)->GetAmount() > modifier)
modifier = (*i)->GetAmount();
@@ -3513,7 +3510,7 @@ int32 Unit::GetMaxNegativeAuraModifier(AuraType auratype) const
int32 modifier = 0;
AuraEffectList const& mTotalAuraList = GetAurasByType(auratype);
- for(AuraEffectList::const_iterator i = mTotalAuraList.begin();i != mTotalAuraList.end(); ++i)
+ for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
if ((*i)->GetAmount() < modifier)
modifier = (*i)->GetAmount();
@@ -3525,7 +3522,7 @@ int32 Unit::GetTotalAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask)
int32 modifier = 0;
AuraEffectList const& mTotalAuraList = GetAurasByType(auratype);
- for(AuraEffectList::const_iterator i = mTotalAuraList.begin();i != mTotalAuraList.end(); ++i)
+ for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
{
if ((*i)->GetMiscValue()& misc_mask)
modifier += (*i)->GetAmount();
@@ -3538,7 +3535,7 @@ float Unit::GetTotalAuraMultiplierByMiscMask(AuraType auratype, uint32 misc_mask
float multiplier = 1.0f;
AuraEffectList const& mTotalAuraList = GetAurasByType(auratype);
- for(AuraEffectList::const_iterator i = mTotalAuraList.begin();i != mTotalAuraList.end(); ++i)
+ for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
{
if ((*i)->GetMiscValue()& misc_mask)
multiplier *= (100.0f + (*i)->GetAmount())/100.0f;
@@ -3551,7 +3548,7 @@ int32 Unit::GetMaxPositiveAuraModifierByMiscMask(AuraType auratype, uint32 misc_
int32 modifier = 0;
AuraEffectList const& mTotalAuraList = GetAurasByType(auratype);
- for(AuraEffectList::const_iterator i = mTotalAuraList.begin();i != mTotalAuraList.end(); ++i)
+ for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
{
if ((*i)->GetMiscValue()& misc_mask && (*i)->GetAmount() > modifier)
modifier = (*i)->GetAmount();
@@ -3565,7 +3562,7 @@ int32 Unit::GetMaxNegativeAuraModifierByMiscMask(AuraType auratype, uint32 misc_
int32 modifier = 0;
AuraEffectList const& mTotalAuraList = GetAurasByType(auratype);
- for(AuraEffectList::const_iterator i = mTotalAuraList.begin();i != mTotalAuraList.end(); ++i)
+ for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
{
if ((*i)->GetMiscValue()& misc_mask && (*i)->GetAmount() < modifier)
modifier = (*i)->GetAmount();
@@ -3579,7 +3576,7 @@ int32 Unit::GetTotalAuraModifierByMiscValue(AuraType auratype, int32 misc_value)
int32 modifier = 0;
AuraEffectList const& mTotalAuraList = GetAurasByType(auratype);
- for(AuraEffectList::const_iterator i = mTotalAuraList.begin();i != mTotalAuraList.end(); ++i)
+ for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
{
if ((*i)->GetMiscValue()== misc_value)
modifier += (*i)->GetAmount();
@@ -3592,7 +3589,7 @@ float Unit::GetTotalAuraMultiplierByMiscValue(AuraType auratype, int32 misc_valu
float multiplier = 1.0f;
AuraEffectList const& mTotalAuraList = GetAurasByType(auratype);
- for(AuraEffectList::const_iterator i = mTotalAuraList.begin();i != mTotalAuraList.end(); ++i)
+ for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
{
if ((*i)->GetMiscValue()== misc_value)
multiplier *= (100.0f + (*i)->GetAmount())/100.0f;
@@ -3605,7 +3602,7 @@ int32 Unit::GetMaxPositiveAuraModifierByMiscValue(AuraType auratype, int32 misc_
int32 modifier = 0;
AuraEffectList const& mTotalAuraList = GetAurasByType(auratype);
- for(AuraEffectList::const_iterator i = mTotalAuraList.begin();i != mTotalAuraList.end(); ++i)
+ for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
{
if ((*i)->GetMiscValue()== misc_value && (*i)->GetAmount() > modifier)
modifier = (*i)->GetAmount();
@@ -3619,7 +3616,7 @@ int32 Unit::GetMaxNegativeAuraModifierByMiscValue(AuraType auratype, int32 misc_
int32 modifier = 0;
AuraEffectList const& mTotalAuraList = GetAurasByType(auratype);
- for(AuraEffectList::const_iterator i = mTotalAuraList.begin();i != mTotalAuraList.end(); ++i)
+ for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
{
if ((*i)->GetMiscValue()== misc_value && (*i)->GetAmount() < modifier)
modifier = (*i)->GetAmount();
@@ -3699,7 +3696,7 @@ bool Unit::AddAura(Aura *Aur, bool handleEffects)
case 64821: // Fuse Armor (Razorscale)
if(stackAmount == aurSpellInfo->StackAmount)
CastSpell(this, 64774, true, NULL, NULL, Aur->GetCasterGUID());
- break;
+ break;
}
}
@@ -3720,14 +3717,14 @@ bool Unit::AddAura(Aura *Aur, bool handleEffects)
if (Aur->IsSingleTarget())
{
// caster pointer can be deleted in time aura remove, find it by guid at each iteration
- for(;;)
+ for (; ; )
{
Unit* caster = Aur->GetCaster();
assert(caster);
bool restart = false;
AuraList& scAuras = caster->GetSingleCastAuras();
- for(AuraList::iterator itr = scAuras.begin(); itr != scAuras.end(); ++itr)
+ for (AuraList::iterator itr = scAuras.begin(); itr != scAuras.end(); ++itr)
{
if( (*itr)->GetTarget() != Aur->GetTarget() &&
IsSingleTargetSpells((*itr)->GetSpellProto(),aurSpellInfo) )
@@ -3787,7 +3784,7 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
//bool linked = spellmgr.GetSpellCustomAttr(spellId) & SPELL_ATTR_CU_LINK_AURA? true : false;
bool remove = false;
- for(AuraMap::iterator i = m_Auras.begin(); i != m_Auras.end(); ++i)
+ for (AuraMap::iterator i = m_Auras.begin(); i != m_Auras.end(); ++i)
{
if(remove)
{
@@ -3813,7 +3810,7 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
bool is_triggered_by_spell = false;
// prevent triggering aura of removing aura that triggered it
// prevent triggered aura of removing aura that triggering it (triggered effect early some aura of parent spell
- for(uint8 j = 0; j < MAX_SPELL_EFFECTS; ++j)
+ for (uint8 j = 0; j < MAX_SPELL_EFFECTS; ++j)
{
if (i_spellProto->EffectTriggerSpell[j] == spellProto->Id
|| spellProto->EffectTriggerSpell[j] == i_spellProto->Id) // I do not know what is this for
@@ -3830,7 +3827,7 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
if(sameCaster && linked)
{
if(const std::vector<int32> *spell_triggered = spellmgr.GetSpellLinked(spellId + SPELL_LINK_AURA))
- for(std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
+ for (std::vector<int32>::const_iterator itr = spell_triggered->begin(); itr != spell_triggered->end(); ++itr)
if(*itr>0 && *itr==i_spellId)
{
is_triggered_by_spell=true;
@@ -3863,7 +3860,7 @@ bool Unit::RemoveNoStackAurasDueToAura(Aura *Aur)
void Unit::RemoveAura(uint32 spellId, uint64 caster ,AuraRemoveMode removeMode)
{
- for(AuraMap::iterator iter = m_Auras.lower_bound(spellId); iter != m_Auras.upper_bound(spellId);)
+ for (AuraMap::iterator iter = m_Auras.lower_bound(spellId); iter != m_Auras.upper_bound(spellId); )
{
if (!caster || iter->second->GetCasterGUID()==caster)
{
@@ -3880,7 +3877,7 @@ void Unit::RemoveAura(Aura * aur ,AuraRemoveMode mode)
// no need to remove
if (!aur || aur->IsRemoved())
return;
- for(AuraMap::iterator iter = m_Auras.lower_bound(aur->GetId()); iter != m_Auras.upper_bound(aur->GetId());)
+ for (AuraMap::iterator iter = m_Auras.lower_bound(aur->GetId()); iter != m_Auras.upper_bound(aur->GetId()); )
{
if (aur == iter->second)
{
@@ -3894,7 +3891,7 @@ void Unit::RemoveAura(Aura * aur ,AuraRemoveMode mode)
void Unit::RemoveAurasDueToSpell(uint32 spellId, uint64 caster ,AuraRemoveMode removeMode)
{
- for(AuraMap::iterator iter = m_Auras.lower_bound(spellId); iter != m_Auras.upper_bound(spellId);)
+ for (AuraMap::iterator iter = m_Auras.lower_bound(spellId); iter != m_Auras.upper_bound(spellId); )
{
if (!caster || iter->second->GetCasterGUID()==caster)
{
@@ -3908,7 +3905,7 @@ void Unit::RemoveAurasDueToSpell(uint32 spellId, uint64 caster ,AuraRemoveMode r
void Unit::RemoveAuraFromStack(uint32 spellId, uint64 caster ,AuraRemoveMode removeMode)
{
- for(AuraMap::iterator iter = m_Auras.lower_bound(spellId); iter != m_Auras.upper_bound(spellId);)
+ for (AuraMap::iterator iter = m_Auras.lower_bound(spellId); iter != m_Auras.upper_bound(spellId); )
{
if (!caster || iter->second->GetCasterGUID()==caster)
{
@@ -3928,7 +3925,7 @@ inline void Unit::RemoveAuraFromStack(AuraMap::iterator &iter,AuraRemoveMode rem
void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit *dispeler)
{
- for(AuraMap::iterator iter = m_Auras.lower_bound(spellId); iter != m_Auras.upper_bound(spellId);)
+ for (AuraMap::iterator iter = m_Auras.lower_bound(spellId); iter != m_Auras.upper_bound(spellId); )
{
Aura *aur = iter->second;
if (casterGUID == aur->GetCasterGUID())
@@ -3957,13 +3954,13 @@ void Unit::RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit
if (casterGUID == stealer->GetGUID())
return;
- for(AuraMap::iterator iter = m_Auras.lower_bound(spellId); iter != m_Auras.upper_bound(spellId);)
+ for (AuraMap::iterator iter = m_Auras.lower_bound(spellId); iter != m_Auras.upper_bound(spellId); )
{
Aura * aur = iter->second;
if (casterGUID == aur->GetCasterGUID())
{
int32 damage[MAX_SPELL_EFFECTS];
- for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i)
+ for (uint8 i=0; i<MAX_SPELL_EFFECTS; ++i)
{
if (aur->GetPartAura(i))
damage[i]=aur->GetPartAura(i)->GetAmount();
@@ -3989,7 +3986,7 @@ void Unit::RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit
void Unit::RemoveAurasDueToItemSpell(Item* castItem,uint32 spellId)
{
- for (AuraMap::iterator iter = m_Auras.lower_bound(spellId); iter != m_Auras.upper_bound(spellId);)
+ for (AuraMap::iterator iter = m_Auras.lower_bound(spellId); iter != m_Auras.upper_bound(spellId); )
{
if (!castItem || iter->second->GetCastItemGUID()==castItem->GetGUID())
{
@@ -4003,7 +4000,7 @@ void Unit::RemoveAurasDueToItemSpell(Item* castItem,uint32 spellId)
void Unit::RemoveAurasByType(AuraType auraType, uint64 casterGUID, Aura * except, bool negative, bool positive)
{
- for (AuraEffectList::const_iterator iter = m_modAuras[auraType].begin(); iter != m_modAuras[auraType].end();)
+ for (AuraEffectList::const_iterator iter = m_modAuras[auraType].begin(); iter != m_modAuras[auraType].end(); )
{
Aura * aur = (*iter)->GetParentAura();
++iter;
@@ -4042,7 +4039,7 @@ void Unit::RemoveNotOwnSingleTargetAuras(uint32 newPhase)
// single target auras at other targets
AuraList& scAuras = GetSingleCastAuras();
- for (AuraList::iterator iter = scAuras.begin(); iter != scAuras.end();)
+ for (AuraList::iterator iter = scAuras.begin(); iter != scAuras.end(); )
{
Aura * aura=*iter;
++iter;
@@ -4097,7 +4094,7 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
{
bool canBreak = false;
// Get mask of all aurastates from remaining auras
- for(AuraStateAurasMap::iterator itr = m_auraStateAuras.lower_bound(auraState); itr != m_auraStateAuras.upper_bound(auraState) && !(auraStateFound && canBreak);)
+ for (AuraStateAurasMap::iterator itr = m_auraStateAuras.lower_bound(auraState); itr != m_auraStateAuras.upper_bound(auraState) && !(auraStateFound && canBreak); )
{
if (itr->second == Aur)
{
@@ -4135,7 +4132,7 @@ void Unit::RemoveAllAuras()
void Unit::RemoveAllAuras(uint64 casterGUID, Aura * except /*=NULL*/, bool negative /*=true*/, bool positive /*=true*/)
{
- for(AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end();)
+ for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); )
{
if (iter->second != except && (!casterGUID || iter->second->GetCasterGUID()==casterGUID)
&& ((negative && !iter->second->IsPositive()) || (positive && iter->second->IsPositive())))
@@ -4149,7 +4146,7 @@ void Unit::RemoveArenaAuras(bool onleave)
{
// in join, remove positive buffs, on end, remove negative
// used to remove positive visible auras in arenas
- for(AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end();)
+ for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); )
{
if ( !(iter->second->GetSpellProto()->AttributesEx4 & (1<<21)) // don't remove stances, shadowform, pally/hunter auras
&& !iter->second->IsPassive() // don't remove passive auras
@@ -4165,7 +4162,7 @@ void Unit::RemoveAllAurasOnDeath()
{
// used just after dieing to remove all visible auras
// and disable the mods for the passive ones
- for(AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end();)
+ for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); )
{
if (!iter->second->IsPassive() && !iter->second->IsDeathPersistent())
RemoveAura(iter, AURA_REMOVE_BY_DEATH);
@@ -4203,7 +4200,7 @@ void Unit::_ApplyAllAuraMods()
bool Unit::HasAuraTypeWithMiscvalue(AuraType auratype, uint32 miscvalue) const
{
AuraEffectList const& mTotalAuraList = GetAurasByType(auratype);
- for(AuraEffectList::const_iterator i = mTotalAuraList.begin();i != mTotalAuraList.end(); ++i)
+ for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
if (miscvalue == (*i)->GetMiscValue())
return true;
return false;
@@ -4212,13 +4209,12 @@ bool Unit::HasAuraTypeWithMiscvalue(AuraType auratype, uint32 miscvalue) const
bool Unit::HasAuraTypeWithValue(AuraType auratype, uint32 value) const
{
AuraEffectList const& mTotalAuraList = GetAurasByType(auratype);
- for(AuraEffectList::const_iterator i = mTotalAuraList.begin();i != mTotalAuraList.end(); ++i)
+ for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i)
if (value == (*i)->GetAmount())
return true;
return false;
}
-
bool Unit::HasAuraType(AuraType auraType) const
{
return (!m_modAuras[auraType].empty());
@@ -4240,7 +4236,7 @@ bool Unit::HasAura(Aura * aur) const
// no need to find aura
if (!aur || aur->IsRemoved())
return false;
- for(AuraMap::const_iterator iter = m_Auras.lower_bound(aur->GetId()); iter != m_Auras.upper_bound(aur->GetId());)
+ for (AuraMap::const_iterator iter = m_Auras.lower_bound(aur->GetId()); iter != m_Auras.upper_bound(aur->GetId()); )
{
if (aur == iter->second)
return true;
@@ -4267,7 +4263,7 @@ Aura * Unit::GetAura(uint32 spellId, uint64 caster) const
else
{
AuraMap const& auras = GetAuras();
- for(AuraMap::const_iterator itr = auras.lower_bound(spellId); itr != auras.upper_bound(spellId); ++itr)
+ for (AuraMap::const_iterator itr = auras.lower_bound(spellId); itr != auras.upper_bound(spellId); ++itr)
if(itr->second->GetCasterGUID()==caster)
return itr->second;
return NULL;
@@ -4284,7 +4280,7 @@ AuraEffect * Unit::GetAuraEffect(uint32 spellId, uint8 effIndex, uint64 caster)
AuraEffect* Unit::GetAura(AuraType type, uint32 family, uint32 familyFlag1, uint32 familyFlag2, uint32 familyFlag3, uint64 casterGUID)
{
AuraEffectList const& auras = GetAurasByType(type);
- for(AuraEffectList::const_iterator i = auras.begin();i != auras.end(); ++i)
+ for (AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
{
SpellEntry const *spell = (*i)->GetSpellProto();
if (spell->SpellFamilyName == family && spell->SpellFamilyFlags.HasFlag(familyFlag1, familyFlag2, familyFlag3))
@@ -4300,7 +4296,7 @@ AuraEffect* Unit::GetAura(AuraType type, uint32 family, uint32 familyFlag1, uint
AuraEffect * Unit::IsScriptOverriden(SpellEntry const * spell, int32 script) const
{
AuraEffectList const& auras = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
- for(AuraEffectList::const_iterator i = auras.begin();i != auras.end(); ++i)
+ for (AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
{
if ((*i)->GetMiscValue() == script)
if ((*i)->isAffectedOnSpell(spell))
@@ -4319,9 +4315,9 @@ uint32 Unit::GetDiseasesByCaster(uint64 casterGUID, bool remove)
};
uint32 diseases=0;
- for(AuraType const* itr = &diseaseAuraTypes[0]; itr && itr[0] != SPELL_AURA_NONE; ++itr)
+ for (AuraType const* itr = &diseaseAuraTypes[0]; itr && itr[0] != SPELL_AURA_NONE; ++itr)
{
- for(AuraEffectList::iterator i = m_modAuras[*itr].begin();i != m_modAuras[*itr].end(); )
+ for (AuraEffectList::iterator i = m_modAuras[*itr].begin(); i != m_modAuras[*itr].end(); )
{
// Get auras with disease dispel type by caster
if ((*i)->GetSpellProto()->Dispel == DISPEL_DISEASE
@@ -4352,10 +4348,10 @@ uint32 Unit::GetDoTsByCaster(uint64 casterGUID) const
};
uint32 dots=0;
- for(AuraType const* itr = &diseaseAuraTypes[0]; itr && itr[0] != SPELL_AURA_NONE; ++itr)
+ for (AuraType const* itr = &diseaseAuraTypes[0]; itr && itr[0] != SPELL_AURA_NONE; ++itr)
{
Unit::AuraEffectList const& auras = GetAurasByType(*itr);
- for(AuraEffectList::const_iterator i = auras.begin();i != auras.end(); ++i)
+ for (AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
{
// Get auras by caster
if ((*i)->GetCasterGUID()==casterGUID)
@@ -4374,7 +4370,7 @@ void Unit::RemoveDynObject(uint32 spellid)
{
if(m_dynObjGUIDs.empty())
return;
- for (DynObjectGUIDs::iterator i = m_dynObjGUIDs.begin(); i != m_dynObjGUIDs.end();)
+ for (DynObjectGUIDs::iterator i = m_dynObjGUIDs.begin(); i != m_dynObjGUIDs.end(); )
{
DynamicObject* dynObj = GetMap()->GetDynamicObject(*i);
if(!dynObj) // may happen if a dynobj is removed when grid unload
@@ -4404,7 +4400,7 @@ void Unit::RemoveAllDynObjects()
DynamicObject * Unit::GetDynObject(uint32 spellId)
{
- for (DynObjectGUIDs::iterator i = m_dynObjGUIDs.begin(); i != m_dynObjGUIDs.end();)
+ for (DynObjectGUIDs::iterator i = m_dynObjGUIDs.begin(); i != m_dynObjGUIDs.end(); )
{
DynamicObject* dynObj = GetMap()->GetDynamicObject(*i);
if(!dynObj)
@@ -4451,7 +4447,7 @@ void Unit::RemoveGameObject(GameObject* gameObj, bool del)
gameObj->SetOwnerGUID(0);
- for(uint32 i = 0; i < 4; ++i)
+ for (uint32 i = 0; i < 4; ++i)
{
if(m_ObjectSlot[i] == gameObj->GetGUID())
{
@@ -4511,7 +4507,7 @@ void Unit::RemoveGameObject(uint32 spellid, bool del)
void Unit::RemoveAllGameObjects()
{
// remove references to unit
- for(GameObjectList::iterator i = m_gameObj.begin(); i != m_gameObj.end();)
+ for (GameObjectList::iterator i = m_gameObj.begin(); i != m_gameObj.end(); )
{
(*i)->SetOwnerGUID(0);
(*i)->SetRespawnTime(0);
@@ -4618,7 +4614,7 @@ void Unit::SendSpellMiss(Unit *target, uint32 spellID, SpellMissInfo missInfo)
data << uint64(GetGUID());
data << uint8(0); // can be 0 or 1
data << uint32(1); // target count
- // for(i = 0; i < target count; ++i)
+ // for (i = 0; i < target count; ++i)
data << uint64(target->GetGUID()); // target GUID
data << uint8(missInfo);
// end loop
@@ -4639,7 +4635,7 @@ void Unit::SendAttackStateUpdate(CalcDamageInfo *damageInfo)
data << uint32(overkill < 0 ? 0 : overkill); // Overkill
data << uint8(count); // Sub damage count
- for(uint32 i = 0; i < count; ++i)
+ for (uint32 i = 0; i < count; ++i)
{
data << uint32(damageInfo->damageSchoolMask); // School of sub damage
data << float(damageInfo->damage); // sub damage
@@ -4648,13 +4644,13 @@ void Unit::SendAttackStateUpdate(CalcDamageInfo *damageInfo)
if(damageInfo->HitInfo & (HITINFO_ABSORB | HITINFO_ABSORB2))
{
- for(uint32 i = 0; i < count; ++i)
+ for (uint32 i = 0; i < count; ++i)
data << uint32(damageInfo->absorb); // Absorb
}
if(damageInfo->HitInfo & (HITINFO_RESIST | HITINFO_RESIST2))
{
- for(uint32 i = 0; i < count; ++i)
+ for (uint32 i = 0; i < count; ++i)
data << uint32(damageInfo->resist); // Resist
}
@@ -4679,7 +4675,7 @@ void Unit::SendAttackStateUpdate(CalcDamageInfo *damageInfo)
data << float(0);
data << float(0);
data << float(0);
- for(uint8 i = 0; i < 5; ++i)
+ for (uint8 i = 0; i < 5; ++i)
{
data << float(0);
data << float(0);
@@ -4870,7 +4866,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
target = owner;
triggered_spell_id = 50454;
break;
- }
+ }
return false;
}
// Improved Divine Spirit
@@ -5406,7 +5402,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
SpellCooldowns const SpellCDs = ((Player*)this)->GetSpellCooldowns();
// remove cooldowns on all ranks of Frost Nova
- for(SpellCooldowns::const_iterator itr = SpellCDs.begin(); itr != SpellCDs.end(); itr++)
+ for (SpellCooldowns::const_iterator itr = SpellCDs.begin(); itr != SpellCDs.end(); itr++)
{
SpellEntry const* SpellCDs_entry = sSpellStore.LookupEntry(itr->first);
// Frost Nova
@@ -5570,7 +5566,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
{
// Improved Soul Leech
AuraEffectList const& SoulLeechAuras = GetAurasByType(SPELL_AURA_DUMMY);
- for(Unit::AuraEffectList::const_iterator i = SoulLeechAuras.begin();i != SoulLeechAuras.end(); ++i)
+ for (Unit::AuraEffectList::const_iterator i = SoulLeechAuras.begin(); i != SoulLeechAuras.end(); ++i)
{
if ((*i)->GetId()==54117 || (*i)->GetId()==54118)
{
@@ -5721,7 +5717,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
return false;
int EffIndex = 0;
- for(uint8 i = 0; i < MAX_SPELL_EFFECTS; i++)
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; i++)
{
if(GoPoH->Effect[i] == SPELL_EFFECT_APPLY_AURA)
{
@@ -6370,7 +6366,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
case 54939:
{
// Lookup base amount mana restore
- for (uint8 i=0; i<MAX_SPELL_EFFECTS;i++)
+ for (uint8 i=0; i<MAX_SPELL_EFFECTS; i++)
if (procSpell->Effect[i] == SPELL_EFFECT_ENERGIZE)
{
int32 mana = procSpell->EffectBasePoints[i];
@@ -6521,7 +6517,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
((Player*)this)->AddSpellCooldown(dummySpell->Id,0,time(NULL) + cooldown);
// Attack Twice
- for ( uint32 i = 0; i<2; ++i )
+ for (uint32 i = 0; i<2; ++i )
CastCustomSpell(pVictim,triggered_spell_id,&basepoints0,NULL,NULL,true,castItem,triggeredByAura);
return true;
@@ -6891,7 +6887,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
{
if (procSpell->SpellFamilyName == SPELLFAMILY_POTION)
{
- for (uint8 i=0;i<MAX_SPELL_EFFECTS;i++)
+ for (uint8 i=0; i<MAX_SPELL_EFFECTS; i++)
{
if (procSpell->Effect[i]==SPELL_EFFECT_HEAL)
{
@@ -7118,7 +7114,7 @@ bool Unit::HandleAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, S
else
runesLeft = 1;
- for (uint8 i=0;i<MAX_RUNES && runesLeft;++i)
+ for (uint8 i=0; i<MAX_RUNES && runesLeft; ++i)
{
if (dummySpell->SpellIconID == 2622)
{
@@ -7179,7 +7175,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
basepoints0 = triggerAmount;
Item* castItem = triggeredByAura->GetParentAura()->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER
- ? ((Player*)this)->GetItemByGuid(triggeredByAura->GetParentAura()->GetCastItemGUID()) : NULL;
+ ? ((Player*)this)->GetItemByGuid(triggeredByAura->GetParentAura()->GetCastItemGUID()) : NULL;
// Try handle unknown trigger spells
if (sSpellStore.LookupEntry(trigger_spell_id) == NULL)
@@ -7252,7 +7248,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
{
// Improved Drain Soul
Unit::AuraEffectList const& mAddFlatModifier = GetAurasByType(SPELL_AURA_DUMMY);
- for(Unit::AuraEffectList::const_iterator i = mAddFlatModifier.begin(); i != mAddFlatModifier.end(); ++i)
+ for (Unit::AuraEffectList::const_iterator i = mAddFlatModifier.begin(); i != mAddFlatModifier.end(); ++i)
{
if ((*i)->GetMiscValue() == SPELLMOD_CHANCE_OF_SUCCESS && (*i)->GetSpellProto()->SpellIconID == 113)
{
@@ -7563,7 +7559,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
trigger_spell_id = 26470;
break;
}
- // Deflection
+ // Deflection
case 52420:
{
if(GetHealth()*100 / GetMaxHealth() >= 35)
@@ -7692,7 +7688,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
// Glyph of Improved Scorch
if (AuraEffect * aurEff = GetAuraEffect(56371,0))
{
- for (int32 count = aurEff->GetAmount();count>0;count--)
+ for (int32 count = aurEff->GetAmount(); count>0; count--)
CastSpell(pVictim, 22959, true);
return true;
}
@@ -7745,7 +7741,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
case 53817:
{
// have rank dependent proc chance, ignore too often cases
- // PPM = 2.5 * (rank of talent),
+ // PPM = 2.5 * (rank of talent),
uint32 rank = spellmgr.GetSpellRank(auraSpellInfo->Id);
// 5 rank -> 100% 4 rank -> 80% and etc from full rate
if(!roll_chance_i(20*rank))
@@ -8385,7 +8381,7 @@ void Unit::CombatStopWithPets(bool includingCast)
{
CombatStop(includingCast);
- for(ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
+ for (ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
(*itr)->CombatStop(includingCast);
}
@@ -8394,11 +8390,11 @@ bool Unit::isAttackingPlayer() const
if(hasUnitState(UNIT_STAT_ATTACK_PLAYER))
return true;
- for(ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
+ for (ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
if((*itr)->isAttackingPlayer())
return true;
- for(uint8 i = 0; i < MAX_SUMMON_SLOT; ++i)
+ for (uint8 i = 0; i < MAX_SUMMON_SLOT; ++i)
if(m_SummonSlot[i])
if(Creature *summon = GetMap()->GetCreature(m_SummonSlot[i]))
if(summon->isAttackingPlayer())
@@ -8450,7 +8446,7 @@ void Unit::ModifyAuraState(AuraState flag, bool apply)
if (flag != AURA_STATE_ENRAGE) // enrage aura state triggering continues auras
{
Unit::AuraMap& tAuras = GetAuras();
- for (Unit::AuraMap::iterator itr = tAuras.begin(); itr != tAuras.end();)
+ for (Unit::AuraMap::iterator itr = tAuras.begin(); itr != tAuras.end(); )
{
SpellEntry const* spellProto = (*itr).second->GetSpellProto();
if (spellProto->CasterAuraState == flag)
@@ -8468,7 +8464,7 @@ void Unit::ModifyAuraState(AuraState flag, bool apply)
uint32 Unit::BuildAuraStateUpdateForTarget(Unit * target) const
{
uint32 auraStates = GetUInt32Value(UNIT_FIELD_AURASTATE) &~(PER_CASTER_AURA_STATE_MASK);
- for(AuraStateAurasMap::const_iterator itr = m_auraStateAuras.begin(); itr != m_auraStateAuras.end();++itr)
+ for (AuraStateAurasMap::const_iterator itr = m_auraStateAuras.begin(); itr != m_auraStateAuras.end(); ++itr)
{
if ((1<<(itr->first-1)) & PER_CASTER_AURA_STATE_MASK)
{
@@ -8486,7 +8482,7 @@ bool Unit::HasAuraState(AuraState flag, SpellEntry const *spellProto, Unit const
if(spellProto)
{
AuraEffectList const& stateAuras = Caster->GetAurasByType(SPELL_AURA_ABILITY_IGNORE_AURASTATE);
- for(AuraEffectList::const_iterator j = stateAuras.begin();j != stateAuras.end(); ++j)
+ for (AuraEffectList::const_iterator j = stateAuras.begin(); j != stateAuras.end(); ++j)
if((*j)->isAffectedOnSpell(spellProto))
return true;
}
@@ -8494,7 +8490,7 @@ bool Unit::HasAuraState(AuraState flag, SpellEntry const *spellProto, Unit const
// If aura with aurastate by caster not found return false
if ((1<<(flag-1)) & PER_CASTER_AURA_STATE_MASK)
{
- for(AuraStateAurasMap::const_iterator itr = m_auraStateAuras.lower_bound(flag); itr != m_auraStateAuras.upper_bound(flag);++itr)
+ for (AuraStateAurasMap::const_iterator itr = m_auraStateAuras.lower_bound(flag); itr != m_auraStateAuras.upper_bound(flag); ++itr)
if (itr->second->GetCasterGUID() == Caster->GetGUID())
return true;
return false;
@@ -8632,7 +8628,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
// FIXME: hack, speed must be set only at follow
if(GetTypeId() == TYPEID_PLAYER && minion->isPet())
- for(uint8 i = 0; i < MAX_MOVE_TYPE; ++i)
+ for (uint8 i = 0; i < MAX_MOVE_TYPE; ++i)
minion->SetSpeed(UnitMoveType(i), m_speed_rate[i], true);
// Ghoul pets have energy instead of mana (is anywhere better place for this code?)
@@ -8680,7 +8676,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
if(RemoveUInt64Value(UNIT_FIELD_SUMMON, minion->GetGUID()))
{
//Check if there is another minion
- for(ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
+ for (ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
{
// do not use this check, creature do not have charm guid
//if(GetCharmGUID() == (*itr)->GetGUID())
@@ -8714,14 +8710,14 @@ void Unit::SetMinion(Minion *minion, bool apply)
}
}
}
- //else if(minion->m_Properties && minion->m_Properties->Type == SUMMON_TYPE_MINIPET)
+ //else if(minion->m_Properties && minion->m_Properties->Type == SUMMON_TYPE_MINIPET)
// RemoveUInt64Value(UNIT_FIELD_CRITTER, minion->GetGUID());
}
}
void Unit::GetAllMinionsByEntry(std::list<Creature*>& Minions, uint32 entry)
{
- for(Unit::ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end();)
+ for (Unit::ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); )
{
Unit *unit = *itr;
++itr;
@@ -8733,7 +8729,7 @@ void Unit::GetAllMinionsByEntry(std::list<Creature*>& Minions, uint32 entry)
void Unit::RemoveAllMinionsByEntry(uint32 entry)
{
- for(Unit::ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end();)
+ for (Unit::ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); )
{
Unit *unit = *itr;
++itr;
@@ -8857,7 +8853,7 @@ Unit* Unit::SelectMagnetTarget(Unit *victim, SpellEntry const *spellInfo)
return victim;
Unit::AuraEffectList const& magnetAuras = victim->GetAurasByType(SPELL_AURA_SPELL_MAGNET);
- for(Unit::AuraEffectList::const_iterator itr = magnetAuras.begin(); itr != magnetAuras.end(); ++itr)
+ for (Unit::AuraEffectList::const_iterator itr = magnetAuras.begin(); itr != magnetAuras.end(); ++itr)
if(Unit* magnet = (*itr)->GetParentAura()->GetUnitSource())
if(magnet->isAlive())
{
@@ -8869,7 +8865,7 @@ Unit* Unit::SelectMagnetTarget(Unit *victim, SpellEntry const *spellInfo)
else
{
AuraEffectList const& hitTriggerAuras = victim->GetAurasByType(SPELL_AURA_ADD_CASTER_HIT_TRIGGER);
- for(AuraEffectList::const_iterator i = hitTriggerAuras.begin(); i != hitTriggerAuras.end(); ++i)
+ for (AuraEffectList::const_iterator i = hitTriggerAuras.begin(); i != hitTriggerAuras.end(); ++i)
if(Unit* magnet = (*i)->GetParentAura()->GetUnitSource())
if(magnet->isAlive() && magnet->IsWithinLOSInMap(this))
if(roll_chance_i((*i)->GetAmount()))
@@ -8955,7 +8951,7 @@ Unit* Unit::GetNextRandomRaidMemberOrPet(float radius)
//reserve place for players and pets because resizing vector every unit push is unefficient (vector is reallocated then)
nearMembers.reserve(pGroup->GetMembersCount()*2);
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* Target = itr->getSource();
@@ -9095,7 +9091,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
DoneTotalMod *= ((Creature*)this)->GetSpellDamageMod(((Creature*)this)->GetCreatureInfo()->rank);
AuraEffectList const& mModDamagePercentDone = GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
- for(AuraEffectList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i)
+ for (AuraEffectList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i)
{
if( ((*i)->GetMiscValue() & GetSpellSchoolMask(spellProto)) &&
(*i)->GetSpellProto()->EquippedItemClass == -1 &&
@@ -9111,7 +9107,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
// Add flat bonus from spell damage versus
DoneTotal += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_FLAT_SPELL_DAMAGE_VERSUS, creatureTypeMask);
AuraEffectList const& mDamageDoneVersus = GetAurasByType(SPELL_AURA_MOD_DAMAGE_DONE_VERSUS);
- for(AuraEffectList::const_iterator i = mDamageDoneVersus.begin();i != mDamageDoneVersus.end(); ++i)
+ for (AuraEffectList::const_iterator i = mDamageDoneVersus.begin(); i != mDamageDoneVersus.end(); ++i)
if(creatureTypeMask & uint32((*i)->GetMiscValue()))
DoneTotalMod *= ((*i)->GetAmount()+100.0f)/100.0f;
@@ -9119,7 +9115,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
Unit *owner = GetOwner();
if (!owner) owner = this;
AuraEffectList const& mOverrideClassScript= owner->GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
- for(AuraEffectList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
+ for (AuraEffectList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
{
if (!(*i)->isAffectedOnSpell(spellProto))
continue;
@@ -9250,7 +9246,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
if(pVictim->HasAuraType(SPELL_AURA_MOD_DECREASE_SPEED))
{
AuraEffectList const& mDumyAuras = GetAurasByType(SPELL_AURA_DUMMY);
- for(AuraEffectList::const_iterator i = mDumyAuras.begin(); i != mDumyAuras.end(); ++i)
+ for (AuraEffectList::const_iterator i = mDumyAuras.begin(); i != mDumyAuras.end(); ++i)
if ((*i)->GetSpellProto()->SpellIconID == 3263)
{
DoneTotalMod *= float((*i)->GetAmount() + 100.f) / 100.f;
@@ -9277,7 +9273,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
// Get stack of Holy Vengeance/Blood Corruption on the target added by caster
uint32 stacks = 0;
Unit::AuraEffectList const& auras = pVictim->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
- for(Unit::AuraEffectList::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr)
+ for (Unit::AuraEffectList::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr)
if(((*itr)->GetId() == 31803 || (*itr)->GetId() == 53742) && (*itr)->GetCasterGUID()==GetGUID())
{
stacks = (*itr)->GetParentAura()->GetStackAmount();
@@ -9294,7 +9290,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
if(pVictim->HasAuraState(AURA_STATE_CONFLAGRATE))
{
AuraEffectList const& mDumyAuras = GetAurasByType(SPELL_AURA_DUMMY);
- for(AuraEffectList::const_iterator i = mDumyAuras.begin(); i != mDumyAuras.end(); ++i)
+ for (AuraEffectList::const_iterator i = mDumyAuras.begin(); i != mDumyAuras.end(); ++i)
if ((*i)->GetSpellProto()->SpellIconID == 3173)
{
DoneTotalMod *= float((*i)->GetAmount() + 100.f) / 100.f;
@@ -9321,7 +9317,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
// ..taken
AuraEffectList const& mModDamagePercentTaken = pVictim->GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN);
- for(AuraEffectList::const_iterator i = mModDamagePercentTaken.begin(); i != mModDamagePercentTaken.end(); ++i)
+ for (AuraEffectList::const_iterator i = mModDamagePercentTaken.begin(); i != mModDamagePercentTaken.end(); ++i)
if( (*i)->GetMiscValue() & GetSpellSchoolMask(spellProto) )
TakenTotalMod *= ((*i)->GetAmount()+100.0f)/100.0f;
@@ -9340,7 +9336,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
// From caster spells
AuraEffectList const& mOwnerTaken = pVictim->GetAurasByType(SPELL_AURA_MOD_DAMAGE_FROM_CASTER);
- for(AuraEffectList::const_iterator i = mOwnerTaken.begin(); i != mOwnerTaken.end(); ++i)
+ for (AuraEffectList::const_iterator i = mOwnerTaken.begin(); i != mOwnerTaken.end(); ++i)
if( (*i)->GetCasterGUID() == GetGUID() && (*i)->isAffectedOnSpell(spellProto))
TakenTotalMod *= ((*i)->GetAmount()+100.0f)/100.0f;
@@ -9348,7 +9344,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
if (uint32 mechanicMask = GetAllSpellMechanicMask(spellProto))
{
AuraEffectList const& mDamageDoneMechanic = pVictim->GetAurasByType(SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT);
- for(AuraEffectList::const_iterator i = mDamageDoneMechanic.begin();i != mDamageDoneMechanic.end(); ++i)
+ for (AuraEffectList::const_iterator i = mDamageDoneMechanic.begin(); i != mDamageDoneMechanic.end(); ++i)
if(mechanicMask & uint32(1<<((*i)->GetMiscValue())))
TakenTotalMod *= ((*i)->GetAmount()+100.0f)/100.0f;
}
@@ -9399,7 +9395,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
if(DotDuration > 30000) DotDuration = 30000;
if(!IsChanneledSpell(spellProto)) DotFactor = DotDuration / 15000.0f;
int x = 0;
- for(uint8 j = 0; j < MAX_SPELL_EFFECTS; j++)
+ for (uint8 j = 0; j < MAX_SPELL_EFFECTS; j++)
{
if( spellProto->Effect[j] == SPELL_EFFECT_APPLY_AURA && (
spellProto->EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_DAMAGE ||
@@ -9423,7 +9419,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
CastingTime = GetCastingTimeForBonus( spellProto, damagetype, CastingTime );
// 50% for damage and healing spells for leech spells from damage bonus and 0% from healing
- for(uint8 j = 0; j < MAX_SPELL_EFFECTS; ++j)
+ for (uint8 j = 0; j < MAX_SPELL_EFFECTS; ++j)
{
if( spellProto->Effect[j] == SPELL_EFFECT_HEALTH_LEECH ||
spellProto->Effect[j] == SPELL_EFFECT_APPLY_AURA && spellProto->EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_LEECH )
@@ -9466,7 +9462,7 @@ int32 Unit::SpellBaseDamageBonus(SpellSchoolMask schoolMask)
// ..done
AuraEffectList const& mDamageDone = GetAurasByType(SPELL_AURA_MOD_DAMAGE_DONE);
- for(AuraEffectList::const_iterator i = mDamageDone.begin();i != mDamageDone.end(); ++i)
+ for (AuraEffectList::const_iterator i = mDamageDone.begin(); i != mDamageDone.end(); ++i)
if(((*i)->GetMiscValue() & schoolMask) != 0 &&
(*i)->GetSpellProto()->EquippedItemClass == -1 &&
// -1 == any item class (not wand then)
@@ -9481,7 +9477,7 @@ int32 Unit::SpellBaseDamageBonus(SpellSchoolMask schoolMask)
// Damage bonus from stats
AuraEffectList const& mDamageDoneOfStatPercent = GetAurasByType(SPELL_AURA_MOD_SPELL_DAMAGE_OF_STAT_PERCENT);
- for(AuraEffectList::const_iterator i = mDamageDoneOfStatPercent.begin();i != mDamageDoneOfStatPercent.end(); ++i)
+ for (AuraEffectList::const_iterator i = mDamageDoneOfStatPercent.begin(); i != mDamageDoneOfStatPercent.end(); ++i)
{
if((*i)->GetMiscValue() & schoolMask)
{
@@ -9492,7 +9488,7 @@ int32 Unit::SpellBaseDamageBonus(SpellSchoolMask schoolMask)
}
// ... and attack power
AuraEffectList const& mDamageDonebyAP = GetAurasByType(SPELL_AURA_MOD_SPELL_DAMAGE_OF_ATTACK_POWER);
- for(AuraEffectList::const_iterator i =mDamageDonebyAP.begin();i != mDamageDonebyAP.end(); ++i)
+ for (AuraEffectList::const_iterator i =mDamageDonebyAP.begin(); i != mDamageDonebyAP.end(); ++i)
if ((*i)->GetMiscValue() & schoolMask)
DoneAdvertisedBenefit += int32(GetTotalAttackPowerValue(BASE_ATTACK) * (*i)->GetAmount() / 100.0f);
@@ -9507,13 +9503,13 @@ int32 Unit::SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit *pVic
int32 TakenAdvertisedBenefit = 0;
// ..done (for creature type by mask) in taken
AuraEffectList const& mDamageDoneCreature = GetAurasByType(SPELL_AURA_MOD_DAMAGE_DONE_CREATURE);
- for(AuraEffectList::const_iterator i = mDamageDoneCreature.begin();i != mDamageDoneCreature.end(); ++i)
+ for (AuraEffectList::const_iterator i = mDamageDoneCreature.begin(); i != mDamageDoneCreature.end(); ++i)
if(creatureTypeMask & uint32((*i)->GetMiscValue()))
TakenAdvertisedBenefit += (*i)->GetAmount();
// ..taken
AuraEffectList const& mDamageTaken = pVictim->GetAurasByType(SPELL_AURA_MOD_DAMAGE_TAKEN);
- for(AuraEffectList::const_iterator i = mDamageTaken.begin();i != mDamageTaken.end(); ++i)
+ for (AuraEffectList::const_iterator i = mDamageTaken.begin(); i != mDamageTaken.end(); ++i)
if(((*i)->GetMiscValue() & schoolMask) != 0)
TakenAdvertisedBenefit += (*i)->GetAmount();
@@ -9559,7 +9555,7 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
}
// scripted (increase crit chance ... against ... target by x%
AuraEffectList const& mOverrideClassScript = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
- for(AuraEffectList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
+ for (AuraEffectList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
{
if (!((*i)->isAffectedOnSpell(spellProto)))
continue;
@@ -9773,14 +9769,14 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
// Healing done percent
AuraEffectList const& mHealingDonePct = GetAurasByType(SPELL_AURA_MOD_HEALING_DONE_PERCENT);
- for(AuraEffectList::const_iterator i = mHealingDonePct.begin();i != mHealingDonePct.end(); ++i)
+ for (AuraEffectList::const_iterator i = mHealingDonePct.begin(); i != mHealingDonePct.end(); ++i)
DoneTotalMod *= (100.0f + (*i)->GetAmount()) / 100.0f;
// done scripted mod (take it from owner)
Unit *owner = GetOwner();
if (!owner) owner = this;
AuraEffectList const& mOverrideClassScript= owner->GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
- for(AuraEffectList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
+ for (AuraEffectList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
{
if (!(*i)->isAffectedOnSpell(spellProto))
continue;
@@ -9843,7 +9839,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
bool scripted = false;
- for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i)
+ for (uint8 i=0; i<MAX_SPELL_EFFECTS; ++i)
{
switch (spellProto->EffectApplyAuraName[i])
{
@@ -9923,7 +9919,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
if(DotDuration > 30000) DotDuration = 30000;
if(!IsChanneledSpell(spellProto)) DotFactor = DotDuration / 15000.0f;
uint32 x = 0;
- for(uint8 j = 0; j < MAX_SPELL_EFFECTS; j++)
+ for (uint8 j = 0; j < MAX_SPELL_EFFECTS; j++)
{
if( spellProto->Effect[j] == SPELL_EFFECT_APPLY_AURA && (
spellProto->EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_DAMAGE ||
@@ -9946,7 +9942,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
// Distribute Damage over multiple effects, reduce by AoE
CastingTime = GetCastingTimeForBonus( spellProto, damagetype, CastingTime );
// 50% for damage and healing spells for leech spells from damage bonus and 0% from healing
- for(uint8 j = 0; j < MAX_SPELL_EFFECTS; ++j)
+ for (uint8 j = 0; j < MAX_SPELL_EFFECTS; ++j)
{
if( spellProto->Effect[j] == SPELL_EFFECT_HEALTH_LEECH ||
spellProto->Effect[j] == SPELL_EFFECT_APPLY_AURA && spellProto->EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_LEECH )
@@ -10018,7 +10014,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
}
AuraEffectList const& mHealingGet= pVictim->GetAurasByType(SPELL_AURA_MOD_HEALING_RECEIVED);
- for(AuraEffectList::const_iterator i = mHealingGet.begin(); i != mHealingGet.end(); ++i)
+ for (AuraEffectList::const_iterator i = mHealingGet.begin(); i != mHealingGet.end(); ++i)
if (GetGUID()==(*i)->GetCasterGUID() && (*i)->isAffectedOnSpell(spellProto) )
TakenTotalMod *= ((*i)->GetAmount() + 100.0f) / 100.0f;
@@ -10032,7 +10028,7 @@ int32 Unit::SpellBaseHealingBonus(SpellSchoolMask schoolMask)
int32 AdvertisedBenefit = 0;
AuraEffectList const& mHealingDone = GetAurasByType(SPELL_AURA_MOD_HEALING_DONE);
- for(AuraEffectList::const_iterator i = mHealingDone.begin();i != mHealingDone.end(); ++i)
+ for (AuraEffectList::const_iterator i = mHealingDone.begin(); i != mHealingDone.end(); ++i)
if(((*i)->GetMiscValue() & schoolMask) != 0)
AdvertisedBenefit += (*i)->GetAmount();
@@ -10044,7 +10040,7 @@ int32 Unit::SpellBaseHealingBonus(SpellSchoolMask schoolMask)
// Healing bonus from stats
AuraEffectList const& mHealingDoneOfStatPercent = GetAurasByType(SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT);
- for(AuraEffectList::const_iterator i = mHealingDoneOfStatPercent.begin();i != mHealingDoneOfStatPercent.end(); ++i)
+ for (AuraEffectList::const_iterator i = mHealingDoneOfStatPercent.begin(); i != mHealingDoneOfStatPercent.end(); ++i)
{
// stat used dependent from misc value (stat index)
Stats usedStat = Stats((*i)->GetSpellProto()->EffectMiscValue[(*i)->GetEffIndex()]);
@@ -10053,7 +10049,7 @@ int32 Unit::SpellBaseHealingBonus(SpellSchoolMask schoolMask)
// ... and attack power
AuraEffectList const& mHealingDonebyAP = GetAurasByType(SPELL_AURA_MOD_SPELL_HEALING_OF_ATTACK_POWER);
- for(AuraEffectList::const_iterator i = mHealingDonebyAP.begin();i != mHealingDonebyAP.end(); ++i)
+ for (AuraEffectList::const_iterator i = mHealingDonebyAP.begin(); i != mHealingDonebyAP.end(); ++i)
if ((*i)->GetMiscValue() & schoolMask)
AdvertisedBenefit += int32(GetTotalAttackPowerValue(BASE_ATTACK) * (*i)->GetAmount() / 100.0f);
}
@@ -10064,7 +10060,7 @@ int32 Unit::SpellBaseHealingBonusForVictim(SpellSchoolMask schoolMask, Unit *pVi
{
int32 AdvertisedBenefit = 0;
AuraEffectList const& mDamageTaken = pVictim->GetAurasByType(SPELL_AURA_MOD_HEALING);
- for(AuraEffectList::const_iterator i = mDamageTaken.begin();i != mDamageTaken.end(); ++i)
+ for (AuraEffectList::const_iterator i = mDamageTaken.begin(); i != mDamageTaken.end(); ++i)
if(((*i)->GetMiscValue() & schoolMask) != 0)
AdvertisedBenefit += (*i)->GetAmount();
return AdvertisedBenefit;
@@ -10115,14 +10111,14 @@ bool Unit::IsImmunedToSpell(SpellEntry const* spellInfo)
// Single spell immunity.
SpellImmuneList const& idList = m_spellImmune[IMMUNITY_ID];
- for(SpellImmuneList::const_iterator itr = idList.begin(); itr != idList.end(); ++itr)
+ for (SpellImmuneList::const_iterator itr = idList.begin(); itr != idList.end(); ++itr)
if(itr->type == spellInfo->Id)
return true;
if(spellInfo->Dispel)
{
SpellImmuneList const& dispelList = m_spellImmune[IMMUNITY_DISPEL];
- for(SpellImmuneList::const_iterator itr = dispelList.begin(); itr != dispelList.end(); ++itr)
+ for (SpellImmuneList::const_iterator itr = dispelList.begin(); itr != dispelList.end(); ++itr)
if(itr->type == spellInfo->Dispel)
return true;
}
@@ -10130,7 +10126,7 @@ bool Unit::IsImmunedToSpell(SpellEntry const* spellInfo)
if(spellInfo->Mechanic)
{
SpellImmuneList const& mechanicList = m_spellImmune[IMMUNITY_MECHANIC];
- for(SpellImmuneList::const_iterator itr = mechanicList.begin(); itr != mechanicList.end(); ++itr)
+ for (SpellImmuneList::const_iterator itr = mechanicList.begin(); itr != mechanicList.end(); ++itr)
if(itr->type == spellInfo->Mechanic)
return true;
}
@@ -10138,7 +10134,7 @@ bool Unit::IsImmunedToSpell(SpellEntry const* spellInfo)
if(spellInfo->Id != 42292 && spellInfo->Id !=59752)
{
SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL];
- for(SpellImmuneList::const_iterator itr = schoolList.begin(); itr != schoolList.end(); ++itr)
+ for (SpellImmuneList::const_iterator itr = schoolList.begin(); itr != schoolList.end(); ++itr)
if((itr->type & GetSpellSchoolMask(spellInfo))
&& !(IsPositiveSpell(itr->spellId) && IsPositiveSpell(spellInfo->Id))
&& !IsDispelableBySpell(spellInfo, itr->spellId))
@@ -10170,12 +10166,12 @@ bool Unit::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) con
if(uint32 aura = spellInfo->EffectApplyAuraName[index])
{
SpellImmuneList const& list = m_spellImmune[IMMUNITY_STATE];
- for(SpellImmuneList::const_iterator itr = list.begin(); itr != list.end(); ++itr)
+ for (SpellImmuneList::const_iterator itr = list.begin(); itr != list.end(); ++itr)
if(itr->type == aura)
return true;
// Check for immune to application of harmful magical effects
AuraEffectList const& immuneAuraApply = GetAurasByType(SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL);
- for(AuraEffectList::const_iterator iter = immuneAuraApply.begin(); iter != immuneAuraApply.end(); ++iter)
+ for (AuraEffectList::const_iterator iter = immuneAuraApply.begin(); iter != immuneAuraApply.end(); ++iter)
if (spellInfo->Dispel == DISPEL_MAGIC && // Magic debuff
((*iter)->GetMiscValue() & GetSpellSchoolMask(spellInfo)) && // Check school
!IsPositiveEffect(spellInfo->Id, index)) // Harmful
@@ -10225,7 +10221,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
// ..done (for creature type by mask) in taken
AuraEffectList const& mDamageDoneCreature = GetAurasByType(SPELL_AURA_MOD_DAMAGE_DONE_CREATURE);
- for(AuraEffectList::const_iterator i = mDamageDoneCreature.begin();i != mDamageDoneCreature.end(); ++i)
+ for (AuraEffectList::const_iterator i = mDamageDoneCreature.begin(); i != mDamageDoneCreature.end(); ++i)
if(creatureTypeMask & uint32((*i)->GetMiscValue()))
DoneFlatBenefit += (*i)->GetAmount();
@@ -10240,7 +10236,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
// ..done (base at attack power and creature type)
AuraEffectList const& mCreatureAttackPower = GetAurasByType(SPELL_AURA_MOD_RANGED_ATTACK_POWER_VERSUS);
- for(AuraEffectList::const_iterator i = mCreatureAttackPower.begin();i != mCreatureAttackPower.end(); ++i)
+ for (AuraEffectList::const_iterator i = mCreatureAttackPower.begin(); i != mCreatureAttackPower.end(); ++i)
if(creatureTypeMask & uint32((*i)->GetMiscValue()))
APbonus += (*i)->GetAmount();
}
@@ -10250,7 +10246,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
// ..done (base at attack power and creature type)
AuraEffectList const& mCreatureAttackPower = GetAurasByType(SPELL_AURA_MOD_MELEE_ATTACK_POWER_VERSUS);
- for(AuraEffectList::const_iterator i = mCreatureAttackPower.begin();i != mCreatureAttackPower.end(); ++i)
+ for (AuraEffectList::const_iterator i = mCreatureAttackPower.begin(); i != mCreatureAttackPower.end(); ++i)
if(creatureTypeMask & uint32((*i)->GetMiscValue()))
APbonus += (*i)->GetAmount();
}
@@ -10260,7 +10256,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
bool normalized = false;
if(spellProto)
{
- for (uint8 i = 0; i<MAX_SPELL_EFFECTS;i++)
+ for (uint8 i = 0; i<MAX_SPELL_EFFECTS; i++)
{
if (spellProto->Effect[i] == SPELL_EFFECT_NORMALIZED_WEAPON_DMG)
{
@@ -10278,7 +10274,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
// ..taken
AuraEffectList const& mDamageTaken = pVictim->GetAurasByType(SPELL_AURA_MOD_DAMAGE_TAKEN);
- for(AuraEffectList::const_iterator i = mDamageTaken.begin();i != mDamageTaken.end(); ++i)
+ for (AuraEffectList::const_iterator i = mDamageTaken.begin(); i != mDamageTaken.end(); ++i)
if((*i)->GetMiscValue() & GetMeleeDamageSchoolMask())
TakenFlatBenefit += (*i)->GetAmount();
@@ -10296,13 +10292,13 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
// SPELL_AURA_MOD_OFFHAND_DAMAGE_PCT included in weapon damage
AuraEffectList const& mDamageDoneVersus = GetAurasByType(SPELL_AURA_MOD_DAMAGE_DONE_VERSUS);
- for(AuraEffectList::const_iterator i = mDamageDoneVersus.begin();i != mDamageDoneVersus.end(); ++i)
+ for (AuraEffectList::const_iterator i = mDamageDoneVersus.begin(); i != mDamageDoneVersus.end(); ++i)
if(creatureTypeMask & uint32((*i)->GetMiscValue()))
DoneTotalMod *= ((*i)->GetAmount()+100.0f)/100.0f;
// ..taken
AuraEffectList const& mModDamagePercentTaken = pVictim->GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN);
- for(AuraEffectList::const_iterator i = mModDamagePercentTaken.begin(); i != mModDamagePercentTaken.end(); ++i)
+ for (AuraEffectList::const_iterator i = mModDamagePercentTaken.begin(); i != mModDamagePercentTaken.end(); ++i)
if((*i)->GetMiscValue() & GetMeleeDamageSchoolMask())
TakenTotalMod *= ((*i)->GetAmount()+100.0f)/100.0f;
@@ -10314,7 +10310,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
if (mechanicMask)
{
AuraEffectList const& mDamageDoneMechanic = pVictim->GetAurasByType(SPELL_AURA_MOD_MECHANIC_DAMAGE_TAKEN_PERCENT);
- for(AuraEffectList::const_iterator i = mDamageDoneMechanic.begin();i != mDamageDoneMechanic.end(); ++i)
+ for (AuraEffectList::const_iterator i = mDamageDoneMechanic.begin(); i != mDamageDoneMechanic.end(); ++i)
if((mechanicMask & uint32(1<<((*i)->GetMiscValue())))
// Shred - "Effects which increase Bleed damage also increase Shred damage"
|| ((*i)->GetMiscValue() == MECHANIC_BLEED && spellProto->SpellFamilyName == SPELLFAMILY_DRUID && spellProto->SpellFamilyFlags[0] & 0x8000))
@@ -10324,7 +10320,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
// .. taken pct: dummy auras
AuraEffectList const& mDummyAuras = pVictim->GetAurasByType(SPELL_AURA_DUMMY);
- for(AuraEffectList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
+ for (AuraEffectList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
{
switch((*i)->GetSpellProto()->SpellIconID)
{
@@ -10345,7 +10341,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
// .. taken pct: class scripts
AuraEffectList const& mclassScritAuras = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
- for(AuraEffectList::const_iterator i = mclassScritAuras.begin(); i != mclassScritAuras.end(); ++i)
+ for (AuraEffectList::const_iterator i = mclassScritAuras.begin(); i != mclassScritAuras.end(); ++i)
{
switch((*i)->GetMiscValue())
{
@@ -10369,13 +10365,13 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
if(attType != RANGED_ATTACK)
{
AuraEffectList const& mModMeleeDamageTakenPercent = pVictim->GetAurasByType(SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN_PCT);
- for(AuraEffectList::const_iterator i = mModMeleeDamageTakenPercent.begin(); i != mModMeleeDamageTakenPercent.end(); ++i)
+ for (AuraEffectList::const_iterator i = mModMeleeDamageTakenPercent.begin(); i != mModMeleeDamageTakenPercent.end(); ++i)
TakenTotalMod *= ((*i)->GetAmount()+100.0f)/100.0f;
}
else
{
AuraEffectList const& mModRangedDamageTakenPercent = pVictim->GetAurasByType(SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN_PCT);
- for(AuraEffectList::const_iterator i = mModRangedDamageTakenPercent.begin(); i != mModRangedDamageTakenPercent.end(); ++i)
+ for (AuraEffectList::const_iterator i = mModRangedDamageTakenPercent.begin(); i != mModRangedDamageTakenPercent.end(); ++i)
TakenTotalMod *= ((*i)->GetAmount()+100.0f)/100.0f;
}
@@ -10436,7 +10432,7 @@ void Unit::ApplySpellDispelImmunity(const SpellEntry * spellProto, DispelType ty
uint32 dispelMask = GetDispellMask(type);
// Dispel all existing auras vs current dispel type
AuraMap& auras = GetAuras();
- for(AuraMap::iterator itr = auras.begin(); itr != auras.end(); )
+ for (AuraMap::iterator itr = auras.begin(); itr != auras.end(); )
{
SpellEntry const* spell = itr->second->GetSpellProto();
if( (1<<spell->Dispel) & dispelMask )
@@ -10513,7 +10509,7 @@ void Unit::Unmount()
// this prevents adding a pet to a not created map which would otherwise cause a crash
// (it could probably happen when logging in after a previous crash)
if(GetTypeId() == TYPEID_PLAYER)
- {
+ {
if(Pet *pPet = ((Player*)this)->GetPet())
{
if(pPet->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED) && !pPet->hasUnitState(UNIT_STAT_STUNNED))
@@ -10613,7 +10609,7 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy)
}
}
- for(Unit::ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
+ for (Unit::ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
{
(*itr)->SetInCombatState(PvP, enemy);
(*itr)->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PET_IN_COMBAT);
@@ -10639,7 +10635,7 @@ void Unit::ClearInCombat()
{
if(Unit *owner = GetOwner())
{
- for(uint8 i = 0; i < MAX_MOVE_TYPE; ++i)
+ for (uint8 i = 0; i < MAX_MOVE_TYPE; ++i)
if(owner->GetSpeedRate(UnitMoveType(i)) > GetSpeedRate(UnitMoveType(i)))
SetSpeed(UnitMoveType(i), owner->GetSpeedRate(UnitMoveType(i)), true);
}
@@ -10683,7 +10679,7 @@ bool Unit::canAttack(Unit const* target, bool force) const
return false;
if(m_vehicle)
- if(IsOnVehicle(target) || m_vehicle->GetBase()->IsOnVehicle(target))
+ if(IsOnVehicle(target) || m_vehicle->GetBase()->IsOnVehicle(target))
return false;
return true;
@@ -10815,13 +10811,13 @@ bool Unit::canDetectInvisibilityOf(Unit const* u) const
if(m_invisibilityMask & u->m_invisibilityMask) // same group
return true;
AuraEffectList const& auras = u->GetAurasByType(SPELL_AURA_MOD_STALKED); // Hunter mark
- for(AuraEffectList::const_iterator iter = auras.begin(); iter != auras.end(); ++iter)
+ for (AuraEffectList::const_iterator iter = auras.begin(); iter != auras.end(); ++iter)
if((*iter)->GetCasterGUID()==GetGUID())
return true;
if(uint32 mask = (m_detectInvisibilityMask & u->m_invisibilityMask))
{
- for(uint32 i = 0; i < 10; ++i)
+ for (uint32 i = 0; i < 10; ++i)
{
if(((1 << i) & mask)==0)
continue;
@@ -10829,7 +10825,7 @@ bool Unit::canDetectInvisibilityOf(Unit const* u) const
// find invisibility level
uint32 invLevel = 0;
Unit::AuraEffectList const& iAuras = u->GetAurasByType(SPELL_AURA_MOD_INVISIBILITY);
- for(Unit::AuraEffectList::const_iterator itr = iAuras.begin(); itr != iAuras.end(); ++itr)
+ for (Unit::AuraEffectList::const_iterator itr = iAuras.begin(); itr != iAuras.end(); ++itr)
if(((*itr)->GetMiscValue())==i && invLevel < (*itr)->GetAmount())
invLevel = (*itr)->GetAmount();
@@ -10842,7 +10838,7 @@ bool Unit::canDetectInvisibilityOf(Unit const* u) const
else
{
Unit::AuraEffectList const& dAuras = GetAurasByType(SPELL_AURA_MOD_INVISIBILITY_DETECTION);
- for(Unit::AuraEffectList::const_iterator itr = dAuras.begin(); itr != dAuras.end(); ++itr)
+ for (Unit::AuraEffectList::const_iterator itr = dAuras.begin(); itr != dAuras.end(); ++itr)
if(((*itr)->GetMiscValue())==i && detectLevel < (*itr)->GetAmount())
detectLevel = (*itr)->GetAmount();
}
@@ -10867,7 +10863,7 @@ bool Unit::canDetectStealthOf(Unit const* target, float distance) const
return true;
AuraEffectList const& auras = target->GetAurasByType(SPELL_AURA_MOD_STALKED); // Hunter mark
- for(AuraEffectList::const_iterator iter = auras.begin(); iter != auras.end(); ++iter)
+ for (AuraEffectList::const_iterator iter = auras.begin(); iter != auras.end(); ++iter)
if((*iter)->GetCasterGUID()==GetGUID())
return true;
@@ -11358,7 +11354,7 @@ Unit* Creature::SelectVictim()
target = owner->getAttackerForHelper();
if (!target)
{
- for(ControlList::const_iterator itr = owner->m_Controlled.begin(); itr != owner->m_Controlled.end(); ++itr)
+ for (ControlList::const_iterator itr = owner->m_Controlled.begin(); itr != owner->m_Controlled.end(); ++itr)
{
if ((*itr)->isInCombat())
{
@@ -11383,7 +11379,7 @@ Unit* Creature::SelectVictim()
// it in combat but attacker not make any damage and not enter to aggro radius to have record in threat list
// for example at owner command to pet attack some far away creature
// Note: creature not have targeted movement generator but have attacker in this case
- for(AttackerSet::const_iterator itr = m_attackers.begin(); itr != m_attackers.end(); ++itr)
+ for (AttackerSet::const_iterator itr = m_attackers.begin(); itr != m_attackers.end(); ++itr)
{
if((*itr) && !canCreatureAttack(*itr) && (*itr)->GetTypeId() != TYPEID_PLAYER
&& !((Creature*)(*itr))->HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
@@ -11403,7 +11399,7 @@ Unit* Creature::SelectVictim()
if(m_invisibilityMask)
{
Unit::AuraEffectList const& iAuras = GetAurasByType(SPELL_AURA_MOD_INVISIBILITY);
- for(Unit::AuraEffectList::const_iterator itr = iAuras.begin(); itr != iAuras.end(); ++itr)
+ for (Unit::AuraEffectList::const_iterator itr = iAuras.begin(); itr != iAuras.end(); ++itr)
if((*itr)->GetParentAura()->IsPermanent())
{
AI()->EnterEvadeMode();
@@ -11512,7 +11508,7 @@ int32 Unit::ModSpellDuration(SpellEntry const* spellProto, Unit const* target, i
int32 durationMod_always = 0;
int32 durationMod_not_stack = 0;
- for (uint8 i = 1;i<=MECHANIC_ENRAGED;++i)
+ for (uint8 i = 1; i<=MECHANIC_ENRAGED; ++i)
{
if (!(mechanic & 1<<i))
continue;
@@ -11603,7 +11599,7 @@ void Unit::ModSpellCastTime(SpellEntry const* spellProto, int32 & castTime, Spel
DiminishingLevels Unit::GetDiminishing(DiminishingGroup group)
{
- for(Diminishing::iterator i = m_Diminishing.begin(); i != m_Diminishing.end(); ++i)
+ for (Diminishing::iterator i = m_Diminishing.begin(); i != m_Diminishing.end(); ++i)
{
if(i->DRGroup != group)
continue;
@@ -11632,7 +11628,7 @@ DiminishingLevels Unit::GetDiminishing(DiminishingGroup group)
void Unit::IncrDiminishing(DiminishingGroup group)
{
// Checking for existing in the table
- for(Diminishing::iterator i = m_Diminishing.begin(); i != m_Diminishing.end(); ++i)
+ for (Diminishing::iterator i = m_Diminishing.begin(); i != m_Diminishing.end(); ++i)
{
if(i->DRGroup != group)
continue;
@@ -11684,7 +11680,7 @@ void Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,Un
void Unit::ApplyDiminishingAura( DiminishingGroup group, bool apply )
{
// Checking for existing in the table
- for(Diminishing::iterator i = m_Diminishing.begin(); i != m_Diminishing.end(); ++i)
+ for (Diminishing::iterator i = m_Diminishing.begin(); i != m_Diminishing.end(); ++i)
{
if(i->DRGroup != group)
continue;
@@ -12293,7 +12289,7 @@ void Unit::DeleteCharmInfo()
CharmInfo::CharmInfo(Unit* unit)
: m_unit(unit), m_CommandState(COMMAND_FOLLOW), m_petnumber(0), m_barInit(false)
{
- for(uint8 i = 0; i < MAX_SPELL_CHARM; ++i)
+ for (uint8 i = 0; i < MAX_SPELL_CHARM; ++i)
m_charmspells[i].SetActionAndType(0,ACT_DISABLED);
if(m_unit->GetTypeId() == TYPEID_UNIT)
@@ -12315,15 +12311,15 @@ CharmInfo::~CharmInfo()
void CharmInfo::InitPetActionBar()
{
// the first 3 SpellOrActions are attack, follow and stay
- for(uint32 i = 0; i < ACTION_BAR_INDEX_PET_SPELL_START - ACTION_BAR_INDEX_START; ++i)
+ for (uint32 i = 0; i < ACTION_BAR_INDEX_PET_SPELL_START - ACTION_BAR_INDEX_START; ++i)
SetActionBar(ACTION_BAR_INDEX_START + i,COMMAND_ATTACK - i,ACT_COMMAND);
// middle 4 SpellOrActions are spells/special attacks/abilities
- for(uint32 i = 0; i < ACTION_BAR_INDEX_PET_SPELL_END-ACTION_BAR_INDEX_PET_SPELL_START; ++i)
+ for (uint32 i = 0; i < ACTION_BAR_INDEX_PET_SPELL_END-ACTION_BAR_INDEX_PET_SPELL_START; ++i)
SetActionBar(ACTION_BAR_INDEX_PET_SPELL_START + i,0,ACT_PASSIVE);
// last 3 SpellOrActions are reactions
- for(uint32 i = 0; i < ACTION_BAR_INDEX_END - ACTION_BAR_INDEX_PET_SPELL_END; ++i)
+ for (uint32 i = 0; i < ACTION_BAR_INDEX_END - ACTION_BAR_INDEX_PET_SPELL_END; ++i)
SetActionBar(ACTION_BAR_INDEX_PET_SPELL_END + i,COMMAND_ATTACK - i,ACT_REACTION);
}
@@ -12333,7 +12329,7 @@ void CharmInfo::InitEmptyActionBar(bool withAttack)
SetActionBar(ACTION_BAR_INDEX_START,COMMAND_ATTACK,ACT_COMMAND);
else
SetActionBar(ACTION_BAR_INDEX_START,0,ACT_PASSIVE);
- for(uint32 x = ACTION_BAR_INDEX_START+1; x < ACTION_BAR_INDEX_END; ++x)
+ for (uint32 x = ACTION_BAR_INDEX_START+1; x < ACTION_BAR_INDEX_END; ++x)
SetActionBar(x,0,ACT_PASSIVE);
}
@@ -12342,7 +12338,7 @@ void CharmInfo::InitPossessCreateSpells()
InitEmptyActionBar();
if(m_unit->GetTypeId() == TYPEID_UNIT)
{
- for(uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
+ for (uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
{
uint32 spellId = ((Creature*)m_unit)->m_spells[i];
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
@@ -12366,7 +12362,7 @@ void CharmInfo::InitCharmCreateSpells()
InitPetActionBar();
- for(uint32 x = 0; x < MAX_SPELL_CHARM; ++x)
+ for (uint32 x = 0; x < MAX_SPELL_CHARM; ++x)
{
uint32 spellId = ((Creature*)m_unit)->m_spells[x];
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
@@ -12396,7 +12392,7 @@ void CharmInfo::InitCharmCreateSpells()
else
{
bool autocast = false;
- for(uint32 i = 0; i < MAX_SPELL_EFFECTS && !autocast; ++i)
+ for (uint32 i = 0; i < MAX_SPELL_EFFECTS && !autocast; ++i)
if(SpellTargetType[spellInfo->EffectImplicitTargetA[i]] == TARGET_TYPE_UNIT_TARGET)
autocast = true;
@@ -12420,7 +12416,7 @@ bool CharmInfo::AddSpellToActionBar(uint32 spell_id, ActiveStates newstate)
uint32 first_id = spellmgr.GetFirstSpellInChain(spell_id);
// new spell rank can be already listed
- for(uint8 i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i)
+ for (uint8 i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i)
{
if (uint32 action = PetActionBar[i].GetAction())
{
@@ -12433,7 +12429,7 @@ bool CharmInfo::AddSpellToActionBar(uint32 spell_id, ActiveStates newstate)
}
// or use empty slot in other case
- for(uint8 i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i)
+ for (uint8 i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i)
{
if (!PetActionBar[i].GetAction() && PetActionBar[i].IsActionBarForSpell())
{
@@ -12448,7 +12444,7 @@ bool CharmInfo::RemoveSpellFromActionBar(uint32 spell_id)
{
uint32 first_id = spellmgr.GetFirstSpellInChain(spell_id);
- for(uint8 i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i)
+ for (uint8 i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i)
{
if (uint32 action = PetActionBar[i].GetAction())
{
@@ -12468,7 +12464,7 @@ void CharmInfo::ToggleCreatureAutocast(uint32 spellid, bool apply)
if(IsPassiveSpell(spellid))
return;
- for(uint32 x = 0; x < MAX_SPELL_CHARM; ++x)
+ for (uint32 x = 0; x < MAX_SPELL_CHARM; ++x)
if(spellid == m_charmspells[x].GetAction())
m_charmspells[x].SetType(apply ? ACT_ENABLED : ACT_DISABLED);
}
@@ -12493,7 +12489,7 @@ void CharmInfo::LoadPetActionBar(const std::string& data )
uint8 index;
Tokens::iterator iter;
- for(iter = tokens.begin(), index = ACTION_BAR_INDEX_PET_SPELL_START; index < ACTION_BAR_INDEX_PET_SPELL_END; ++iter, ++index )
+ for (iter = tokens.begin(), index = ACTION_BAR_INDEX_PET_SPELL_START; index < ACTION_BAR_INDEX_PET_SPELL_END; ++iter, ++index )
{
// use unsigned cast to avoid sign negative format use at long-> ActiveStates (int) conversion
uint8 type = atol((*iter).c_str());
@@ -12515,13 +12511,13 @@ void CharmInfo::LoadPetActionBar(const std::string& data )
void CharmInfo::BuildActionBar( WorldPacket* data )
{
- for(uint32 i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i)
+ for (uint32 i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i)
*data << uint32(PetActionBar[i].packedData);
}
void CharmInfo::SetSpellAutocast( uint32 spell_id, bool state )
{
- for(uint8 i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i)
+ for (uint8 i = 0; i < MAX_UNIT_ACTION_BAR_INDEX; ++i)
{
if(spell_id == PetActionBar[i].GetAction() && PetActionBar[i].IsActionBarForSpell())
{
@@ -12715,7 +12711,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
ProcTriggeredList procTriggered;
// Fill procTriggered list
- for(AuraMap::const_iterator itr = GetAuras().begin(); itr!= GetAuras().end(); ++itr)
+ for (AuraMap::const_iterator itr = GetAuras().begin(); itr!= GetAuras().end(); ++itr)
{
// Do not allow auras to proc from effect triggered by itself
if (procAura && procAura->Id == itr->first)
@@ -12727,7 +12723,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
if(!IsTriggeredAtSpellProcEvent(pTarget, triggerData.aura, procSpell, procFlag, procExtra, attType, isVictim, active, triggerData.spellProcEvent))
continue;
- for (uint8 i=0; i<MAX_SPELL_EFFECTS;++i)
+ for (uint8 i=0; i<MAX_SPELL_EFFECTS; ++i)
{
if (AuraEffect * aurEff = itr->second->GetPartAura(i))
{
@@ -12752,7 +12748,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
SetCantProc(true);
// Handle effects proceed this time
- for(ProcTriggeredList::const_iterator i = procTriggered.begin(); i != procTriggered.end(); ++i)
+ for (ProcTriggeredList::const_iterator i = procTriggered.begin(); i != procTriggered.end(); ++i)
{
// look for aura in auras list, it may be removed while proc event processing
if (!HasAura(i->aura))
@@ -12780,7 +12776,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
}
if (!handled)
- for (uint8 effIndex = 0; effIndex<MAX_SPELL_EFFECTS;++effIndex)
+ for (uint8 effIndex = 0; effIndex<MAX_SPELL_EFFECTS; ++effIndex)
{
if (!(i->effMask & (1<<effIndex)))
continue;
@@ -13117,7 +13113,7 @@ void Unit::ClearComboPointHolders()
void Unit::ClearAllReactives()
{
- for(uint8 i=0; i < MAX_REACTIVE; ++i)
+ for (uint8 i=0; i < MAX_REACTIVE; ++i)
m_reactiveTimer[i] = 0;
if (HasAuraState( AURA_STATE_DEFENSE))
@@ -13130,7 +13126,7 @@ void Unit::ClearAllReactives()
void Unit::UpdateReactives( uint32 p_time )
{
- for(uint8 i = 0; i < MAX_REACTIVE; ++i)
+ for (uint8 i = 0; i < MAX_REACTIVE; ++i)
{
ReactiveType reactive = ReactiveType(i);
@@ -13178,7 +13174,7 @@ Unit* Unit::SelectNearbyTarget(float dist) const
targets.remove(getVictim());
// remove not LoS targets
- for(std::list<Unit *>::iterator tIter = targets.begin(); tIter != targets.end();)
+ for (std::list<Unit *>::iterator tIter = targets.begin(); tIter != targets.end(); )
{
if(!IsWithinLOSInMap(*tIter))
{
@@ -13197,7 +13193,7 @@ Unit* Unit::SelectNearbyTarget(float dist) const
// select random
uint32 rIdx = urand(0,targets.size()-1);
std::list<Unit *>::const_iterator tcIter = targets.begin();
- for(uint32 i = 0; i < rIdx; ++i)
+ for (uint32 i = 0; i < rIdx; ++i)
++tcIter;
return *tcIter;
@@ -13254,7 +13250,7 @@ uint32 Unit::GetCastingTimeForBonus( SpellEntry const *spellProto, DamageEffectT
bool DirectDamage = false;
bool AreaEffect = false;
- for ( uint32 i=0; i<MAX_SPELL_EFFECTS;i++)
+ for (uint32 i=0; i<MAX_SPELL_EFFECTS; i++)
{
switch ( spellProto->Effect[i] )
{
@@ -13311,7 +13307,7 @@ uint32 Unit::GetCastingTimeForBonus( SpellEntry const *spellProto, DamageEffectT
CastingTime /= 2;
// -5% of total per any additional effect
- for ( uint8 i=0; i<effects; ++i)
+ for (uint8 i=0; i<effects; ++i)
{
if ( CastingTime > 175 )
{
@@ -13383,7 +13379,7 @@ float Unit::GetAPMultiplier(WeaponAttackType attType, bool normalized)
AuraEffect* Unit::GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 iconId, uint8 effIndex) const
{
Unit::AuraEffectList const& mDummy = GetAurasByType(type);
- for(Unit::AuraEffectList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr)
+ for (Unit::AuraEffectList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr)
{
if (effIndex != (*itr)->GetEffIndex())
continue;
@@ -13520,7 +13516,7 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura * aura, SpellEntry co
}
// Aura added by spell can`t trigger from self (prevent drop charges/do triggers)
// But except periodic and kill triggers (can triggered from self)
- if(procSpell && procSpell->Id == spellProto->Id
+ if(procSpell && procSpell->Id == spellProto->Id
&& !(spellProto->procFlags&(PROC_FLAG_ON_TAKE_PERIODIC | PROC_FLAG_KILL)))
return false;
@@ -13721,7 +13717,7 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
if(!bRewardIsAllowed)
((Creature*)pVictim)->SetLootRecipient(NULL);
}
-
+
if(bRewardIsAllowed && pVictim->GetTypeId() == TYPEID_UNIT && ((Creature*)pVictim)->GetLootRecipient())
player = ((Creature*)pVictim)->GetLootRecipient();
// Reward player, his pets, and group/raid members
@@ -13742,7 +13738,7 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
if(pVictim->GetTypeId()==TYPEID_PLAYER && pVictim->getClass()==CLASS_PRIEST)
{
AuraEffectList const& vDummyAuras = pVictim->GetAurasByType(SPELL_AURA_DUMMY);
- for(AuraEffectList::const_iterator itr = vDummyAuras.begin(); itr != vDummyAuras.end(); ++itr)
+ for (AuraEffectList::const_iterator itr = vDummyAuras.begin(); itr != vDummyAuras.end(); ++itr)
{
if((*itr)->GetSpellProto()->SpellIconID==1654)
{
@@ -14380,7 +14376,7 @@ void Unit::GetRaidMember(std::list<Unit*> &nearMembers, float radius)
Group *pGroup = owner->GetGroup();
if(pGroup)
{
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* Target = itr->getSource();
@@ -14416,7 +14412,7 @@ void Unit::GetPartyMemberInDist(std::list<Unit*> &TagUnitMap, float radius)
{
uint8 subgroup = ((Player*)owner)->GetSubGroup();
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* Target = itr->getSource();
@@ -14453,7 +14449,7 @@ void Unit::GetPartyMembers(std::list<Unit*> &TagUnitMap)
{
uint8 subgroup = ((Player*)owner)->GetSubGroup();
- for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
+ for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* Target = itr->getSource();
@@ -14522,7 +14518,7 @@ void Unit::AddAura(uint32 spellId, Unit *target)
uint8 eff_mask=0;
Unit * source = this;
- for(uint32 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ for (uint32 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
if(spellInfo->Effect[i] == SPELL_EFFECT_APPLY_AURA || IsAreaAuraEffect(spellInfo->Effect[i]))
{
@@ -14666,11 +14662,11 @@ void Unit::SetPhaseMask(uint32 newPhaseMask, bool update)
if(!IsInWorld())
return;
- for(ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
+ for (ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
if((*itr)->GetTypeId() == TYPEID_UNIT)
(*itr)->SetPhaseMask(newPhaseMask,true);
- for(uint8 i = 0; i < MAX_SUMMON_SLOT; ++i)
+ for (uint8 i = 0; i < MAX_SUMMON_SLOT; ++i)
if(m_SummonSlot[i])
if(Creature *summon = GetMap()->GetCreature(m_SummonSlot[i]))
summon->SetPhaseMask(newPhaseMask,true);
@@ -14818,7 +14814,7 @@ void Unit::ExitVehicle()
Unit *vehicleBase = m_vehicle->GetBase();
const AuraEffectList &modAuras = vehicleBase->GetAurasByType(SPELL_AURA_CONTROL_VEHICLE);
- for(AuraEffectList::const_iterator itr = modAuras.begin(); itr != modAuras.end(); ++itr)
+ for (AuraEffectList::const_iterator itr = modAuras.begin(); itr != modAuras.end(); ++itr)
{
if((*itr)->GetParentAura()->GetSourceGUID() == GetGUID())
{
@@ -15019,7 +15015,6 @@ void Unit::SendThreatListUpdate()
}
}
-
void Unit::SendChangeCurrentVictimOpcode(HostilReference* pHostilReference)
{
if (uint32 count = getThreatManager().getThreatList().size())
@@ -15095,24 +15090,24 @@ void Unit::OutDebugInfo() const
sLog.outString("In world %u, unit type mask %u", (uint32)(IsInWorld() ? 1 : 0), m_unitTypeMask);
sLog.outStringInLine("Summon Slot: ");
- for(uint32 i = 0; i < MAX_SUMMON_SLOT; ++i)
+ for (uint32 i = 0; i < MAX_SUMMON_SLOT; ++i)
sLog.outStringInLine(UI64FMTD", ", m_SummonSlot[i]);
sLog.outString();
sLog.outStringInLine("Controlled List: ");
- for(ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
+ for (ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
sLog.outStringInLine(UI64FMTD", ", (*itr)->GetGUID());
sLog.outString();
sLog.outStringInLine("Aura List: ");
- for(AuraMap::const_iterator itr = m_Auras.begin(); itr != m_Auras.end(); ++itr)
+ for (AuraMap::const_iterator itr = m_Auras.begin(); itr != m_Auras.end(); ++itr)
sLog.outStringInLine("%u, ", itr->first);
sLog.outString();
if(IsVehicle())
{
sLog.outStringInLine("Passenger List: ");
- for(SeatMap::iterator itr = GetVehicleKit()->m_Seats.begin(); itr != GetVehicleKit()->m_Seats.end(); ++itr)
+ for (SeatMap::iterator itr = GetVehicleKit()->m_Seats.begin(); itr != GetVehicleKit()->m_Seats.end(); ++itr)
if(Unit *passenger = itr->second.passenger)
sLog.outStringInLine(UI64FMTD", ", passenger->GetGUID());
sLog.outString();
diff --git a/src/game/Unit.h b/src/game/Unit.h
index efe615d5c17..d6f22930c61 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -36,7 +36,6 @@
#include "DBCStructure.h"
#include <list>
-
#define WORLD_TRIGGER 12999
enum SpellInterruptFlags
@@ -671,7 +670,7 @@ enum MovementFlags
MOVEMENTFLAG_JUMPING |MOVEMENTFLAG_FALLING |MOVEMENTFLAG_ASCEND |
MOVEMENTFLAG_SPLINE,
MOVEMENTFLAG_TURNING =
- MOVEMENTFLAG_LEFT | MOVEMENTFLAG_RIGHT,
+ MOVEMENTFLAG_LEFT | MOVEMENTFLAG_RIGHT,
};
/*
@@ -891,7 +890,6 @@ enum CurrentSpellTypes
#define CURRENT_FIRST_NON_MELEE_SPELL 1
#define CURRENT_MAX_SPELL 4
-
enum ActiveStates
{
ACT_PASSIVE = 0x01, // 0x01 - passive
@@ -1208,7 +1206,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
float f_BaseAttackTime = GetFloatValue(UNIT_FIELD_BASEATTACKTIME+att) / m_modAttackSpeedPct[att];
return (uint32)f_BaseAttackTime;
}
-
+
void SetAttackTime(WeaponAttackType att, uint32 val) { SetFloatValue(UNIT_FIELD_BASEATTACKTIME+att,val*m_modAttackSpeedPct[att]); }
void ApplyAttackTimePercentMod(WeaponAttackType att,float val, bool apply);
void ApplyCastTimePercentMod(float val, bool apply);
@@ -1535,8 +1533,8 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
void ApplyResistanceBuffModsPercentMod(SpellSchools school, bool positive, float val, bool apply) { ApplyPercentModFloatValue(positive ? UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE+school : UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE+school, val, apply); }
void InitStatBuffMods()
{
- for(uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i) SetFloatValue(UNIT_FIELD_POSSTAT0+i, 0);
- for(uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i) SetFloatValue(UNIT_FIELD_NEGSTAT0+i, 0);
+ for (uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i) SetFloatValue(UNIT_FIELD_POSSTAT0+i, 0);
+ for (uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i) SetFloatValue(UNIT_FIELD_NEGSTAT0+i, 0);
}
void ApplyStatBuffMod(Stats stat, float val, bool apply) { ApplyModSignedFloatValue((val > 0 ? UNIT_FIELD_POSSTAT0+stat : UNIT_FIELD_NEGSTAT0+stat), val, apply); }
void ApplyStatPercentBuffMod(Stats stat, float val, bool apply)
diff --git a/src/game/UnitAI.cpp b/src/game/UnitAI.cpp
index 728e6f36916..85b8ad6abba 100644
--- a/src/game/UnitAI.cpp
+++ b/src/game/UnitAI.cpp
@@ -126,7 +126,7 @@ Unit* UnitAI::SelectTarget(SelectAggroTarget targetType, uint32 position, float
return NULL;
std::list<Unit*> targetList;
- for(std::list<HostilReference*>::iterator itr = m_threatlist.begin(); itr!= m_threatlist.end(); ++itr)
+ for (std::list<HostilReference*>::iterator itr = m_threatlist.begin(); itr!= m_threatlist.end(); ++itr)
if(SelectTargetHelper(me, (*itr)->getTarget(), playerOnly, dist, aura))
targetList.push_back((*itr)->getTarget());
@@ -195,7 +195,7 @@ void UnitAI::SelectTargetList(std::list<Unit*> &targetList, uint32 num, SelectAg
if(m_threatlist.empty())
return;
- for(std::list<HostilReference*>::iterator itr = m_threatlist.begin(); itr!= m_threatlist.end(); ++itr)
+ for (std::list<HostilReference*>::iterator itr = m_threatlist.begin(); itr!= m_threatlist.end(); ++itr)
if(SelectTargetHelper(me, (*itr)->getTarget(), playerOnly, dist, aura))
targetList.push_back((*itr)->getTarget());
@@ -284,7 +284,7 @@ void UnitAI::FillAISpellInfo()
AISpellInfoType *AIInfo = AISpellInfo;
const SpellEntry * spellInfo;
- for(uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i, ++AIInfo)
+ for (uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i, ++AIInfo)
{
spellInfo = GetSpellStore()->LookupEntry(i);
if(!spellInfo)
@@ -304,7 +304,7 @@ void UnitAI::FillAISpellInfo()
UPDATE_TARGET(AITARGET_SELF)
else
{
- for(uint32 j = 0; j < 3; ++j)
+ for (uint32 j = 0; j < 3; ++j)
{
uint32 targetType = spellInfo->EffectImplicitTargetA[j];
@@ -341,7 +341,7 @@ void SimpleCharmedAI::UpdateAI(const uint32 /*diff*/)
if(charmer->IsInEvadeMode())
{
Unit::AuraEffectList const& auras = me->GetAurasByType(SPELL_AURA_MOD_CHARM);
- for(Unit::AuraEffectList::const_iterator iter = auras.begin(); iter != auras.end(); ++iter)
+ for (Unit::AuraEffectList::const_iterator iter = auras.begin(); iter != auras.end(); ++iter)
if((*iter)->GetCasterGUID() == charmer->GetGUID() && (*iter)->GetParentAura()->IsPermanent())
{
charmer->Kill(me);
diff --git a/src/game/UpdateData.cpp b/src/game/UpdateData.cpp
index e461d63e248..ccf51d2dc8a 100644
--- a/src/game/UpdateData.cpp
+++ b/src/game/UpdateData.cpp
@@ -116,7 +116,7 @@ bool UpdateData::BuildPacket(WorldPacket *packet)
buf << (uint8) UPDATETYPE_OUT_OF_RANGE_OBJECTS;
buf << (uint32) m_outOfRangeGUIDs.size();
- for(std::set<uint64>::const_iterator i = m_outOfRangeGUIDs.begin(); i != m_outOfRangeGUIDs.end(); ++i)
+ for (std::set<uint64>::const_iterator i = m_outOfRangeGUIDs.begin(); i != m_outOfRangeGUIDs.end(); ++i)
{
buf.appendPackGUID(*i);
}
diff --git a/src/game/Vehicle.cpp b/src/game/Vehicle.cpp
index 50236430bbe..01519c999a4 100644
--- a/src/game/Vehicle.cpp
+++ b/src/game/Vehicle.cpp
@@ -29,7 +29,7 @@
Vehicle::Vehicle(Unit *unit, VehicleEntry const *vehInfo) : me(unit), m_vehicleInfo(vehInfo), m_usableSeatNum(0)
{
- for(uint32 i = 0; i < 8; ++i)
+ for (uint32 i = 0; i < 8; ++i)
{
if(uint32 seatId = m_vehicleInfo->m_seatID[i])
if(VehicleSeatEntry const *veSeat = sVehicleSeatStore.LookupEntry(seatId))
@@ -37,14 +37,14 @@ Vehicle::Vehicle(Unit *unit, VehicleEntry const *vehInfo) : me(unit), m_vehicleI
m_Seats.insert(std::make_pair(i, VehicleSeat(veSeat)));
if(veSeat->IsUsable())
++m_usableSeatNum;
- }
+ }
}
assert(!m_Seats.empty());
}
Vehicle::~Vehicle()
{
- for(SeatMap::const_iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
+ for (SeatMap::const_iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
assert(!itr->second.passenger);
}
@@ -64,7 +64,7 @@ void Vehicle::Install()
}
else
{
- for(uint32 i = 0; i < MAX_SPELL_VEHICLE; ++i)
+ for (uint32 i = 0; i < MAX_SPELL_VEHICLE; ++i)
{
if(!cre->m_spells[i])
continue;
@@ -121,7 +121,7 @@ void Vehicle::InstallAllAccessories()
void Vehicle::Uninstall()
{
sLog.outDebug("Vehicle::Uninstall %u", me->GetEntry());
- for(SeatMap::iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
+ for (SeatMap::iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
if(Unit *passenger = itr->second.passenger)
if(passenger->HasUnitTypeMask(UNIT_MASK_ACCESSORY))
((TempSummon*)passenger)->UnSummon();
@@ -131,7 +131,7 @@ void Vehicle::Uninstall()
void Vehicle::Die()
{
sLog.outDebug("Vehicle::Die %u", me->GetEntry());
- for(SeatMap::iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
+ for (SeatMap::iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
if(Unit *passenger = itr->second.passenger)
if(passenger->HasUnitTypeMask(UNIT_MASK_ACCESSORY))
passenger->setDeathState(JUST_DIED);
@@ -149,7 +149,7 @@ void Vehicle::Reset()
void Vehicle::RemoveAllPassengers()
{
sLog.outDebug("Vehicle::RemoveAllPassengers");
- for(SeatMap::iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
+ for (SeatMap::iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
if(Unit *passenger = itr->second.passenger)
{
if(passenger->IsVehicle())
@@ -238,7 +238,7 @@ bool Vehicle::AddPassenger(Unit *unit, int8 seatId)
SeatMap::iterator seat;
if(seatId < 0) // no specific seat requirement
{
- for(seat = m_Seats.begin(); seat != m_Seats.end(); ++seat)
+ for (seat = m_Seats.begin(); seat != m_Seats.end(); ++seat)
if(!seat->second.passenger && seat->second.seatInfo->IsUsable())
break;
@@ -312,7 +312,7 @@ void Vehicle::RemovePassenger(Unit *unit)
return;
SeatMap::iterator seat;
- for(seat = m_Seats.begin(); seat != m_Seats.end(); ++seat)
+ for (seat = m_Seats.begin(); seat != m_Seats.end(); ++seat)
if(seat->second.passenger == unit)
break;
diff --git a/src/game/WaypointManager.cpp b/src/game/WaypointManager.cpp
index b9fb027d9c5..e7079321206 100644
--- a/src/game/WaypointManager.cpp
+++ b/src/game/WaypointManager.cpp
@@ -101,7 +101,7 @@ void WaypointStore::UpdatePath(uint32 id)
{
if(waypoint_map.find(id)!= waypoint_map.end())
waypoint_map[id]->clear();
-
+
QueryResult *result;
result = WorldDatabase.PQuery("SELECT id,point,position_x,position_y,position_z,move_flag,delay,action,action_chance FROM waypoint_data WHERE id = %u ORDER BY point", id);
diff --git a/src/game/WaypointMovementGenerator.cpp b/src/game/WaypointMovementGenerator.cpp
index cba005a78d9..fe5d20bbc91 100644
--- a/src/game/WaypointMovementGenerator.cpp
+++ b/src/game/WaypointMovementGenerator.cpp
@@ -56,7 +56,7 @@ bool WaypointMovementGenerator<Creature>::GetDestination(float &x, float &y, flo
{
if(i_destinationHolder.HasArrived())
return false;
-
+
i_destinationHolder.GetDestination(x, y, z);
return true;
}
@@ -235,7 +235,7 @@ uint32 FlightPathMovementGenerator::GetPathAtMapEnd() const
return i_mapIds.size();
uint32 curMapId = i_mapIds[i_currentNode];
- for(uint32 i = i_currentNode; i < i_mapIds.size(); ++i)
+ for (uint32 i = i_currentNode; i < i_mapIds.size(); ++i)
{
if(i_mapIds[i] != curMapId)
return i;
@@ -326,7 +326,7 @@ void FlightPathMovementGenerator::SetCurrentNodeAfterTeleport()
return;
uint32 map0 = i_mapIds[0];
- for(size_t i = 1; i < i_mapIds.size(); ++i)
+ for (size_t i = 1; i < i_mapIds.size(); ++i)
{
if(i_mapIds[i]!=map0)
{
diff --git a/src/game/Wintergrasp.cpp b/src/game/Wintergrasp.cpp
index ea336ec870e..9b17f5bd252 100644
--- a/src/game/Wintergrasp.cpp
+++ b/src/game/Wintergrasp.cpp
@@ -248,7 +248,7 @@ bool OPvPWintergrasp::SetupOutdoorPvP()
// Load Graveyard
GraveYardMap::const_iterator graveLow = objmgr.mGraveYardMap.lower_bound(ZONE_WINTERGRASP);
GraveYardMap::const_iterator graveUp = objmgr.mGraveYardMap.upper_bound(ZONE_WINTERGRASP);
- for (AreaPOIList::iterator itr = areaPOIs.begin(); itr != areaPOIs.end();)
+ for (AreaPOIList::iterator itr = areaPOIs.begin(); itr != areaPOIs.end(); )
{
if ((*itr)->icon[1] == 8)
{
diff --git a/src/game/Wintergrasp.h b/src/game/Wintergrasp.h
index 92a7b2acd9b..7db42e759e2 100644
--- a/src/game/Wintergrasp.h
+++ b/src/game/Wintergrasp.h
@@ -66,7 +66,6 @@ enum WintergraspRewardEvent
WG_REWARD_EVENT_MAX,
};
-
/* Not used / Not implemented
const uint16 GameEventWintergraspDefender[2] = {50, 51};
diff --git a/src/game/World.cpp b/src/game/World.cpp
index 17b2529002f..81784f2c09a 100644
--- a/src/game/World.cpp
+++ b/src/game/World.cpp
@@ -280,7 +280,7 @@ bool World::HasRecentlyDisconnected(WorldSession* session)
if (uint32 tolerance = getConfig(CONFIG_INTERVAL_DISCONNECT_TOLERANCE))
{
- for (DisconnectMap::iterator i = m_disconnects.begin(); i != m_disconnects.end();)
+ for (DisconnectMap::iterator i = m_disconnects.begin(); i != m_disconnects.end(); )
{
if (difftime(i->second, time(NULL)) < tolerance)
{
@@ -335,7 +335,7 @@ bool World::RemoveQueuedPlayer(WorldSession* sess)
// search to remove and count skipped positions
bool found = false;
- for (;iter != m_QueuedPlayer.end(); ++iter, ++position)
+ for (; iter != m_QueuedPlayer.end(); ++iter, ++position)
{
if (*iter==sess)
{
@@ -1078,7 +1078,7 @@ void World::LoadConfigSettings(bool reload)
sLog.outError("Visibility.Distance.Continents can't be greater %f",MAX_VISIBILITY_DISTANCE - m_VisibleUnitGreyDistance);
m_MaxVisibleDistanceOnContinents = MAX_VISIBILITY_DISTANCE - m_VisibleUnitGreyDistance;
}
-
+
//visibility in instances
m_MaxVisibleDistanceInInstances = sConfig.GetFloatDefault("Visibility.Distance.Instances", DEFAULT_VISIBILITY_INSTANCE);
if(m_MaxVisibleDistanceInInstances < 45*sWorld.getRate(RATE_CREATURE_AGGRO))
@@ -1091,7 +1091,7 @@ void World::LoadConfigSettings(bool reload)
sLog.outError("Visibility.Distance.Instances can't be greater %f",MAX_VISIBILITY_DISTANCE - m_VisibleUnitGreyDistance);
m_MaxVisibleDistanceInInstances = MAX_VISIBILITY_DISTANCE - m_VisibleUnitGreyDistance;
}
-
+
//visibility in BG/Arenas
m_MaxVisibleDistanceInBGArenas = sConfig.GetFloatDefault("Visibility.Distance.BGArenas", DEFAULT_VISIBILITY_BGARENAS);
if(m_MaxVisibleDistanceInBGArenas < 45*sWorld.getRate(RATE_CREATURE_AGGRO))
@@ -1151,7 +1151,6 @@ void World::LoadConfigSettings(bool reload)
sLog.outString("WORLD: VMap data directory is: %svmaps",m_dataPath.c_str());
sLog.outString("WORLD: VMap config keys are: vmap.enableLOS, vmap.enableHeight, vmap.ignoreMapIds, vmap.ignoreSpellIds");
-
m_configs[CONFIG_MAX_WHO] = sConfig.GetIntDefault("MaxWhoListReturns", 49);
m_configs[CONFIG_PET_LOS] = sConfig.GetBoolDefault("vmap.petLOS", false);
m_configs[CONFIG_BG_START_MUSIC] = sConfig.GetBoolDefault("MusicInBattleground", false);
@@ -1171,7 +1170,7 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_ENABLED] = sConfig.GetBoolDefault("OutdoorPvP.Wintergrasp.Enabled", true);
m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_START_TIME] = sConfig.GetIntDefault("OutdoorPvP.Wintergrasp.StartTime", 30);
- m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_BATTLE_TIME] = sConfig.GetIntDefault("OutdoorPvP.Wintergrasp.BattleTime", 30);
+ m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_BATTLE_TIME] = sConfig.GetIntDefault("OutdoorPvP.Wintergrasp.BattleTime", 30);
m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_INTERVAL] = sConfig.GetIntDefault("OutdoorPvP.Wintergrasp.Interval", 150);
m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_CUSTOM_HONOR] = sConfig.GetBoolDefault("OutdoorPvP.Wintergrasp.CustomHonorRewards", false);
m_configs[CONFIG_OUTDOORPVP_WINTERGRASP_WIN_BATTLE] = sConfig.GetIntDefault("OutdoorPvP.Wintergrasp.CustomHonorBattleWin", 3000);
@@ -1930,11 +1929,9 @@ void World::Update(uint32 diff)
sBattleGroundMgr.Update(diff);
RecordTimeDiff("UpdateBattleGroundMgr");
-
sOutdoorPvPMgr.Update(diff);
RecordTimeDiff("UpdateOutdoorPvPMgr");
-
// execute callbacks from sql queries that were queued recently
UpdateResultQueue();
RecordTimeDiff("UpdateResultQueue");
diff --git a/src/game/World.h b/src/game/World.h
index 5e64e74661e..a5de315ad7a 100644
--- a/src/game/World.h
+++ b/src/game/World.h
@@ -254,7 +254,7 @@ enum WorldConfigs
CONFIG_MIN_LOG_UPDATE,
CONFIG_CHECK_DB,
CONFIG_ENABLE_SINFO_LOGIN,
- CONFIG_PET_LOS,
+ CONFIG_PET_LOS,
CONFIG_NUMTHREADS,
CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN,
CONFIG_CHATLOG_CHANNEL,
@@ -588,7 +588,7 @@ class World
static float GetMaxVisibleDistanceInInstances() { return m_MaxVisibleDistanceInInstances; }
static float GetMaxVisibleDistanceInBGArenas() { return m_MaxVisibleDistanceInBGArenas; }
static float GetMaxVisibleDistanceForObject() { return m_MaxVisibleDistanceForObject; }
-
+
static float GetMaxVisibleDistanceInFlight() { return m_MaxVisibleDistanceInFlight; }
static float GetVisibleUnitGreyDistance() { return m_VisibleUnitGreyDistance; }
static float GetVisibleObjectGreyDistance() { return m_VisibleObjectGreyDistance; }
@@ -676,7 +676,7 @@ class World
static float m_MaxVisibleDistanceInInstances;
static float m_MaxVisibleDistanceInBGArenas;
static float m_MaxVisibleDistanceForObject;
-
+
static float m_MaxVisibleDistanceInFlight;
static float m_VisibleUnitGreyDistance;
static float m_VisibleObjectGreyDistance;
diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp
index f5515bf78c1..83144d2644f 100644
--- a/src/game/WorldSession.cpp
+++ b/src/game/WorldSession.cpp
@@ -162,7 +162,7 @@ void WorldSession::LogUnprocessedTail(WorldPacket *packet)
LookupOpcodeName(packet->GetOpcode()),
packet->GetOpcode(),
packet->rpos(),packet->wpos());
-
+
packet->print_storage();
}
@@ -321,7 +321,7 @@ void WorldSession::LogoutPlayer(bool Save)
// build set of player who attack _player or who have pet attacking of _player
std::set<Player*> aset;
- for(Unit::AttackerSet::const_iterator itr = _player->getAttackers().begin(); itr != _player->getAttackers().end(); ++itr)
+ for (Unit::AttackerSet::const_iterator itr = _player->getAttackers().begin(); itr != _player->getAttackers().end(); ++itr)
{
Unit* owner = (*itr)->GetOwner(); // including player controlled case
if(owner)
@@ -340,7 +340,7 @@ void WorldSession::LogoutPlayer(bool Save)
_player->RepopAtGraveyard();
// give honor to all attackers from set like group case
- for(std::set<Player*>::const_iterator itr = aset.begin(); itr != aset.end(); ++itr)
+ for (std::set<Player*>::const_iterator itr = aset.begin(); itr != aset.end(); ++itr)
(*itr)->RewardHonor(_player,aset.size());
// give bg rewards and update counters like kill by first from attackers
@@ -405,7 +405,7 @@ void WorldSession::LogoutPlayer(bool Save)
if(Save)
{
uint32 eslot;
- for(int j = BUYBACK_SLOT_START; j < BUYBACK_SLOT_END; ++j)
+ for (int j = BUYBACK_SLOT_START; j < BUYBACK_SLOT_END; ++j)
{
eslot = j - BUYBACK_SLOT_START;
_player->SetUInt64Value(PLAYER_FIELD_VENDORBUYBACK_SLOT_1 + (eslot * 2), 0);
@@ -658,14 +658,14 @@ void WorldSession::SendAccountDataTimes()
WorldPacket data( SMSG_ACCOUNT_DATA_TIMES, 4+1+8*4 ); // changed in WotLK
data << uint32(time(NULL)); // unix time of something
data << uint8(1);
- for(int i = 0; i < NUM_ACCOUNT_DATA_TYPES; ++i)
+ for (int i = 0; i < NUM_ACCOUNT_DATA_TYPES; ++i)
data << uint32(m_accountData[i].Time); // also unix time
SendPacket(&data);
}
void WorldSession::LoadTutorialsData()
{
- for ( int aX = 0 ; aX < 8 ; ++aX )
+ for (int aX = 0 ; aX < 8 ; ++aX )
m_Tutorials[ aX ] = 0;
QueryResult *result = CharacterDatabase.PQuery("SELECT tut0,tut1,tut2,tut3,tut4,tut5,tut6,tut7 FROM character_tutorial WHERE account = '%u'", GetAccountId());
@@ -690,7 +690,7 @@ void WorldSession::LoadTutorialsData()
void WorldSession::SendTutorialsData()
{
WorldPacket data(SMSG_TUTORIAL_FLAGS, 4*8);
- for(uint32 i = 0; i < 8; ++i)
+ for (uint32 i = 0; i < 8; ++i)
data << m_Tutorials[i];
SendPacket(&data);
}
@@ -794,7 +794,7 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
uint32 addonsCount;
addonInfo >> addonsCount; // addons count
- for(uint32 i = 0; i < addonsCount; ++i)
+ for (uint32 i = 0; i < addonsCount; ++i)
{
std::string addonName;
uint8 enabled;
@@ -847,7 +847,7 @@ void WorldSession::SendAddonsInfo()
WorldPacket data(SMSG_ADDON_INFO, 4);
- for(AddonsList::iterator itr = m_addonsList.begin(); itr != m_addonsList.end(); ++itr)
+ for (AddonsList::iterator itr = m_addonsList.begin(); itr != m_addonsList.end(); ++itr)
{
uint8 state = 2; // 2 is sent here
data << uint8(state);
@@ -877,7 +877,7 @@ void WorldSession::SendAddonsInfo()
uint32 count = 0;
data << uint32(count);
- /*for(uint32 i = 0; i < count; ++i)
+ /*for (uint32 i = 0; i < count; ++i)
{
uint32
string (16 bytes)
@@ -895,4 +895,4 @@ void WorldSession::SetPlayer( Player *plr )
// set m_GUID that can be used while player loggined and later until m_playerRecentlyLogout not reset
if(_player)
m_GUIDLow = _player->GetGUIDLow();
-} \ No newline at end of file
+}
diff --git a/src/game/WorldSocket.cpp b/src/game/WorldSocket.cpp
index 1b63ec01421..c45e6b943d6 100644
--- a/src/game/WorldSocket.cpp
+++ b/src/game/WorldSocket.cpp
@@ -965,10 +965,9 @@ int WorldSocket::iSendPacket (const WorldPacket& pct)
errno = ENOBUFS;
return -1;
}
-
-
+
m_Crypt.EncryptSend ( header.header, header.getHeaderLength());
-
+
if (m_OutBuffer->copy ((char*) header.header, header.getHeaderLength()) == -1)
ACE_ASSERT (false);
diff --git a/src/game/WorldSocketMgr.cpp b/src/game/WorldSocketMgr.cpp
index cc08962efa5..2a34041c43f 100644
--- a/src/game/WorldSocketMgr.cpp
+++ b/src/game/WorldSocketMgr.cpp
@@ -171,7 +171,7 @@ class ReactorRunnable : protected ACE_Task_Base
AddNewSockets ();
- for (i = m_Sockets.begin (); i != m_Sockets.end ();)
+ for (i = m_Sockets.begin (); i != m_Sockets.end (); )
{
if ((*i)->Update () == -1)
{
diff --git a/src/shared/ByteBuffer.h b/src/shared/ByteBuffer.h
index b22dbdee729..d5001cfc1bf 100644
--- a/src/shared/ByteBuffer.h
+++ b/src/shared/ByteBuffer.h
@@ -306,7 +306,7 @@ class ByteBuffer
uint8 guidmark = 0;
(*this) >> guidmark;
- for(int i = 0; i < 8; ++i)
+ for (int i = 0; i < 8; ++i)
{
if(guidmark & (uint8(1) << i))
{
@@ -391,7 +391,7 @@ class ByteBuffer
size_t mask_position = wpos();
*this << uint8(0);
- for(uint8 i = 0; i < 8; ++i)
+ for (uint8 i = 0; i < 8; ++i)
{
if(guid & 0xFF)
{
@@ -416,7 +416,7 @@ class ByteBuffer
return;
sLog.outDebug("STORAGE_SIZE: %lu", (unsigned long)size() );
- for(uint32 i = 0; i < size(); ++i)
+ for (uint32 i = 0; i < size(); ++i)
sLog.outDebugInLine("%u - ", read<uint8>(i) );
sLog.outDebug(" ");
}
@@ -427,7 +427,7 @@ class ByteBuffer
return;
sLog.outDebug("STORAGE_SIZE: %lu", (unsigned long)size() );
- for(uint32 i = 0; i < size(); ++i)
+ for (uint32 i = 0; i < size(); ++i)
sLog.outDebugInLine("%c", read<uint8>(i) );
sLog.outDebug(" ");
}
@@ -440,7 +440,7 @@ class ByteBuffer
uint32 j = 1, k = 1;
sLog.outDebug("STORAGE_SIZE: %lu", (unsigned long)size() );
- for(uint32 i = 0; i < size(); ++i)
+ for (uint32 i = 0; i < size(); ++i)
{
if ((i == (j * 8)) && ((i != (k * 16))))
{
diff --git a/src/shared/Common.cpp b/src/shared/Common.cpp
index 27ae9184d69..5e12f4aa52b 100644
--- a/src/shared/Common.cpp
+++ b/src/shared/Common.cpp
@@ -34,7 +34,7 @@ char const* localeNames[MAX_LOCALE] = {
LocaleConstant GetLocaleByName(const std::string& name)
{
- for(uint32 i = 0; i < MAX_LOCALE; ++i)
+ for (uint32 i = 0; i < MAX_LOCALE; ++i)
if(name==localeNames[i])
return LocaleConstant(i);
diff --git a/src/shared/Common.h b/src/shared/Common.h
index 8c948fb1d6d..58d9b25fd22 100644
--- a/src/shared/Common.h
+++ b/src/shared/Common.h
@@ -108,7 +108,6 @@
#include <ace/RW_Thread_Mutex.h>
#include <ace/Thread_Mutex.h>
-
#if PLATFORM == PLATFORM_WINDOWS
# define FD_SETSIZE 4096
# include <ace/config-all.h>
diff --git a/src/shared/Config/Config.cpp b/src/shared/Config/Config.cpp
index b56b804b50a..1f37bce5227 100644
--- a/src/shared/Config/Config.cpp
+++ b/src/shared/Config/Config.cpp
@@ -27,13 +27,11 @@ Config::Config() : mIgnoreCase(true), mConf(NULL)
{
}
-
Config::~Config()
{
delete mConf;
}
-
bool Config::SetSource(const char *file, bool ignorecase)
{
mIgnoreCase = ignorecase;
diff --git a/src/shared/Config/dotconfpp/dotconfpp.cpp b/src/shared/Config/dotconfpp/dotconfpp.cpp
index e779637256e..8760b118e38 100644
--- a/src/shared/Config/dotconfpp/dotconfpp.cpp
+++ b/src/shared/Config/dotconfpp/dotconfpp.cpp
@@ -29,7 +29,7 @@ DOTCONFDocumentNode::~DOTCONFDocumentNode()
{
free(name);
if(values != NULL){
- for(int i = 0 ; i < valuesCount; i++){
+ for (int i = 0 ; i < valuesCount; i++){
free(values[i]);
}
free(values);
@@ -67,13 +67,13 @@ DOTCONFDocument::DOTCONFDocument(DOTCONFDocument::CaseSensitive caseSensitivity)
DOTCONFDocument::~DOTCONFDocument()
{
- for(std::list<DOTCONFDocumentNode*>::iterator i = nodeTree.begin(); i != nodeTree.end(); ++i){
+ for (std::list<DOTCONFDocumentNode*>::iterator i = nodeTree.begin(); i != nodeTree.end(); ++i){
delete(*i);
}
- for(std::list<char*>::iterator i = requiredOptions.begin(); i != requiredOptions.end(); ++i){
+ for (std::list<char*>::iterator i = requiredOptions.begin(); i != requiredOptions.end(); ++i){
free(*i);
}
- for(std::list<char*>::iterator i = processedFiles.begin(); i != processedFiles.end(); ++i){
+ for (std::list<char*>::iterator i = processedFiles.begin(); i != processedFiles.end(); ++i){
free(*i);
}
free(fileName);
@@ -189,7 +189,7 @@ int DOTCONFDocument::parseLine()
DOTCONFDocumentNode * tagNode = NULL;
bool newNode = false;
- for(std::list<char*>::iterator i = words.begin(); i != words.end(); ++i) {
+ for (std::list<char*>::iterator i = words.begin(); i != words.end(); ++i) {
word = *i;
if(*word == '<'){
@@ -218,7 +218,7 @@ int DOTCONFDocument::parseLine()
} else {
nodeName+=2;
std::list<DOTCONFDocumentNode*>::reverse_iterator itr=nodeTree.rbegin();
- for(; itr!=nodeTree.rend(); ++itr){
+ for (; itr!=nodeTree.rend(); ++itr){
if(!cmp_func(nodeName, (*itr)->name) && !(*itr)->closed){
(*itr)->closed = true;
curParent = (*itr)->parentNode;
@@ -307,7 +307,7 @@ int DOTCONFDocument::checkConfig(const std::list<DOTCONFDocumentNode*>::iterator
DOTCONFDocumentNode * tagNode = NULL;
int vi = 0;
- for(std::list<DOTCONFDocumentNode*>::iterator i = from; i != nodeTree.end(); ++i){
+ for (std::list<DOTCONFDocumentNode*>::iterator i = from; i != nodeTree.end(); ++i){
tagNode = *i;
if(!tagNode->closed){
error(tagNode->lineNum, tagNode->fileName, "unclosed tag %s", tagNode->name);
@@ -371,7 +371,7 @@ int DOTCONFDocument::setContent(const char * _fileName)
std::list<DOTCONFDocumentNode*>::iterator from;
DOTCONFDocumentNode * tagNode = NULL;
int vi = 0;
- for(std::list<DOTCONFDocumentNode*>::iterator i = nodeTree.begin(); i!=nodeTree.end(); ++i){
+ for (std::list<DOTCONFDocumentNode*>::iterator i = nodeTree.begin(); i!=nodeTree.end(); ++i){
tagNode = *i;
if(!cmp_func("DOTCONFPPIncludeFile", tagNode->name)){
vi = 0;
@@ -386,7 +386,7 @@ int DOTCONFDocument::setContent(const char * _fileName)
}
bool processed = false;
- for(std::list<char*>::const_iterator itInode = processedFiles.begin(); itInode != processedFiles.end(); ++itInode){
+ for (std::list<char*>::const_iterator itInode = processedFiles.begin(); itInode != processedFiles.end(); ++itInode){
if(!strcmp(*itInode, realpathBuf)){
processed = true;
break;
@@ -419,7 +419,6 @@ int DOTCONFDocument::setContent(const char * _fileName)
}
}
-
if(!requiredOptions.empty())
ret = checkRequiredOptions();
}
@@ -429,9 +428,9 @@ int DOTCONFDocument::setContent(const char * _fileName)
int DOTCONFDocument::checkRequiredOptions()
{
- for(std::list<char*>::const_iterator ci = requiredOptions.begin(); ci != requiredOptions.end(); ++ci){
+ for (std::list<char*>::const_iterator ci = requiredOptions.begin(); ci != requiredOptions.end(); ++ci){
bool matched = false;
- for(std::list<DOTCONFDocumentNode*>::iterator i = nodeTree.begin(); i!=nodeTree.end(); ++i){
+ for (std::list<DOTCONFDocumentNode*>::iterator i = nodeTree.begin(); i!=nodeTree.end(); ++i){
if(!cmp_func((*i)->name, *ci)){
matched = true;
break;
@@ -499,7 +498,7 @@ char * DOTCONFDocument::getSubstitution(char * macro, int lineNum)
} else {
std::list<DOTCONFDocumentNode*>::iterator i = nodeTree.begin();
DOTCONFDocumentNode * tagNode = NULL;
- for(; i!=nodeTree.end(); i++){
+ for (; i!=nodeTree.end(); i++){
tagNode = *i;
if(!cmp_func(tagNode->name, variable)){
if(tagNode->valuesCount != 0){
@@ -566,7 +565,6 @@ const DOTCONFDocumentNode * DOTCONFDocument::getFirstNode() const
const DOTCONFDocumentNode * DOTCONFDocument::findNode(const char * nodeName, const DOTCONFDocumentNode * parentNode, const DOTCONFDocumentNode * startNode) const
{
-
std::list<DOTCONFDocumentNode*>::const_iterator i = nodeTree.begin();
if(startNode == NULL)
@@ -579,7 +577,7 @@ const DOTCONFDocumentNode * DOTCONFDocument::findNode(const char * nodeName, con
if( i != nodeTree.end() ) ++i;
}
- for(; i!=nodeTree.end(); ++i){
+ for (; i!=nodeTree.end(); ++i){
if((*i)->parentNode != parentNode){
continue;
diff --git a/src/shared/Config/dotconfpp/dotconfpp.h b/src/shared/Config/dotconfpp/dotconfpp.h
index 51455854ee7..554b152f693 100644
--- a/src/shared/Config/dotconfpp/dotconfpp.h
+++ b/src/shared/Config/dotconfpp/dotconfpp.h
@@ -1,6 +1,5 @@
-
#ifndef DOTCONFPP_H
#define DOTCONFPP_H
diff --git a/src/shared/Config/dotconfpp/mempool.cpp b/src/shared/Config/dotconfpp/mempool.cpp
index cec8e8d119f..a23e33808bd 100644
--- a/src/shared/Config/dotconfpp/mempool.cpp
+++ b/src/shared/Config/dotconfpp/mempool.cpp
@@ -1,6 +1,5 @@
-
#include "mempool.h"
AsyncDNSMemPool::PoolChunk::PoolChunk(size_t _size):
@@ -22,7 +21,7 @@ AsyncDNSMemPool::AsyncDNSMemPool(size_t _defaultSize):
AsyncDNSMemPool::~AsyncDNSMemPool()
{
- for(size_t i = 0; i<chunksCount; ++i){
+ for (size_t i = 0; i<chunksCount; ++i){
delete chunks[i];
}
::free(chunks);
@@ -53,7 +52,7 @@ void AsyncDNSMemPool::addNewChunk(size_t size)
void * AsyncDNSMemPool::alloc(size_t size)
{
PoolChunk * chunk = NULL;
- for(size_t i = 0; i<chunksCount; ++i){
+ for (size_t i = 0; i<chunksCount; ++i){
chunk = chunks[i];
if((chunk->size - chunk->pos) >= size){
chunk->pos += size;
@@ -71,7 +70,7 @@ void AsyncDNSMemPool::free()
size_t psz = 0;
++poolUsageCounter;
- for(size_t i = 0; i<chunksCount; ++i){
+ for (size_t i = 0; i<chunksCount; ++i){
pu += chunks[i]->pos;
psz += chunks[i]->size;
chunks[i]->pos = 0;
diff --git a/src/shared/Config/dotconfpp/mempool.h b/src/shared/Config/dotconfpp/mempool.h
index 81c01d15a58..185b50798e1 100644
--- a/src/shared/Config/dotconfpp/mempool.h
+++ b/src/shared/Config/dotconfpp/mempool.h
@@ -1,6 +1,5 @@
-
#ifndef ASYNC_DNS_MEMPOOL_H
#define ASYNC_DNS_MEMPOOL_H
diff --git a/src/shared/Database/DBCFileLoader.cpp b/src/shared/Database/DBCFileLoader.cpp
index e7ebeedecfb..744e4f1e01a 100644
--- a/src/shared/Database/DBCFileLoader.cpp
+++ b/src/shared/Database/DBCFileLoader.cpp
@@ -72,7 +72,7 @@ bool DBCFileLoader::Load(const char *filename, const char *fmt)
fieldsOffset = new uint32[fieldCount];
fieldsOffset[0] = 0;
- for(uint32 i = 1; i < fieldCount; i++)
+ for (uint32 i = 1; i < fieldCount; i++)
{
fieldsOffset[i] = fieldsOffset[i - 1];
if (fmt[i - 1] == 'b' || fmt[i - 1] == 'X') // byte fields
@@ -109,7 +109,7 @@ uint32 DBCFileLoader::GetFormatRecordSize(const char * format,int32* index_pos)
{
uint32 recordsize = 0;
int32 i = -1;
- for(uint32 x=0; format[x];++x)
+ for (uint32 x=0; format[x]; ++x)
switch(format[x])
{
case FT_FLOAT:
@@ -162,7 +162,7 @@ char* DBCFileLoader::AutoProduceData(const char* format, uint32& records, char**
{
uint32 maxi=0;
//find max index
- for(uint32 y=0;y<recordCount;y++)
+ for (uint32 y=0; y<recordCount; y++)
{
uint32 ind=getRecord(y).getUInt (i);
if(ind>maxi)maxi=ind;
@@ -187,7 +187,7 @@ char* DBCFileLoader::AutoProduceData(const char* format, uint32& records, char**
uint32 offset=0;
- for(uint32 y =0;y<recordCount;++y)
+ for (uint32 y =0; y<recordCount; ++y)
{
if(i>=0)
{
@@ -196,7 +196,7 @@ char* DBCFileLoader::AutoProduceData(const char* format, uint32& records, char**
else
indexTable[y]=&dataTable[offset];
- for(uint32 x=0;x<fieldCount;x++)
+ for (uint32 x=0; x<fieldCount; x++)
{
switch(format[x])
{
@@ -235,9 +235,9 @@ char* DBCFileLoader::AutoProduceStrings(const char* format, char* dataTable)
uint32 offset=0;
- for(uint32 y =0;y<recordCount;y++)
+ for (uint32 y =0; y<recordCount; y++)
{
- for(uint32 x=0;x<fieldCount;x++)
+ for (uint32 x=0; x<fieldCount; x++)
switch(format[x])
{
case FT_FLOAT:
diff --git a/src/shared/Database/DBCStore.h b/src/shared/Database/DBCStore.h
index e02265ec523..ea4ce109e27 100644
--- a/src/shared/Database/DBCStore.h
+++ b/src/shared/Database/DBCStore.h
@@ -34,7 +34,7 @@ struct SqlDbc
{
// Convert dbc file name to sql table name
sqlTableName = *_filename;
- for (uint32 i = 0;i< sqlTableName.size();++i)
+ for (uint32 i = 0; i< sqlTableName.size(); ++i)
{
if (isalpha(sqlTableName[i]))
sqlTableName[i] = tolower(sqlTableName[i]);
@@ -46,7 +46,7 @@ struct SqlDbc
DBCFileLoader::GetFormatRecordSize(fmt, &indexPos);
if (indexPos>=0)
{
- for(uint32 x=0;x < formatString->size();x++)
+ for (uint32 x=0; x < formatString->size(); x++)
{
// Count only fields present in sql
if ((*formatString)[x] == FT_SQL_PRESENT)
@@ -142,7 +142,7 @@ class DBCStorage
uint32 columnNumber = 0;
uint32 sqlColumnNumber = 0;
- for(;columnNumber < sql->formatString->size();++columnNumber)
+ for (; columnNumber < sql->formatString->size(); ++columnNumber)
{
if ((*sql->formatString)[columnNumber] == FT_SQL_ABSENT)
{
diff --git a/src/shared/Database/Database.cpp b/src/shared/Database/Database.cpp
index 572d3db6f1d..1799cf28a65 100644
--- a/src/shared/Database/Database.cpp
+++ b/src/shared/Database/Database.cpp
@@ -232,7 +232,7 @@ bool Database::CheckRequiredField( char const* table_name, char const* required_
{
QueryFieldNames const& namesMap = result2->GetFieldNames();
std::string reqName;
- for(QueryFieldNames::const_iterator itr = namesMap.begin(); itr != namesMap.end(); ++itr)
+ for (QueryFieldNames::const_iterator itr = namesMap.begin(); itr != namesMap.end(); ++itr)
{
if(itr->substr(0,9)=="required_")
{
diff --git a/src/shared/Database/QueryResult.h b/src/shared/Database/QueryResult.h
index f9f1a009833..7f213850aa6 100644
--- a/src/shared/Database/QueryResult.h
+++ b/src/shared/Database/QueryResult.h
@@ -65,7 +65,7 @@ class MANGOS_DLL_SPEC QueryNamedResult
uint32 GetField_idx(const std::string &name) const
{
- for(size_t idx = 0; idx < mFieldNames.size(); ++idx)
+ for (size_t idx = 0; idx < mFieldNames.size(); ++idx)
{
if(mFieldNames[idx] == name)
return idx;
diff --git a/src/shared/Database/SQLStorage.cpp b/src/shared/Database/SQLStorage.cpp
index 372baafe278..e6b3c7bfc5f 100644
--- a/src/shared/Database/SQLStorage.cpp
+++ b/src/shared/Database/SQLStorage.cpp
@@ -54,10 +54,10 @@ SQLStorage sInstanceTemplate(InstanceTemplatesrcfmt, InstanceTemplatedstfmt, "ma
void SQLStorage::Free ()
{
uint32 offset=0;
- for(uint32 x=0;x<iNumFields;x++)
+ for (uint32 x=0; x<iNumFields; x++)
if (dst_format[x]==FT_STRING)
{
- for(uint32 y=0;y<MaxEntry;y++)
+ for (uint32 y=0; y<MaxEntry; y++)
if(pIndex[y])
delete [] *(char**)((char*)(pIndex[y])+offset);
diff --git a/src/shared/Database/SQLStorage.h b/src/shared/Database/SQLStorage.h
index cc165af532e..cfc798a8f1b 100644
--- a/src/shared/Database/SQLStorage.h
+++ b/src/shared/Database/SQLStorage.h
@@ -45,7 +45,6 @@ class SQLStorage
init(_entry_field, sqlname);
}
-
~SQLStorage()
{
Free();
diff --git a/src/shared/Database/SQLStorageImpl.h b/src/shared/Database/SQLStorageImpl.h
index b511bdad68c..5ad8a66679a 100644
--- a/src/shared/Database/SQLStorageImpl.h
+++ b/src/shared/Database/SQLStorageImpl.h
@@ -166,7 +166,7 @@ void SQLStorageLoaderBase<T>::Load(SQLStorage &store)
uint32 sc=0;
uint32 bo=0;
uint32 bb=0;
- for(uint32 x=0; x< store.iNumFields; x++)
+ for (uint32 x=0; x< store.iNumFields; x++)
if(store.dst_format[x]==FT_STRING)
++sc;
else if (store.dst_format[x]==FT_LOGIC)
@@ -189,7 +189,7 @@ void SQLStorageLoaderBase<T>::Load(SQLStorage &store)
newIndex[fields[0].GetUInt32()]=p;
offset=0;
- for(uint32 x = 0; x < store.iNumFields; x++)
+ for (uint32 x = 0; x < store.iNumFields; x++)
switch(store.src_format[x])
{
case FT_LOGIC:
diff --git a/src/shared/Database/SqlDelayThread.h b/src/shared/Database/SqlDelayThread.h
index 3c24d3525b7..c2b826044c8 100644
--- a/src/shared/Database/SqlDelayThread.h
+++ b/src/shared/Database/SqlDelayThread.h
@@ -25,7 +25,6 @@
#include "LockedQueue.h"
#include "Threading.h"
-
class Database;
class SqlOperation;
diff --git a/src/shared/Database/SqlOperations.cpp b/src/shared/Database/SqlOperations.cpp
index 396f2e36bc2..89cebff6870 100644
--- a/src/shared/Database/SqlOperations.cpp
+++ b/src/shared/Database/SqlOperations.cpp
@@ -162,7 +162,7 @@ void SqlQueryHolder::SetResult(size_t index, QueryResult *result)
SqlQueryHolder::~SqlQueryHolder()
{
- for(size_t i = 0; i < m_queries.size(); i++)
+ for (size_t i = 0; i < m_queries.size(); i++)
{
/// if the result was never used, free the resources
/// results used already (getresult called) are expected to be deleted
@@ -189,7 +189,7 @@ void SqlQueryHolderEx::Execute(Database *db)
/// we can do this, we are friends
std::vector<SqlQueryHolder::SqlResultPair> &queries = m_holder->m_queries;
- for(size_t i = 0; i < queries.size(); i++)
+ for (size_t i = 0; i < queries.size(); i++)
{
/// execute all queries in the holder and pass the results
char const *sql = queries[i].first;
diff --git a/src/shared/Log.cpp b/src/shared/Log.cpp
index 89544a82426..df3a19dfe55 100644
--- a/src/shared/Log.cpp
+++ b/src/shared/Log.cpp
@@ -235,7 +235,7 @@ void Log::InitColors(const std::string& str)
std::istringstream ss(str);
- for(uint8 i = 0; i < LogLevels; ++i)
+ for (uint8 i = 0; i < LogLevels; ++i)
{
ss >> color[i];
@@ -246,7 +246,7 @@ void Log::InitColors(const std::string& str)
return;
}
- for(uint8 i = 0; i < LogLevels; ++i)
+ for (uint8 i = 0; i < LogLevels; ++i)
m_colors[i] = ColorTypes(color[i]);
m_colored = true;
diff --git a/src/shared/Log.h b/src/shared/Log.h
index 283b8819a10..173e3abdc1d 100644
--- a/src/shared/Log.h
+++ b/src/shared/Log.h
@@ -110,7 +110,7 @@ class Log : public Trinity::Singleton<Log, Trinity::ClassLevelLockable<Log, ACE_
void outCommand( uint32 account, const char * str, ...) ATTR_PRINTF(3,4);
void outRemote( const char * str, ... ) ATTR_PRINTF(2,3);
void outChat( const char * str, ... ) ATTR_PRINTF(2,3);
- void outArena( const char * str, ... ) ATTR_PRINTF(2,3);
+ void outArena( const char * str, ... ) ATTR_PRINTF(2,3);
void outCharDump( const char * str, uint32 account_id, uint32 guid, const char * name );
static void outTimestamp(FILE* file);
diff --git a/src/shared/ProgressBar.cpp b/src/shared/ProgressBar.cpp
index 2eba31c2c40..61d037bb42e 100644
--- a/src/shared/ProgressBar.cpp
+++ b/src/shared/ProgressBar.cpp
@@ -46,7 +46,7 @@ barGoLink::barGoLink( int row_count )
#else
printf( "[" );
#endif
- for ( int i = 0; i < indic_len; i++ ) printf( empty );
+ for (int i = 0; i < indic_len; i++ ) printf( empty );
#ifdef _WIN32
printf( "\x3D 0%%\r\x3D" );
#else
@@ -69,8 +69,8 @@ void barGoLink::step( void )
#else
printf( "\r[" );
#endif
- for ( i = 0; i < n; i++ ) printf( full );
- for ( ; i < indic_len; i++ ) printf( empty );
+ for (i = 0; i < n; i++ ) printf( full );
+ for (; i < indic_len; i++ ) printf( empty );
float percent = (((float)n/(float)indic_len)*100);
#ifdef _WIN32
printf( "\x3D %i%% \r\x3D", (int)percent);
diff --git a/src/shared/SystemConfig.h b/src/shared/SystemConfig.h
index 9d154b863d0..b19ed77e559 100644
--- a/src/shared/SystemConfig.h
+++ b/src/shared/SystemConfig.h
@@ -27,7 +27,6 @@
#include "Platform/Define.h"
#include "revision.h"
-
#define _PACKAGENAME "TrinityCore2 "
#define _CODENAME "YUME"
diff --git a/src/shared/Threading.cpp b/src/shared/Threading.cpp
index 90861b8f425..3938286dbdb 100644
--- a/src/shared/Threading.cpp
+++ b/src/shared/Threading.cpp
@@ -182,7 +182,7 @@ ACE_THR_FUNC_RETURN Thread::ThreadTask(void * param)
Runnable * _task = (Runnable*)param;
_task->run();
- // task execution complete, free referecne added at
+ // task execution complete, free referecne added at
_task->decReference();
return (ACE_THR_FUNC_RETURN)0;
diff --git a/src/shared/Util.cpp b/src/shared/Util.cpp
index ede7a27ea7b..9846b48286c 100644
--- a/src/shared/Util.cpp
+++ b/src/shared/Util.cpp
@@ -136,7 +136,7 @@ void stripLineInvisibleChars(std::string &str)
size_t wpos = 0;
bool space = false;
- for(size_t pos = 0; pos < str.size(); ++pos)
+ for (size_t pos = 0; pos < str.size(); ++pos)
{
if(invChars.find(str[pos])!=std::string::npos)
{
@@ -192,7 +192,7 @@ uint32 TimeStringToSecs(const std::string& timestring)
uint32 buffer = 0;
uint32 multiplier = 0;
- for(std::string::const_iterator itr = timestring.begin(); itr != timestring.end(); itr++ )
+ for (std::string::const_iterator itr = timestring.begin(); itr != timestring.end(); itr++ )
{
if(isdigit(*itr))
{
@@ -418,7 +418,7 @@ std::wstring GetMainPartOfName(std::wstring wname, uint32 declension)
{ &ie_End[1], &i_End[1], NULL, NULL, NULL, NULL, NULL, NULL }
};
- for(wchar_t const * const* itr = &dropEnds[declension][0]; *itr; ++itr)
+ for (wchar_t const * const* itr = &dropEnds[declension][0]; *itr; ++itr)
{
size_t len = size_t((*itr)[-1]); // get length from string size field
@@ -506,9 +506,9 @@ void vutf8printf(FILE *out, const char *str, va_list* ap)
void hexEncodeByteArray(uint8* bytes, uint32 arrayLen, std::string& result)
{
std::ostringstream ss;
- for(uint32 i=0; i<arrayLen; ++i)
+ for (uint32 i=0; i<arrayLen; ++i)
{
- for(uint8 j=0; j<2; ++j)
+ for (uint8 j=0; j<2; ++j)
{
unsigned char nibble = 0x0F & (bytes[i]>>((1-j)*4));
char encodedNibble;
diff --git a/src/shared/Util.h b/src/shared/Util.h
index 04be6e93bed..a8b9df8f29a 100644
--- a/src/shared/Util.h
+++ b/src/shared/Util.h
@@ -189,7 +189,7 @@ inline bool isNumericOrSpace(wchar_t wchar)
inline bool isBasicLatinString(std::wstring wstr, bool numericOrSpace)
{
- for(size_t i = 0; i < wstr.size(); ++i)
+ for (size_t i = 0; i < wstr.size(); ++i)
if(!isBasicLatinCharacter(wstr[i]) && (!numericOrSpace || !isNumericOrSpace(wstr[i])))
return false;
return true;
@@ -197,7 +197,7 @@ inline bool isBasicLatinString(std::wstring wstr, bool numericOrSpace)
inline bool isExtendedLatinString(std::wstring wstr, bool numericOrSpace)
{
- for(size_t i = 0; i < wstr.size(); ++i)
+ for (size_t i = 0; i < wstr.size(); ++i)
if(!isExtendedLatinCharacter(wstr[i]) && (!numericOrSpace || !isNumericOrSpace(wstr[i])))
return false;
return true;
@@ -205,7 +205,7 @@ inline bool isExtendedLatinString(std::wstring wstr, bool numericOrSpace)
inline bool isCyrillicString(std::wstring wstr, bool numericOrSpace)
{
- for(size_t i = 0; i < wstr.size(); ++i)
+ for (size_t i = 0; i < wstr.size(); ++i)
if(!isCyrillicCharacter(wstr[i]) && (!numericOrSpace || !isNumericOrSpace(wstr[i])))
return false;
return true;
@@ -213,7 +213,7 @@ inline bool isCyrillicString(std::wstring wstr, bool numericOrSpace)
inline bool isEastAsianString(std::wstring wstr, bool numericOrSpace)
{
- for(size_t i = 0; i < wstr.size(); ++i)
+ for (size_t i = 0; i < wstr.size(); ++i)
if(!isEastAsianCharacter(wstr[i]) && (!numericOrSpace || !isNumericOrSpace(wstr[i])))
return false;
return true;
@@ -348,7 +348,7 @@ public:
template<class type>
inline bool operator < (type & right)
{
- for (uint8 i=3;i>0;i--)
+ for (uint8 i=3; i>0; i--)
{
if (part[i-1]<right.part[i-1])
return 1;
@@ -361,7 +361,7 @@ public:
template<class type>
inline bool operator < (type & right) const
{
- for (uint8 i=3;i>0;i--)
+ for (uint8 i=3; i>0; i--)
{
if (part[i-1]<right.part[i-1])
return 1;
diff --git a/src/shared/WheatyExceptionReport.cpp b/src/shared/WheatyExceptionReport.cpp
index f2fd9b0f2e7..8fb5d5e2d2a 100644
--- a/src/shared/WheatyExceptionReport.cpp
+++ b/src/shared/WheatyExceptionReport.cpp
@@ -374,7 +374,6 @@ void WheatyExceptionReport::printTracesForAllThreads()
CloseHandle(hThreadSnap);
}
-
//===========================================================================
// Open the report file, and write the desired information to it. Called by
// WheatyUnhandledExceptionFilter
diff --git a/src/shared/vmap/AABSPTree.h b/src/shared/vmap/AABSPTree.h
index ff4335b6774..1a7b17cdaa2 100644
--- a/src/shared/vmap/AABSPTree.h
+++ b/src/shared/vmap/AABSPTree.h
@@ -42,7 +42,6 @@ inline void getBounds(const G3D::Vector3& v, G3D::AABox& out) {
out = G3D::AABox(v);
}
-
inline void getBounds(const G3D::AABox& a, G3D::AABox& out) {
out = a;
}
@@ -51,23 +50,18 @@ inline void getBounds(const G3D::Sphere& s, G3D::AABox& out) {
s.getBounds(out);
}
-
inline void getBounds(const G3D::Box& b, G3D::AABox& out) {
b.getBounds(out);
}
-
inline void getBounds(const G3D::Triangle& t, G3D::AABox& out) {
t.getBounds(out);
}
-
-
inline void getBounds(const G3D::Vector3* v, G3D::AABox& out) {
out = G3D::AABox(*v);
}
-
inline void getBounds(const G3D::AABox* a, G3D::AABox& out) {
getBounds(*a, out);
}
@@ -76,7 +70,6 @@ inline void getBounds(const G3D::Sphere* s, G3D::AABox& out) {
s->getBounds(out);
}
-
inline void getBounds(const G3D::Box* b, G3D::AABox& out) {
b->getBounds(out);
}
@@ -165,7 +158,6 @@ namespace G3D {
you can use the AABSPTree::update method as a shortcut to
insert/remove an object in one step after it has moved.
-
Note: Do not mutate any value once it has been inserted into AABSPTree. Values
are copied interally. All AABSPTree iterators convert to pointers to constant
values to reinforce this.
@@ -258,7 +250,6 @@ template<class T> class AABSPTree {
protected:
public:
-
/** Returns the bounds of the sub array. Used by makeNode. */
static AABox computeBounds(
const Array<_AABSPTree::Handle<T>*>& point,
@@ -297,7 +288,6 @@ public:
}
};
-
/** Compares bounds for strict >, <, or overlap*/
class BoundsComparator {
public:
@@ -319,7 +309,6 @@ public:
}
};
-
/** Compares bounds to the sort location */
class Comparator {
public:
@@ -436,7 +425,6 @@ public:
return (child[0] == NULL) && (child[1] == NULL);
}
-
/**
Recursively appends all handles and children's handles
to the array.
@@ -461,7 +449,7 @@ public:
const AABox& b = valueArray[i]->bounds;
debugAssert(b == boundsArray[i]);
- for(int axis = 0; axis < 3; ++axis) {
+ for (int axis = 0; axis < 3; ++axis) {
debugAssert(b.low()[axis] <= b.high()[axis]);
debugAssert(b.low()[axis] >= lo[axis]);
debugAssert(b.high()[axis] <= hi[axis]);
@@ -545,7 +533,6 @@ public:
return this;
}
-
/** Appends all members that intersect the box.
If useSphere is true, members that pass the box test
face a second test against the sphere. */
@@ -721,7 +708,6 @@ public:
}
};
-
/**
Recursively subdivides the subarray.
@@ -813,7 +799,6 @@ public:
// The Comparator ensures that elements are strictly on the correct side of the split
}
-
# if defined(G3D_DEBUG) && defined(VERIFY_TREE)
debugAssert(lt.size() + node->valueArray.size() + gt.size() == source.size());
// Verify that all objects ended up on the correct side of the split.
@@ -904,12 +889,10 @@ public:
AABSPTree::balance(). */
AABSPTree() : root(NULL) {}
-
AABSPTree(const AABSPTree& src) : root(NULL) {
*this = src;
}
-
AABSPTree& operator=(const AABSPTree& src) {
delete root;
// Clone tree takes care of filling out the memberTable.
@@ -917,7 +900,6 @@ public:
return *this;
}
-
~AABSPTree() {
clear();
}
@@ -1007,7 +989,6 @@ public:
}
}
-
/**
Returns true if this object is in the set, otherwise
returns false. O(1) time.
@@ -1018,7 +999,6 @@ public:
return memberTable.containsKey(Member(&h));
}
-
/**
Removes an object from the set in O(1) time.
It is an error to remove members that are not already
@@ -1066,7 +1046,6 @@ public:
ptr = NULL;
}
-
/**
If the element is in the set, it is removed.
The element is then inserted.
@@ -1085,7 +1064,6 @@ public:
insert(value);
}
-
/**
Rebalances the tree (slow). Call when objects
have moved substantially from their original positions
@@ -1402,7 +1380,6 @@ public:
}
};
-
/**
Iterates through the members that intersect the box
*/
@@ -1426,7 +1403,6 @@ public:
root->getIntersectingMembers(box, Sphere(Vector3::zero(), 0), members, false);
}
-
/**
Invoke a callback for every member along a ray until the closest intersection is found.
@@ -1473,7 +1449,6 @@ public:
scene.intersectRay(camera.worldRay(x, y), intersection, distance);
</pre>
-
@param distance When the method is invoked, this is the maximum distance that the tree should search for an intersection.
On return, this is set to the distance to the first intersection encountered.
@@ -1492,7 +1467,6 @@ public:
}
-
/**
@param members The results are appended to this array.
*/
@@ -1533,7 +1507,6 @@ public:
}
}
-
/**
C++ STL style iterator variable. See begin().
Overloads the -> (dereference) operator, so this acts like a pointer
@@ -1591,7 +1564,6 @@ public:
}
};
-
/**
C++ STL style iterator method. Returns the first member.
Use preincrement (++entry) to get to the next element (iteration
@@ -1602,7 +1574,6 @@ public:
return Iterator(memberTable.begin());
}
-
/**
C++ STL style iterator method. Returns one after the last iterator
element.
@@ -1617,5 +1588,3 @@ public:
#endif
-
-
diff --git a/src/shared/vmap/BaseModel.cpp b/src/shared/vmap/BaseModel.cpp
index 2ffd5672218..94389f683cf 100644
--- a/src/shared/vmap/BaseModel.cpp
+++ b/src/shared/vmap/BaseModel.cpp
@@ -29,7 +29,7 @@ namespace VMAP
void BaseModel::getMember(Array<TriangleBox>& pMembers)
{
- for(unsigned int i=0; i<iNTriangles; i++)
+ for (unsigned int i=0; i<iNTriangles; i++)
{
pMembers.append(iTriangles[i]);
}
diff --git a/src/shared/vmap/DebugCmdLogger.cpp b/src/shared/vmap/DebugCmdLogger.cpp
index c899606045b..461df62843e 100644
--- a/src/shared/vmap/DebugCmdLogger.cpp
+++ b/src/shared/vmap/DebugCmdLogger.cpp
@@ -78,7 +78,7 @@ namespace VMAP
if(f)
{
result = true;
- for(int i=0; i<pCmdArray.size(); ++i)
+ for (int i=0; i<pCmdArray.size(); ++i)
{
if(fwrite(&pCmdArray[i], sizeof(Command), 1, f) != 1) { result = false; break; }
}
diff --git a/src/shared/vmap/ModelContainer.cpp b/src/shared/vmap/ModelContainer.cpp
index 4a722d2585b..d00464880f3 100644
--- a/src/shared/vmap/ModelContainer.cpp
+++ b/src/shared/vmap/ModelContainer.cpp
@@ -66,7 +66,7 @@ namespace VMAP
++nNodes;
nSubModels += pNode.valueArray.size();
- for(int i=0;i<pNode.valueArray.size(); i++)
+ for (int i=0; i<pNode.valueArray.size(); i++)
{
G3D::_AABSPTree::Handle<SubModel*>* h= pNode.valueArray[i];
SubModel *m = h->value;
@@ -97,7 +97,7 @@ namespace VMAP
Vector3 lo = Vector3(inf(),inf(),inf());
Vector3 hi = Vector3(-inf(),-inf(),-inf());
- for(int i=0;i<pNode.valueArray.size(); i++)
+ for (int i=0; i<pNode.valueArray.size(); i++)
{
G3D::_AABSPTree::Handle<SubModel*>* h= pNode.valueArray[i];
SubModel *m = h->value;
@@ -303,7 +303,7 @@ namespace VMAP
if(result)
{
- for(unsigned int i=0;i<iNSubModel && result; ++i)
+ for (unsigned int i=0; i<iNSubModel && result; ++i)
{
unsigned char readBuffer[52]; // this is the size of SubModel on 32 bit systems
if(fread(readBuffer,sizeof(readBuffer),1,rf) != 1) result = false;
diff --git a/src/shared/vmap/SubModel.cpp b/src/shared/vmap/SubModel.cpp
index 370c80062d6..72dbed2a5a1 100644
--- a/src/shared/vmap/SubModel.cpp
+++ b/src/shared/vmap/SubModel.cpp
@@ -148,7 +148,7 @@ namespace VMAP
Vector3 lo = Vector3(inf(),inf(),inf());
Vector3 hi = Vector3(-inf(),-inf(),-inf());
- for(int i=0;i<pNode.valueArray.size(); i++)
+ for (int i=0; i<pNode.valueArray.size(); i++)
{
G3D::_AABSPTree::Handle<Triangle>* h= pNode.valueArray[i];
Triangle t = h->value;
diff --git a/src/shared/vmap/TileAssembler.cpp b/src/shared/vmap/TileAssembler.cpp
index 75997a847a2..5a9b35bb3a1 100644
--- a/src/shared/vmap/TileAssembler.cpp
+++ b/src/shared/vmap/TileAssembler.cpp
@@ -166,25 +166,25 @@ namespace VMAP
return false;
}
- for(int i=0; i<mapIds.size(); ++i)
+ for (int i=0; i<mapIds.size(); ++i)
{
unsigned int mapId = mapIds[i];
#ifdef _ASSEMBLER_DEBUG
if(mapId == 0) // "Azeroth" just for debug
{
- for(int x=28; x<29; ++x) //debug
+ for (int x=28; x<29; ++x) //debug
{
- for(int y=28; y<29; ++y)
+ for (int y=28; y<29; ++y)
{
#else
// ignore DeeprunTram (369) it is too large for short vector and not important
// ignore test (13), Test (29) , development (451)
if(mapId != 369 && mapId != 13 && mapId != 29 && mapId != 451)
{
- for(int x=0; x<66; ++x)
+ for (int x=0; x<66; ++x)
{
- for(int y=0; y<66; ++y)
+ for (int y=0; y<66; ++y)
{
#endif
Array<ModelContainer*> mc;
@@ -423,7 +423,7 @@ namespace VMAP
READ_OR_RETURN(&groups, sizeof(G3D::uint32));
- for(int g=0;g<(int)groups;g++)
+ for (int g=0; g<(int)groups; g++)
{
// group MUST NOT have more then 65536 indexes !! Array will have a problem with that !! (strange ...)
Array<int> tempIndexArray;
@@ -447,7 +447,7 @@ namespace VMAP
CMP_OR_RETURN(blockId, "GRP ");
READ_OR_RETURN(&blocksize, sizeof(int));
READ_OR_RETURN(&branches, sizeof(G3D::uint32));
- for(int b=0;b<(int)branches; b++)
+ for (int b=0; b<(int)branches; b++)
{
G3D::uint32 indexes;
// indexes for each branch (not used jet)
@@ -464,7 +464,7 @@ namespace VMAP
{
unsigned short *indexarray = new unsigned short[nindexes*sizeof(unsigned short)];
READ_OR_RETURN(indexarray, nindexes*sizeof(unsigned short));
- for(int i=0;i<(int)nindexes; i++)
+ for (int i=0; i<(int)nindexes; i++)
{
unsigned short val = indexarray[i];
tempIndexArray.append(val);
@@ -504,8 +504,7 @@ namespace VMAP
fseek(rf, blocksize, SEEK_CUR);
}
-
- for(unsigned int i=0, indexNo=0; indexNo<nvectors; indexNo++)
+ for (unsigned int i=0, indexNo=0; indexNo<nvectors; indexNo++)
{
Vector3 v = Vector3(vectorarray[i+2], vectorarray[i+1], vectorarray[i+0]);
i+=3;
@@ -525,7 +524,7 @@ namespace VMAP
nindexes -= rest;
}
- for(unsigned int i=0;i<(nindexes);)
+ for (unsigned int i=0; i<(nindexes); )
{
Triangle t = Triangle(tempVertexArray[tempIndexArray[i+2]], tempVertexArray[tempIndexArray[i+1]], tempVertexArray[tempIndexArray[i+0]] );
i+=3;
diff --git a/src/shared/vmap/VMapFactory.cpp b/src/shared/vmap/VMapFactory.cpp
index 5189f79daba..a92e4a1afac 100644
--- a/src/shared/vmap/VMapFactory.cpp
+++ b/src/shared/vmap/VMapFactory.cpp
@@ -38,7 +38,7 @@ namespace VMAP
{
bool result = false;
unsigned int i;
- for(i=pStartPos;i<pString.size(); ++i)
+ for (i=pStartPos; i<pString.size(); ++i)
{
if(pString[i] == ',')
{
diff --git a/src/shared/vmap/VMapManager.cpp b/src/shared/vmap/VMapManager.cpp
index 342da0eb9e2..a059f267f2e 100644
--- a/src/shared/vmap/VMapManager.cpp
+++ b/src/shared/vmap/VMapManager.cpp
@@ -41,7 +41,7 @@ namespace VMAP
VMapManager::~VMapManager(void)
{
Array<unsigned int > keyArray = iInstanceMapTrees.getKeys();
- for(int i=0;i<keyArray.size(); ++i)
+ for (int i=0; i<keyArray.size(); ++i)
{
delete iInstanceMapTrees.get(keyArray[i]);
iInstanceMapTrees.remove(keyArray[i]);
@@ -151,7 +151,7 @@ namespace VMAP
{
bool result = false;
unsigned int i;
- for(i=pStartPos;i<pString.size(); ++i)
+ for (i=pStartPos; i<pString.size(); ++i)
{
if(pString[i] == ',')
{
@@ -740,7 +740,7 @@ namespace VMAP
{
Array<std::string> fileNames = filesInDir.getFiles();
bool treeChanged = false;
- for(int i=0; i<fileNames.size(); ++i)
+ for (int i=0; i<fileNames.size(); ++i)
{
std::string name = fileNames[i];
ManagedModelContainer* mc = getModelContainer(name);
diff --git a/src/tools/genrevision/genrevision.cpp b/src/tools/genrevision/genrevision.cpp
index 85b11a6461c..b675afb0d07 100644
--- a/src/tools/genrevision/genrevision.cpp
+++ b/src/tools/genrevision/genrevision.cpp
@@ -83,7 +83,7 @@ void extractDataFromHG(FILE* EntriesFile, std::string path, bool url, RawData& d
}
char thash_str[200];
- for(int i = 11;i >= 0; --i)
+ for (int i = 11; i >= 0; --i)
{
thash_str[i] = hash_str[i];
}
@@ -124,7 +124,7 @@ void extractDataFromArchive(FILE* EntriesFile, std::string path, bool url, RawDa
}
char thash_str[200];
- for(int i = 11;i >= 0; --i)
+ for (int i = 11; i >= 0; --i)
{
thash_str[i] = hash_str[i];
}
@@ -333,7 +333,7 @@ int main(int argc, char **argv)
// -s use svn prefered
// -r use only revision (without repo URL) (default)
// -u include repositire URL as commit URL or "rev at URL"
- for(int k = 1; k <= argc; ++k)
+ for (int k = 1; k <= argc; ++k)
{
if(!argv[k] || !*argv[k])
break;
@@ -375,7 +375,6 @@ int main(int argc, char **argv)
}
}
-
/// new data extraction
std::string newData;
diff --git a/src/trinitycore/CliRunnable.cpp b/src/trinitycore/CliRunnable.cpp
index 966b0b4dabb..e325c2ca366 100644
--- a/src/trinitycore/CliRunnable.cpp
+++ b/src/trinitycore/CliRunnable.cpp
@@ -77,7 +77,7 @@ char ** cli_completion(const char * text, int start, int end)
{
char ** matches;
matches = (char**)NULL;
-
+
if(start == 0)
matches = rl_completion_matches((char*)text,&command_finder);
else
@@ -348,7 +348,6 @@ bool ChatHandler::HandleServerSetDiffTimeCommand(const char *args)
return true;
}
-
/// @}
#ifdef linux
@@ -401,14 +400,13 @@ void CliRunnable::run()
#endif
if (command_str != NULL)
{
- for(int x=0;command_str[x];x++)
+ for (int x=0; command_str[x]; x++)
if(command_str[x]=='\r'||command_str[x]=='\n')
{
command_str[x]=0;
break;
}
-
if(!*command_str)
{
#if PLATFORM == WINDOWS
diff --git a/src/trinitycore/Main.cpp b/src/trinitycore/Main.cpp
index 342252741fb..23e977bc69f 100644
--- a/src/trinitycore/Main.cpp
+++ b/src/trinitycore/Main.cpp
@@ -32,7 +32,6 @@
#include "Log.h"
#include "Master.h"
-
#ifndef _TRINITY_CORE_CONFIG
# define _TRINITY_CORE_CONFIG "TrinityCore.conf"
#endif //_TRINITY_CORE_CONFIG
diff --git a/src/trinitycore/Master.cpp b/src/trinitycore/Master.cpp
index 7e56cb7a636..ba293ec841a 100644
--- a/src/trinitycore/Master.cpp
+++ b/src/trinitycore/Master.cpp
@@ -391,7 +391,7 @@ int Master::Run()
cliThread->wait();
- #else
+ #else
cliThread->destroy();
diff --git a/src/trinitycore/RASocket.cpp b/src/trinitycore/RASocket.cpp
index d0ee5cc8053..f5d968ef102 100644
--- a/src/trinitycore/RASocket.cpp
+++ b/src/trinitycore/RASocket.cpp
@@ -121,7 +121,7 @@ void RASocket::OnRead()
///- Discard data after line break or line feed
bool gotenter=false;
unsigned int y=0;
- for(;y<sz;y++)
+ for (; y<sz; y++)
if(inp[y]=='\r'||inp[y]=='\n')
{
gotenter=true;